|
||||||||||
| 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 MailingManager |
mailingManager
|
protected SearchManager |
searchManager
|
protected TasksManager |
tasksManager
|
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. |
Session |
bindForms(Session session)
Binds all queryMaker with the forms found by their queries and not already sent. |
boolean |
checkTemplateExist(String extensionName)
Check if template file form extension name in param |
List<Sending> |
createAllSending(Session session,
Group group,
List<Form> formsToBind)
Create new Sending |
List<Status> |
createDefaultStatuses()
Creation of default status Warn, dont use it otherwise for vradi initialisation !!! |
Session |
createNewSession()
|
Sending |
createSending(Session session,
User user,
List<Form> formsToBind)
Create new Sending |
VradiUser |
createUser(VradiUser user)
Create a VradiUser. |
void |
deleteClient(String clientId)
Delete client, users associated and user groups association |
void |
deleteGroup(String groupId)
Delete group |
void |
deleteSession(String sessionId)
Delete session and sending associated This method return a VradiException if session to delete is not active |
boolean |
deleteStatus(List<String> statusIds)
Delete status if no form is use this |
void |
deleteUser(String userId)
Delete users, and groups association |
String |
exportAsCSV(org.nuiton.wikitty.Criteria criteria)
Get csv export. |
String |
exportClientDB()
Export all the clients, users and groups in database |
Map<Group,List<QueryBean>> |
findQueriesReturningForm(Form form)
Computes a list of queries returning the specified Form. |
protected List<File> |
generateFilledDocumentInPDF(File template,
List<Form> forms,
Map<String,String> fieldBindings,
boolean replace)
Generate offer PDF form given forms with specified template. |
protected File |
generateFilledDocumentInPDF(TemplateManager templateManager,
Form form,
Map<String,String[]> fieldBindings,
boolean replace)
Generate a single pdf file for specified form. |
String |
generatePDF(Form form,
boolean force)
Generate pdf file for specified form. |
void |
generatePDFForSession(String sessionId)
Generate all the PDFs needed to send a session. |
List<String> |
getAllWebHarvestScripts()
Get all WebHarvest script name in server's WebHarvest directory. |
Map<String,String> |
getAssociatedFields(String extensionName,
String templateName)
Get association between template fields and extension fields. |
List<String> |
getDocumentFields(org.nuiton.wikitty.WikittyExtension extension,
String templateName)
Get template document fields names. |
org.nuiton.wikitty.WikittyExtension |
getFormType(String name)
Returns a form type with the specified name. |
Map<String,org.nuiton.wikitty.FieldType> |
getFormTypeFields(String name)
Finds fields of a form type. |
List<Group> |
getGroupsForUser(String userId)
Get all the groups a user is in. |
protected org.nuiton.wikitty.WikittyImportExportService |
getImportExportService()
Get WikittyImportExportService singl instance. |
Session |
getLastCloseSession()
Get last closed session |
Session |
getLastOpenSession()
Get last opened session |
Map<Group,List<QueryBean>> |
getQueriesToModifyAfterThesaurusModification(String rootThesaurusName,
String thesaurusName)
Gets the query makers whose queries are potentially to modify after a thesaurus node modification |
Session |
getSessionOfSending(String sendingId)
Get session contain sending |
List<Session> |
getSessions(Date sessionDate)
Get all session by date |
Status |
getStatus(VradiConstants.FormStatus formStatus)
Get the status passed in parameter. |
Collection<String> |
getTemplateFilenames(org.nuiton.wikitty.WikittyExtension extension)
Lists the template filename (simple name) associated with the specified extension. |
String |
getWebHarvestPreviewURL(WebHarvestStream stream)
Get web harvest preview url from script |
void |
importAsCSV(String uri)
Import all data as CSV. |
XmlStreamImportResult |
importFormsFromWebHarvestStream(WebHarvestStream webHarvestStream)
Creates and store forms from an WebHarvestStream by using the XmlStreamBinding
to link xml stream field values with form fields. |
XmlStreamImportResult |
importFormsFromXmlStream(XmlStream xmlStream)
Creates and store forms from an XmlStream by using the XmlStreamBinding
to link xml stream field values with form fields. |
VradiUser |
loginUser(String login,
String mp5password)
Checks if userName and userPassword matches a valid VradiUser. |
List<Thesaurus> |
proposeThesaurus(Form form)
Propose thesaurus nodes that might be in relation with a specified form |
void |
receiveMessages()
|
void |
reindexData()
Reindex the datas. |
List<Sending> |
removeAllSending(Session session,
Form form,
Group group)
Remove all sending corresponding with form and group from session |
boolean |
removeFormsFromSession(List<Form> forms)
Check if template file form extension name in param |
Sending |
removeSending(Session session,
Form form,
User user)
Remove sending corresponding with form and user from session |
Sending |
sendMessage(String sendingId,
String sessionParagraph)
|
Sending |
sendMessage(String sendingId,
String sessionParagraph,
String email)
|
Session |
sendMessages(String sessionId)
|
void |
setAssociatedFields(String extensionName,
String templateName,
Map<String,String> fieldMap)
Save association between template fields and extensions fields. |
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 TasksManager tasksManager
| Constructor Detail |
|---|
public VradiStorageServiceImpl()
protected VradiStorageServiceImpl(org.nuiton.wikitty.WikittyProxy wikittyProxy)
wikittyProxy - custom wikitty proxy| Method Detail |
|---|
protected org.nuiton.wikitty.WikittyImportExportService getImportExportService()
WikittyImportExportService singl instance.
public void deleteClient(String clientId)
throws VradiException
VradiStorageService
deleteClient in interface VradiStorageServiceclientId - to delete
VradiException
public void deleteUser(String userId)
throws VradiException
VradiStorageService
deleteUser in interface VradiStorageServiceuserId - to delete
VradiException
public void deleteGroup(String groupId)
throws VradiException
VradiStorageService
deleteGroup in interface VradiStorageServicegroupId - to delete
VradiException
public List<Status> createDefaultStatuses()
throws VradiException
VradiStorageService
createDefaultStatuses in interface VradiStorageServiceVradiException
public Map<Group,List<QueryBean>> findQueriesReturningForm(Form form)
throws VradiException
VradiStorageServiceForm.
findQueriesReturningForm in interface VradiStorageServiceform - the form which match queries
VradiException
public org.nuiton.wikitty.WikittyExtension getFormType(String name)
throws VradiException
VradiStorageServicename.
getFormType in interface VradiStorageServicename - the name of the form type
WikittyExtension
VradiException
public Map<String,org.nuiton.wikitty.FieldType> getFormTypeFields(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 List<Sending> createAllSending(Session session,
Group group,
List<Form> formsToBind)
throws VradiException
VradiStorageService
createAllSending in interface VradiStorageServiceVradiException
public Sending createSending(Session session,
User user,
List<Form> formsToBind)
throws VradiException
VradiStorageService
createSending in interface VradiStorageServiceVradiException
public List<Sending> removeAllSending(Session session,
Form form,
Group group)
throws VradiException
VradiStorageService
removeAllSending in interface VradiStorageServicesession - concernedform - concerned
VradiException
public Sending removeSending(Session session,
Form form,
User user)
throws VradiException
VradiStorageService
removeSending in interface VradiStorageServicesession - concernedform - concerned
VradiException
public List<Session> getSessions(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 String getWebHarvestPreviewURL(WebHarvestStream stream)
throws VradiException
VradiStorageService
getWebHarvestPreviewURL in interface VradiStorageServiceVradiException
public XmlStreamImportResult importFormsFromWebHarvestStream(WebHarvestStream webHarvestStream)
throws VradiException
WebHarvestStream by using the XmlStreamBinding
to link xml stream field values with form fields.
Input xmlStream is modified by this method (wikitty obselete).
importFormsFromWebHarvestStream in interface VradiStorageServicewebHarvestStream - stream to import
VradiException - for various possible errors
public XmlStreamImportResult importFormsFromXmlStream(XmlStream xmlStream)
throws VradiException
XmlStream by using the XmlStreamBinding
to link xml stream field values with form fields.
Input xmlStream is modified by this method (wikitty obselete).
importFormsFromXmlStream in interface VradiStorageServicexmlStream - stream to import
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(String login,
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(String uri)
throws VradiException
VradiStorageService
importAsCSV in interface VradiStorageServiceuri - uri used to read input stream
VradiException - if any error happen during import
public 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 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
VradiExceptionpublic Collection<String> getTemplateFilenames(org.nuiton.wikitty.WikittyExtension extension)
VradiStorageServiceWikittyExtension
doesn't have a files fields.
getTemplateFilenames in interface VradiStorageService
public void setAssociatedFields(String extensionName,
String templateName,
Map<String,String> fieldMap)
throws VradiException
VradiStorageService
setAssociatedFields in interface VradiStorageServiceVradiException
public String generatePDF(Form form,
boolean force)
throws VradiException
VradiStorageService
generatePDF in interface VradiStorageServiceform - form to generate pdfforce - force regeneration
VradiException
public Map<String,String> getAssociatedFields(String extensionName,
String templateName)
throws VradiException
VradiStorageService
getAssociatedFields in interface VradiStorageServicenull is there is no association yet
VradiException
public Map<Group,List<QueryBean>> getQueriesToModifyAfterThesaurusModification(String rootThesaurusName,
String thesaurusName)
VradiStorageService
getQueriesToModifyAfterThesaurusModification in interface VradiStorageServicerootThesaurusName - the modified root thesaurus name nodethesaurusName - the modified thesaurus name node
public List<String> getDocumentFields(org.nuiton.wikitty.WikittyExtension extension,
String templateName)
throws VradiException
VradiStorageService
getDocumentFields in interface VradiStorageServiceextension - extensiontemplateName - template name
VradiException
protected List<File> generateFilledDocumentInPDF(File template,
List<Form> forms,
Map<String,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 File generateFilledDocumentInPDF(TemplateManager templateManager,
Form form,
Map<String,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(String sessionId)
throws VradiException
sendMessages in interface VradiStorageServiceVradiException
public Sending sendMessage(String sendingId,
String sessionParagraph)
throws VradiException
sendMessage in interface VradiStorageServiceVradiException
public Sending sendMessage(String sendingId,
String sessionParagraph,
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 List<String> getAllWebHarvestScripts()
VradiStorageService
getAllWebHarvestScripts in interface VradiStorageServicepublic void generatePDFForSession(String sessionId)
generatePDFForSession in interface VradiStorageServicesessionId - the session wikitty id
public List<Group> getGroupsForUser(String userId)
throws VradiException
getGroupsForUser in interface VradiStorageServiceuserId - the user we want the groups of
VradiException
public 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
public Session getSessionOfSending(String sendingId)
throws VradiException
VradiStorageService
getSessionOfSending in interface VradiStorageServicesendingId - concerned
VradiException - if an error occur
public void deleteSession(String sessionId)
throws VradiException
VradiStorageServiceVradiException if session to delete is not active
deleteSession in interface VradiStorageServicesessionId - to delete
VradiException - if an error occur during session deletion
public boolean deleteStatus(List<String> statusIds)
throws VradiException
VradiStorageService
deleteStatus in interface VradiStorageServicestatusIds - to delete
VradiException - is occured if status deletion is aborded
public boolean checkTemplateExist(String extensionName)
throws VradiException
VradiStorageService
checkTemplateExist in interface VradiStorageServiceextensionName - to check
VradiException - if an error occur during checking template
public boolean removeFormsFromSession(List<Form> forms)
throws VradiException
VradiStorageService
removeFormsFromSession in interface VradiStorageServiceforms - to update
VradiException - if an error occur during checking template
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||