|
||||||||||
| 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 org.nuiton.util.ApplicationConfig |
config
|
protected FileService |
fileService
|
protected FormManager |
formManager
|
protected FormTypeManager |
formTypeManager
|
protected org.nuiton.wikitty.addons.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.util.ApplicationConfig config,
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(String sessionId,
Group group,
List<String> formsIdsToBind)
Create new Sending |
List<Status> |
createDefaultStatuses()
Create all default status. |
Session |
createNewSession()
|
Sending |
createSending(String sessionId,
User user,
List<String> formsIdsToBind)
Create new Sending |
VradiUser |
createUser(VradiUser user)
Create a VradiUser. |
void |
deleteSession(String sessionId)
Delete session and sending associated This method return a VradiException if session to delete is not active |
String |
exportAsCSV(org.nuiton.wikitty.search.Criteria criteria)
Get csv export. |
String |
exportClientDB()
Export all the clients, users and groups in database |
String |
exportThesaurusAsCSV()
Export thesaurus as csv |
protected String |
formatSessionLog(List<String> logs)
|
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(String formId,
boolean force)
Generate pdf file for specified form. |
void |
generatePDFForSession(String sessionId)
Generate all the PDFs needed to send a session. |
Map<String,String> |
getAssociatedFields(String extensionName,
String templateName)
Get association between template fields and extension fields. |
List<String> |
getDocumentFields(org.nuiton.wikitty.entities.WikittyExtension extension,
String templateName)
Get template document fields names. |
List<Group> |
getGroupsForUser(String userId)
Get all the groups a user is in. |
protected org.nuiton.wikitty.addons.WikittyImportExportService |
getImportExportService()
Get WikittyImportExportService singl instance. |
Collection<String> |
getTemplateFilenames(org.nuiton.wikitty.entities.WikittyExtension extension)
Lists the template filename (simple name) associated with the specified extension. |
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. |
void |
receiveMessages()
|
void |
reindexData()
Reindex the datas. |
List<Sending> |
removeAllSending(String sessionId,
List<String> formsIds,
Group group)
Remove all sending corresponding with form and group from session |
boolean |
removeFormsFromSession(String sessionId,
List<String> formsIds)
Check if template file form extension name in param |
Sending |
removeSending(String sessionId,
List<String> formsIds,
User user)
Remove sending corresponding with form and user from session |
Sending |
revertDeletion(String sendingId,
List<String> formsIdsToUpdate)
Method call to revert froms deleted in sending |
List<Sending> |
revertGroupDeletion(String sessionId,
String groupId,
String formId)
Revert forms deleted for group |
Sending |
revertUserDeletion(String sessionId,
String userId,
String formId)
Revert forms deleted for user |
String |
sendMessage(String sendingId,
String sessionParagraph,
Collection<File> filesToAttach)
Send sending pass in param to sending user email |
String |
sendMessage(String sendingId,
String sessionParagraph,
String email,
boolean reSend,
Collection<File> filesToAttach)
|
String |
sendMessage(String sendingId,
String sessionParagraph,
String email,
Collection<File> filesToAttach)
Send sending pass in param to specific email |
String |
sendMessages(String sessionId)
Send session pass in param |
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.util.ApplicationConfig config
protected org.nuiton.wikitty.WikittyProxy wikittyProxy
protected org.nuiton.wikitty.addons.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
protected FileService fileService
| Constructor Detail |
|---|
public VradiStorageServiceImpl()
protected VradiStorageServiceImpl(org.nuiton.util.ApplicationConfig config,
org.nuiton.wikitty.WikittyProxy wikittyProxy)
config - vradi configwikittyProxy - custom wikitty proxy| Method Detail |
|---|
protected org.nuiton.wikitty.addons.WikittyImportExportService getImportExportService()
WikittyImportExportService singl instance.
public List<Status> createDefaultStatuses()
throws VradiException
createDefaultStatuses in interface VradiStorageServiceVradiException
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(String sessionId,
Group group,
List<String> formsIdsToBind)
throws VradiException
VradiStorageService
createAllSending in interface VradiStorageServiceVradiException
public Sending createSending(String sessionId,
User user,
List<String> formsIdsToBind)
throws VradiException
VradiStorageService
createSending in interface VradiStorageServiceVradiException
public List<Sending> removeAllSending(String sessionId,
List<String> formsIds,
Group group)
throws VradiException
VradiStorageService
removeAllSending in interface VradiStorageServiceformsIds - concerned
VradiException
public Sending removeSending(String sessionId,
List<String> formsIds,
User user)
throws VradiException
VradiStorageService
removeSending in interface VradiStorageServiceformsIds - concerned
VradiException
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.search.Criteria criteria)
throws VradiException
VradiStorageService
exportAsCSV in interface VradiStorageServicecriteria - export criteria
VradiException - if any error happen during export
public String exportThesaurusAsCSV()
throws VradiException
VradiStorageService
exportThesaurusAsCSV in interface VradiStorageServiceVradiException - if any error happen during exportpublic void reindexData()
VradiStorageService
reindexData in interface VradiStorageService
public void archiveQueries(QueryMaker queryMaker)
throws VradiException
VradiStorageService
archiveQueries in interface VradiStorageServicequeryMaker - the query maker whose queries are archived
VradiException
public void setAssociatedFields(String extensionName,
String templateName,
Map<String,String> fieldMap)
throws VradiException
VradiStorageService
setAssociatedFields in interface VradiStorageServiceVradiException
public String generatePDF(String formId,
boolean force)
throws VradiException
VradiStorageService
generatePDF in interface VradiStorageServiceformId - form id to generate pdfforce - force regeneration
VradiExceptionpublic Collection<String> getTemplateFilenames(org.nuiton.wikitty.entities.WikittyExtension extension)
VradiStorageServiceWikittyExtension
doesn't have a files fields.
getTemplateFilenames in interface VradiStorageService
public Map<String,String> getAssociatedFields(String extensionName,
String templateName)
throws VradiException
VradiStorageService
getAssociatedFields in interface VradiStorageServicenull is there is no association yet
VradiException
public List<String> getDocumentFields(org.nuiton.wikitty.entities.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 - for various possible errors
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 - for various possible errors
public String sendMessages(String sessionId)
throws VradiException
VradiStorageService
sendMessages in interface VradiStorageServicesessionId - session id concerned
VradiException - exception is occured
public String sendMessage(String sendingId,
String sessionParagraph,
Collection<File> filesToAttach)
throws VradiException
VradiStorageService
sendMessage in interface VradiStorageServicesendingId - sending id concernedsessionParagraph - paragraph to sendfilesToAttach - file to attache
VradiException - exception is occured
public String sendMessage(String sendingId,
String sessionParagraph,
String email,
Collection<File> filesToAttach)
throws VradiException
VradiStorageService
sendMessage in interface VradiStorageServicesendingId - sending id concernedsessionParagraph - paragraph to sendemail - specificfilesToAttach - file to attach
VradiException - exception is occured
public String sendMessage(String sendingId,
String sessionParagraph,
String email,
boolean reSend,
Collection<File> filesToAttach)
throws VradiException
VradiExceptionprotected String formatSessionLog(List<String> logs)
public void receiveMessages()
throws VradiException
receiveMessages in interface VradiStorageServiceVradiException
public Session stopSentMail(Session session)
throws VradiException
stopSentMail in interface VradiStorageServiceVradiException
public void generatePDFForSession(String sessionId)
throws VradiException
generatePDFForSession in interface VradiStorageServicesessionId - the session wikitty id
VradiException
public List<Group> getGroupsForUser(String userId)
throws VradiException
userId - the user we want the groups of
VradiException - for various possible errors
public String exportClientDB()
throws VradiException
VradiStorageService
exportClientDB in interface VradiStorageServiceVradiException - if any error happen during export
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 checkTemplateExist(String extensionName)
throws VradiException
VradiStorageService
checkTemplateExist in interface VradiStorageServiceextensionName - to check
VradiException - if an error occur during checking template
public boolean removeFormsFromSession(String sessionId,
List<String> formsIds)
throws VradiException
VradiStorageService
removeFormsFromSession in interface VradiStorageServiceformsIds - to update
VradiException - if an error occur during checking template
public Sending revertDeletion(String sendingId,
List<String> formsIdsToUpdate)
VradiStorageService
revertDeletion in interface VradiStorageServicesendingId - to updateformsIdsToUpdate - deleted to revert
public Sending revertUserDeletion(String sessionId,
String userId,
String formId)
VradiStorageService
revertUserDeletion in interface VradiStorageServicesessionId - session concerneduserId - user concernedformId - form to revert
public List<Sending> revertGroupDeletion(String sessionId,
String groupId,
String formId)
VradiStorageService
revertGroupDeletion in interface VradiStorageServicesessionId - session concernedgroupId - user concernedformId - form to revert
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||