|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jurismarches.vradi.services.VradiStorageServiceImpl
public class VradiStorageServiceImpl
Vradi storage implementation.
| Field Summary | |
|---|---|
protected BindingManager |
bindingManager
|
protected ClientManager |
clientManager
|
protected FormManager |
formManager
|
protected FormTypeManager |
formTypeManager
|
protected org.nuiton.wikitty.WikittyImportExportService |
importExportService
|
protected java.util.Timer |
mailCronTask
Mail cron task to check mails every 10 minutes. |
protected MailingManager |
mailingManager
|
protected SearchManager |
searchManager
|
protected ThesaurusManager |
thesaurusManager
|
protected org.nuiton.wikitty.WikittyProxy |
wikittyProxy
Proxy to store and retrieve data. |
| Constructor Summary | |
|---|---|
|
VradiStorageServiceImpl()
Remote instantiation and empty constructor for hessian. |
protected |
VradiStorageServiceImpl(org.nuiton.wikitty.WikittyProxy wikittyProxy)
This constructor exists for local wikittyProxy instanciation. |
| Method Summary | |
|---|---|
void |
archiveQueries(QueryMaker queryMaker)
Archives the queries of a user, client or group in a RSS file. |
void |
autoLoadFormsFromXmlStreams(java.lang.String intervalUnit,
int intervalValue,
java.lang.Integer hour,
java.lang.Integer minute)
Regularly retrieves the information from all the xml streams and create new forms |
Session |
bindForms(Session session)
Binds all queryMaker with the forms found by their queries and not already sent. |
java.util.List<Status> |
createDefaultStatuses()
Creation of default status Warn, dont use it otherwise for vradi initialisation !!! |
Session |
createNewSession()
|
java.util.List<Sending> |
createSending(Session session,
QueryMaker queryMaker,
java.util.List<Form> formsToBind)
Create new Sending |
VradiUser |
createUser(VradiUser user)
Create a VradiUser. |
java.lang.String |
exportAsCSV(org.nuiton.wikitty.Criteria criteria)
Get csv export. |
java.lang.String |
exportClientDB()
Export all the clients, users and groups in database |
java.util.Map<QueryMaker,java.util.List<QueryBean>> |
findQueriesReturningForm(Form form)
Computes a list of queries returning the specified Form. |
protected java.util.List<java.io.File> |
generateFilledDocumentInPDF(java.io.File template,
java.util.List<Form> forms,
java.util.Map<java.lang.String,java.lang.String> fieldBindings,
boolean replace)
Generate offer PDF form given forms with specified template. |
protected java.io.File |
generateFilledDocumentInPDF(TemplateManager templateManager,
Form form,
java.util.Map<java.lang.String,java.lang.String[]> fieldBindings,
boolean replace)
Generate a single pdf file for specified form. |
java.lang.String |
generatePDF(Form form,
boolean force)
Generate pdf file for specified form. |
void |
generatePDFForSession(java.lang.String sessionId)
Generate all the PDFs needed to send a session. |
java.util.List<java.lang.String> |
getAllWebHarvestScripts()
Get all WebHarvest script name in server's WebHarvest directory. |
java.util.Map<java.lang.String,java.lang.String> |
getAssociatedFields(java.lang.String extensionName,
java.lang.String templateName)
Get association between template fields and extension fields. |
java.util.List<java.lang.String> |
getDocumentFields(org.nuiton.wikitty.WikittyExtension extension,
java.lang.String templateName)
Get template document fields names. |
int[] |
getFormsFromWebHarvestStream(WebHarvestStream webHarvestStream)
Creates and store forms from an WebHarvestXmlStream by using the XmlStreamBinding
to link xml stream field values with form fields. |
int[] |
getFormsFromXmlStream(XmlStream xmlStream)
Creates and store forms from an XmlStream by using the XmlStreamBinding
to link xml stream field values with form fields. |
org.nuiton.wikitty.WikittyExtension |
getFormType(java.lang.String name)
Returns a form type with the specified name. |
java.util.Map<java.lang.String,org.nuiton.wikitty.FieldType> |
getFormTypeFields(java.lang.String name)
Finds fields of a form type. |
java.util.List<Group> |
getGroupsForUser(java.lang.String userId)
Get all the groups a user is in. |
protected org.nuiton.wikitty.WikittyImportExportService |
getImportExportService()
|
Session |
getLastCloseSession()
Get last closed session |
Session |
getLastOpenSession()
Get last opened session |
java.util.Map<Group,java.util.List<QueryBean>> |
getQueriesToModifyAfterThesaurusModification(java.lang.String rootThesaurusName,
java.lang.String thesaurusName)
Gets the query makers whose queries are potentially to modify after a thesaurus node modification |
java.util.List<Session> |
getSessions(java.util.Date sessionDate)
Get all session by date |
Status |
getStatus(VradiConstants.FormStatus formStatus)
Get the status passed in parameter. |
java.util.Collection<java.lang.String> |
getTemplateFilenames(org.nuiton.wikitty.WikittyExtension extension)
Lists the template filename (simple name) associated with the specified extension. |
java.lang.String |
getWebHarvestPreviewURL(WebHarvestStream stream)
Get web harvest preview url from script |
java.lang.String[] |
getXmlStreamConfig()
|
void |
importAsCSV(java.lang.String uri)
Import all data as CSV. |
protected static org.nuiton.wikitty.WikittyService |
initLocalWikittyService(org.nuiton.wikitty.WikittyService wikittyServiceRemote)
Create a new wikitty service with cache support that use provided WikittyService for non cached data. |
VradiUser |
loginUser(java.lang.String login,
java.lang.String mp5password)
Checks if userName and userPassword matches a valid VradiUser. |
java.util.List<Thesaurus> |
proposeThesaurus(Form form)
Propose thesaurus nodes that might be in relation with a specified form |
void |
receiveMessages()
|
void |
reindexData()
Reindex the datas. |
java.util.List<Sending> |
removeAllSending(Session session,
Form form,
QueryMaker queryMaker)
Remove all sending corresponding with form and query maker from session |
Sending |
sendMessage(java.lang.String sendingId,
java.lang.String sessionParagraph)
|
Sending |
sendMessage(java.lang.String sendingId,
java.lang.String sessionParagraph,
java.lang.String email)
|
Session |
sendMessages(java.lang.String sessionId)
|
void |
setAssociatedFields(java.lang.String extensionName,
java.lang.String templateName,
java.util.Map<java.lang.String,java.lang.String> fieldMap)
Save association between template fields and extensions fields. |
protected void |
startTimerTasks()
Start server side cron tasks. |
Session |
stopSentMail(Session session)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.nuiton.wikitty.WikittyProxy wikittyProxy
protected org.nuiton.wikitty.WikittyImportExportService importExportService
protected ThesaurusManager thesaurusManager
protected BindingManager bindingManager
protected FormManager formManager
protected FormTypeManager formTypeManager
protected ClientManager clientManager
protected SearchManager searchManager
protected MailingManager mailingManager
protected java.util.Timer mailCronTask
| Constructor Detail |
|---|
protected VradiStorageServiceImpl(org.nuiton.wikitty.WikittyProxy wikittyProxy)
wikittyProxy - custom wikitty proxypublic VradiStorageServiceImpl()
| Method Detail |
|---|
protected static org.nuiton.wikitty.WikittyService initLocalWikittyService(org.nuiton.wikitty.WikittyService wikittyServiceRemote)
wikittyServiceRemote - remote wikitty serviceprotected org.nuiton.wikitty.WikittyImportExportService getImportExportService()
protected void startTimerTasks()
public java.util.List<Status> createDefaultStatuses()
throws VradiException
VradiStorageService
createDefaultStatuses in interface VradiStorageServiceVradiException
public java.util.Map<QueryMaker,java.util.List<QueryBean>> findQueriesReturningForm(Form form)
throws VradiException
VradiStorageServiceForm.
findQueriesReturningForm in interface VradiStorageServiceform - the form which match queries
VradiException
public org.nuiton.wikitty.WikittyExtension getFormType(java.lang.String name)
throws VradiException
VradiStorageServicename.
getFormType in interface VradiStorageServicename - the name of the form type
WikittyExtension
VradiException
public java.util.Map<java.lang.String,org.nuiton.wikitty.FieldType> getFormTypeFields(java.lang.String name)
throws VradiException
VradiStorageService
getFormTypeFields in interface VradiStorageServicename - the name of the form type
VradiException
public Session createNewSession()
throws VradiException
createNewSession in interface VradiStorageServiceVradiException
public Session bindForms(Session session)
throws VradiException
VradiStorageService
bindForms in interface VradiStorageServiceVradiException
public java.util.List<Sending> createSending(Session session,
QueryMaker queryMaker,
java.util.List<Form> formsToBind)
throws VradiException
VradiStorageService
createSending in interface VradiStorageServiceVradiException
public java.util.List<Sending> removeAllSending(Session session,
Form form,
QueryMaker queryMaker)
throws VradiException
VradiStorageService
removeAllSending in interface VradiStorageServicesession - concernedform - concernedqueryMaker - concerned
VradiException
public java.util.List<Session> getSessions(java.util.Date sessionDate)
throws VradiException
VradiStorageService
getSessions in interface VradiStorageServicesessionDate - Date concerned
VradiException
public Session getLastCloseSession()
throws VradiException
VradiStorageService
getLastCloseSession in interface VradiStorageServiceVradiException
public Session getLastOpenSession()
throws VradiException
VradiStorageService
getLastOpenSession in interface VradiStorageServiceVradiException
public java.lang.String getWebHarvestPreviewURL(WebHarvestStream stream)
throws VradiException
VradiStorageService
getWebHarvestPreviewURL in interface VradiStorageServiceVradiException
public int[] getFormsFromWebHarvestStream(WebHarvestStream webHarvestStream)
throws VradiException
VradiStorageServiceWebHarvestXmlStream by using the XmlStreamBinding
to link xml stream field values with form fields.
getFormsFromWebHarvestStream in interface VradiStorageServicewebHarvestStream - the web harvest xml stream to execute
VradiException - for various possible errors
public int[] getFormsFromXmlStream(XmlStream xmlStream)
throws VradiException
VradiStorageServiceXmlStream by using the XmlStreamBinding
to link xml stream field values with form fields.
getFormsFromXmlStream in interface VradiStorageServicexmlStream - the xml stream to read
VradiException - for various possible errors
public VradiUser createUser(VradiUser user)
throws VradiException
VradiStorageServiceVradiUser.
createUser in interface VradiStorageServiceuser - the user to create
null if user can't be created (already exists)
VradiException
public VradiUser loginUser(java.lang.String login,
java.lang.String mp5password)
VradiStorageServiceuserName and userPassword matches a valid VradiUser.
loginUser in interface VradiStorageServicelogin - the login of a WikittyUsermp5password - the password of a WikittyUser (md5 encoded)
WikittyUser or null if either userName or userPassword don't match
public void importAsCSV(java.lang.String uri)
throws VradiException
VradiStorageService
importAsCSV in interface VradiStorageServiceuri - uri used to read input stream
VradiException - if any error happen during import
public java.lang.String exportAsCSV(org.nuiton.wikitty.Criteria criteria)
throws VradiException
VradiStorageService
exportAsCSV in interface VradiStorageServicecriteria - export criteria
VradiException - if any error happen during exportpublic void reindexData()
VradiStorageService
reindexData in interface VradiStorageService
public java.util.List<Thesaurus> proposeThesaurus(Form form)
throws VradiException
VradiStorageService
proposeThesaurus in interface VradiStorageServiceform - the Form containing the information needed
to search the thesaurus nodes
Thesaurus
VradiException
public void archiveQueries(QueryMaker queryMaker)
throws VradiException
VradiStorageService
archiveQueries in interface VradiStorageServicequeryMaker - the query maker whose queries are archived
VradiException
public void autoLoadFormsFromXmlStreams(java.lang.String intervalUnit,
int intervalValue,
java.lang.Integer hour,
java.lang.Integer minute)
throws VradiException
VradiStorageService
autoLoadFormsFromXmlStreams in interface VradiStorageServiceintervalUnit - unit of te interval between 2 retrievings (minute, hour or day)intervalValue - interval value between two retrievingshour - hour of the retrieving if the unit is dayminute - of the retrieving if the unit is day or hour
VradiExceptionpublic java.util.Collection<java.lang.String> getTemplateFilenames(org.nuiton.wikitty.WikittyExtension extension)
VradiStorageServiceWikittyExtension
doesn't have a files fields.
getTemplateFilenames in interface VradiStorageService
public void setAssociatedFields(java.lang.String extensionName,
java.lang.String templateName,
java.util.Map<java.lang.String,java.lang.String> fieldMap)
throws VradiException
VradiStorageService
setAssociatedFields in interface VradiStorageServiceVradiException
public java.lang.String generatePDF(Form form,
boolean force)
throws VradiException
VradiStorageService
generatePDF in interface VradiStorageServiceform - form to generate pdfforce - force regeneration
VradiException
public java.util.Map<java.lang.String,java.lang.String> getAssociatedFields(java.lang.String extensionName,
java.lang.String templateName)
throws VradiException
VradiStorageService
getAssociatedFields in interface VradiStorageServicenull is there is no association yet
VradiException
public java.util.Map<Group,java.util.List<QueryBean>> getQueriesToModifyAfterThesaurusModification(java.lang.String rootThesaurusName,
java.lang.String thesaurusName)
VradiStorageService
getQueriesToModifyAfterThesaurusModification in interface VradiStorageServicerootThesaurusName - the modified root thesaurus name nodethesaurusName - the modified thesaurus name node
public java.util.List<java.lang.String> getDocumentFields(org.nuiton.wikitty.WikittyExtension extension,
java.lang.String templateName)
throws VradiException
VradiStorageService
getDocumentFields in interface VradiStorageServiceextension - extensiontemplateName - template name
VradiException
protected java.util.List<java.io.File> generateFilledDocumentInPDF(java.io.File template,
java.util.List<Form> forms,
java.util.Map<java.lang.String,java.lang.String> fieldBindings,
boolean replace)
throws VradiException
template - template to use to generate PDFforms - to to generatefieldBindings - map between template field name and form fields namesreplace - replace already existing generated forms
VradiException
protected java.io.File generateFilledDocumentInPDF(TemplateManager templateManager,
Form form,
java.util.Map<java.lang.String,java.lang.String[]> fieldBindings,
boolean replace)
throws VradiException
templateManager - pdf template managerform - form to get pdffieldBindings - association between field name and form fields (couple extension name, extension field)replace - replace already existing pdf
VradiException
public Session sendMessages(java.lang.String sessionId)
throws VradiException
sendMessages in interface VradiStorageServiceVradiException
public Sending sendMessage(java.lang.String sendingId,
java.lang.String sessionParagraph)
throws VradiException
sendMessage in interface VradiStorageServiceVradiException
public Sending sendMessage(java.lang.String sendingId,
java.lang.String sessionParagraph,
java.lang.String email)
throws VradiException
sendMessage in interface VradiStorageServiceVradiException
public void receiveMessages()
throws VradiException
receiveMessages in interface VradiStorageServiceVradiException
public Session stopSentMail(Session session)
throws VradiException
stopSentMail in interface VradiStorageServiceVradiExceptionpublic java.lang.String[] getXmlStreamConfig()
getXmlStreamConfig in interface VradiStorageServicepublic java.util.List<java.lang.String> getAllWebHarvestScripts()
VradiStorageService
getAllWebHarvestScripts in interface VradiStorageServicepublic void generatePDFForSession(java.lang.String sessionId)
generatePDFForSession in interface VradiStorageServicesessionId - the session wikitty id
public java.util.List<Group> getGroupsForUser(java.lang.String userId)
throws VradiException
getGroupsForUser in interface VradiStorageServiceuserId - the user we want the groups of
VradiException
public java.lang.String exportClientDB()
throws VradiException
VradiStorageService
exportClientDB in interface VradiStorageServiceVradiException - if any error happen during export
public Status getStatus(VradiConstants.FormStatus formStatus)
throws VradiException
getStatus in interface VradiStorageServiceformStatus - the status from enum
VradiException - if an error occur during statuses initialisation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||