|
||||||||||
| 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
| Field Summary | |
|---|---|
protected BindingManager |
bindingManager
|
protected ClientManager |
clientManager
|
static String |
DEFAULT_SENDING_PARAGRAPH
|
static SimpleDateFormat |
FORM_ID_DATE_FORMAT
Form Id date format |
protected FormManager |
formManager
|
protected FormTypeManager |
formTypeManager
|
protected org.sharengo.wikitty.WikittyProxy |
proxy
Proxy to store and retrieve data. |
protected SearchManager |
searchManager
|
protected ThesaurusManager |
thesaurusManager
|
| Constructor Summary | |
|---|---|
VradiStorageServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
bindFormsToClients()
Binds all clients with the forms found by their queries and not already sent. |
void |
changeDataDir(String newDataDir,
String oldDataDir)
Changes datas directory. |
void |
deleteEntity(org.sharengo.wikitty.BusinessEntity entity)
Delete the specified BusinessEntity. |
void |
deleteForm(String formId)
Deletes a Form by the specified formId. |
void |
deleteStatus(String statusId)
Deletes a Status. |
void |
deleteStatuses(List<String> statusIds)
Deletes a list of Status. |
String |
exportData()
Export the datas into an XML format. |
void |
findForms(String query,
VradiFormPageDTO formPageDTO)
Searches for forms with the specified query. |
void |
findForms(String query,
org.sharengo.wikitty.WikittyExtension extension,
String dateType,
Date beginDate,
Date endDate,
List<String>[] thesaurus,
VradiFormPageDTO formPageDTO)
Searches for forms with the specified filters. |
List<Client> |
getAllClients()
Returns all the clients. |
List<Form> |
getAllForms()
Returns all Forms. |
List<org.sharengo.wikitty.WikittyExtension> |
getAllFormTypes()
Returns all Form Types. |
List<Group> |
getAllGroups()
Returns all the groups. |
List<Status> |
getAllStatuses()
Returns all Status. |
List<org.sharengo.wikitty.TreeNode> |
getAllThesaurus()
Returns all TreeNode considered as thesaurus nodes. |
List<User> |
getAllUsers()
Returns all the Users. |
List<XmlStream> |
getAllXmlStreams()
Returns all XmlStreams. |
List<org.sharengo.wikitty.TreeNode> |
getChildrenThesaurus(String thesaurusId)
Returns all children of the specified thesaurusId. |
Client |
getClient(String clientId)
Returns a Client with the specified clientId. |
Client |
getClientByUserId(String userId)
Returns a Client whose specified userId belongs. |
Map<Form,List<Client>> |
getClientsByForms(String dateType,
Date beginDate,
Date endDate,
org.sharengo.wikitty.WikittyExtension extension)
Computes a map of Clients indexed by Forms. |
List<User> |
getClientUsers(String clientId)
Returns a list of Users belonging to the specified clientId. |
org.sharengo.wikitty.BusinessEntity |
getEntity(String id,
Class<? extends org.sharengo.wikitty.BusinessEntity> clazz)
Returns a BusinessEntity of the specified id and clazz. |
Form |
getForm(String formId)
Returns a Form with the specified formId. |
List<Form> |
getForms(List<String> formIds)
Returns all the Forms with the specified list of formIds. |
List<VradiSendingDTO> |
getFormsByClients(String dateType,
Date beginDate,
Date endDate,
org.sharengo.wikitty.WikittyExtension extension,
Boolean receptionProof,
Boolean paragraph,
int status)
Computes all forms by clients, status and sent date with a filter. |
Object[] |
getFormsFromXmlStream(XmlStream xmlStream,
String lastItemRecorded,
VradiUser vradiUser)
Creates and store forms from an XmlStream by using the XmlStreamBinding
to link xml stream field values with form fields. |
org.sharengo.wikitty.WikittyExtension |
getFormType(String name)
Returns a form type with the specified name. |
Map<String,org.sharengo.wikitty.FieldType> |
getFormTypeFields(String name)
Finds fields of a form type. |
Group |
getGroup(String groupId)
Returns a Group with the specified groupId. |
List<Client> |
getGroupClients(String groupId)
Returns a list of Clients belonging to the specified groupId. |
List<Group> |
getGroupsByClientId(String clientId)
Returns a list of Group that the specified clientId belongs. |
List<Group> |
getGroupsByUserId(String userId)
Returns a list of Group that the specified userId belongs. |
List<User> |
getGroupUsers(String groupId)
Returns a list of Users belonging to the specified groupId. |
Map<org.sharengo.wikitty.TreeNode,Integer> |
getNbFormsByThesaurus()
Computes the number of forms associated with every thesaurus node. |
int |
getNbFormsForThesaurus(String thesaurusId)
Computes the number of forms associated with the specified thesaurusId. |
List<String> |
getQueriesReturningForm(Form form)
Computes a list of queries returning the specified Form. |
org.sharengo.wikitty.TreeNode |
getRootThesaurus()
Returns the root Thesaurus Node. |
Status |
getStatus(String statusId)
Returns a Status with the specified statusId. |
List<Status> |
getStatuses(List<String> statusIds)
Returns a list of Status with the specified
statusIds. |
org.sharengo.wikitty.TreeNode |
getThesaurus(String thesaurusId)
Returns a TreeNode with the specified thesaurusId. |
Status |
getToTreatStatus()
Get the unmodifiable status 'to treat' |
User |
getUser(String userId)
Returns a User with the specified userId. |
Status |
getValidatedStatus()
Get the unmodifiable status 'validated' |
XmlFieldBinding |
getXmlFieldBinding(String xmlFieldBindingId)
Returns a XmlFieldBinding with the specified xmlFieldBindingId. |
List<XmlFieldBinding> |
getXmlFieldBindings(XmlStream xmlStream)
Returns a list of XmlFieldBinding belonging to the specified xmlStream. |
XmlStream |
getXmlStream(String xmlStreamId)
Returns a XmlStream with the specified xmlStreamId. |
void |
importData(File file)
Import data from an XML file. |
VradiUser |
logVradiUser(String vradiUserName,
String vradiUserPassword)
Checks if userName and userPassword matches a valid VradiUser. |
List<org.sharengo.wikitty.TreeNode> |
proposeThesaurus(Form form,
List<org.sharengo.wikitty.TreeNode> thesaurus)
Propose thesaurus nodes that might be in relation with a specified form |
void |
reindexData()
Reindex the datas. |
org.sharengo.wikitty.BusinessEntity |
updateEntity(org.sharengo.wikitty.BusinessEntity entity)
Updates the specified BusinessEntity. |
Form |
updateForm(Form form)
Creates or Update the specified form. |
List<Form> |
updateForms(List<Form> forms)
Create or Update a list of Forms. |
org.sharengo.wikitty.WikittyExtension |
updateFormType(String name,
Map<String,org.sharengo.wikitty.FieldType> fields,
String requires,
Map<String,String> tagValues)
Creates or Update a form type. |
org.sharengo.wikitty.WikittyExtension |
updateFormType(org.sharengo.wikitty.WikittyExtension extension)
Creates or Update a form type. |
void |
updateSendings(List<Sending> sendings)
Update a list of Sending. |
Status |
updateStatus(Status status)
Updates a Status. |
List<Status> |
updateStatuses(List<Status> statuses)
Updates a list of Status. |
VradiUser |
updateVradiUser(VradiUser vradiUser)
Updates a VradiUser. |
List<XmlFieldBinding> |
updateXmlFieldBindings(List<XmlFieldBinding> bindings)
Update a list of XmlFieldBinding. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.sharengo.wikitty.WikittyProxy proxy
protected ThesaurusManager thesaurusManager
protected BindingManager bindingManager
protected FormManager formManager
protected FormTypeManager formTypeManager
protected ClientManager clientManager
protected SearchManager searchManager
public static final SimpleDateFormat FORM_ID_DATE_FORMAT
public static final String DEFAULT_SENDING_PARAGRAPH
| Constructor Detail |
|---|
public VradiStorageServiceImpl()
| Method Detail |
|---|
public org.sharengo.wikitty.BusinessEntity getEntity(String id,
Class<? extends org.sharengo.wikitty.BusinessEntity> clazz)
throws TechnicalException
VradiStorageServiceBusinessEntity of the specified id and clazz.
getEntity in interface VradiStorageServiceid - the id of the entityclazz - the class of the entity
BusinessEntity
TechnicalException
public org.sharengo.wikitty.BusinessEntity updateEntity(org.sharengo.wikitty.BusinessEntity entity)
throws TechnicalException
VradiStorageServiceBusinessEntity.
updateEntity in interface VradiStorageServiceentity - the entity to update
TechnicalException
public void deleteEntity(org.sharengo.wikitty.BusinessEntity entity)
throws TechnicalException
VradiStorageServiceBusinessEntity.
deleteEntity in interface VradiStorageServiceentity - the entity to delete
TechnicalException
public User getUser(String userId)
throws TechnicalException
VradiStorageServiceUser with the specified userId.
getUser in interface VradiStorageServiceuserId - the id of the user
User
TechnicalException
public Client getClient(String clientId)
throws TechnicalException
VradiStorageServiceClient with the specified clientId.
getClient in interface VradiStorageServiceclientId - the id of the client
Client
TechnicalException
public Group getGroup(String groupId)
throws TechnicalException
VradiStorageServiceGroup with the specified groupId.
getGroup in interface VradiStorageServicegroupId - the id of the group
Group
TechnicalException
public List<User> getGroupUsers(String groupId)
throws TechnicalException
VradiStorageServiceUsers belonging to the specified groupId.
getGroupUsers in interface VradiStorageServicegroupId - the id of the group
Users
TechnicalException
public List<User> getClientUsers(String clientId)
throws TechnicalException
VradiStorageServiceUsers belonging to the specified clientId.
getClientUsers in interface VradiStorageServiceclientId - the id of the client
Users
TechnicalException
public List<Client> getGroupClients(String groupId)
throws TechnicalException
VradiStorageServiceClients belonging to the specified groupId.
getGroupClients in interface VradiStorageServicegroupId - the id of the group
Clients
TechnicalException
public Client getClientByUserId(String userId)
throws TechnicalException
VradiStorageServiceClient whose specified userId belongs.
getClientByUserId in interface VradiStorageServiceuserId - the id of the user
Client
TechnicalException
public List<Group> getGroupsByUserId(String userId)
throws TechnicalException
VradiStorageServiceGroup that the specified userId belongs.
getGroupsByUserId in interface VradiStorageServiceuserId - the id of the user
Group
TechnicalException
public List<Group> getGroupsByClientId(String clientId)
throws TechnicalException
VradiStorageServiceGroup that the specified clientId belongs.
getGroupsByClientId in interface VradiStorageServiceclientId - the id of the client
Group
TechnicalException
public List<Client> getAllClients()
throws TechnicalException
VradiStorageService
getAllClients in interface VradiStorageServiceTechnicalException
public List<User> getAllUsers()
throws TechnicalException
VradiStorageServiceUsers.
getAllUsers in interface VradiStorageServiceUser
TechnicalException
public List<Group> getAllGroups()
throws TechnicalException
VradiStorageService
getAllGroups in interface VradiStorageServiceTechnicalException
public Form updateForm(Form form)
throws TechnicalException
VradiStorageServiceform.
updateForm in interface VradiStorageServiceform - the form to create or update
Form
TechnicalException
public List<Form> updateForms(List<Form> forms)
throws TechnicalException
VradiStorageServiceForms.
updateForms in interface VradiStorageServiceforms - the list of forms to insert or update
Form
TechnicalException
public void findForms(String query,
VradiFormPageDTO formPageDTO)
throws UnsupportedQueryException
VradiStorageService
findForms in interface VradiStorageServicequery - the query to filter the formsformPageDTO - ...
UnsupportedQueryException
public void findForms(String query,
org.sharengo.wikitty.WikittyExtension extension,
String dateType,
Date beginDate,
Date endDate,
List<String>[] thesaurus,
VradiFormPageDTO formPageDTO)
throws UnsupportedQueryException
VradiStorageServicebeginDate and endDate specifies a
date range filter which is applied on dateType field.
The date range filter is applied only if the three parameters are not null.
findForms in interface VradiStorageServicequery - the query filterextension - the extension filterdateType - the date field. Must be fully qualified (extension.field)beginDate - the begin date filterendDate - the end date filterformPageDTO - ...
UnsupportedQueryException
public List<String> getQueriesReturningForm(Form form)
throws TechnicalException
VradiStorageServiceForm.
getQueriesReturningForm in interface VradiStorageServiceform - the form which match queries
TechnicalExceptionpublic List<org.sharengo.wikitty.WikittyExtension> getAllFormTypes()
VradiStorageService
getAllFormTypes in interface VradiStorageServiceWikittyExtensionpublic org.sharengo.wikitty.WikittyExtension getFormType(String name)
VradiStorageServicename.
getFormType in interface VradiStorageServicename - the name of the form type
WikittyExtensionpublic Map<String,org.sharengo.wikitty.FieldType> getFormTypeFields(String name)
VradiStorageService
getFormTypeFields in interface VradiStorageServicename - the name of the form type
public org.sharengo.wikitty.WikittyExtension updateFormType(String name,
Map<String,org.sharengo.wikitty.FieldType> fields,
String requires,
Map<String,String> tagValues)
VradiStorageService
updateFormType in interface VradiStorageServicename - the name of the form typefields - the fields of the form typerequires - the extension requred by the extension to updatetagValues - the map containing the tags and their values
WikittyExtensionpublic org.sharengo.wikitty.WikittyExtension updateFormType(org.sharengo.wikitty.WikittyExtension extension)
VradiStorageService
updateFormType in interface VradiStorageServiceextension - the extension designing the form type
WikittyExtensionpublic Form getForm(String formId)
VradiStorageServiceForm with the specified formId.
getForm in interface VradiStorageServiceformId - the id of the form
public void deleteForm(String formId)
VradiStorageServiceForm by the specified formId.
deleteForm in interface VradiStorageServiceformId - the id of the Form to deletepublic List<Form> getForms(List<String> formIds)
VradiStorageServiceForms with the specified list of formIds.
getForms in interface VradiStorageServiceformIds - the ids of the forms
Formpublic List<Form> getAllForms()
VradiStorageServiceForms.
getAllForms in interface VradiStorageServiceFormpublic List<XmlStream> getAllXmlStreams()
VradiStorageServiceXmlStreams.
getAllXmlStreams in interface VradiStorageServiceXmlStreampublic List<XmlFieldBinding> updateXmlFieldBindings(List<XmlFieldBinding> bindings)
VradiStorageServiceXmlFieldBinding.
updateXmlFieldBindings in interface VradiStorageServicebindings - the list of XmlFieldBinding to update
public XmlStream getXmlStream(String xmlStreamId)
throws TechnicalException
VradiStorageServiceXmlStream with the specified xmlStreamId.
getXmlStream in interface VradiStorageServicexmlStreamId - the id of the XmlStream
XmlStream
TechnicalExceptionpublic XmlFieldBinding getXmlFieldBinding(String xmlFieldBindingId)
VradiStorageServiceXmlFieldBinding with the specified xmlFieldBindingId.
getXmlFieldBinding in interface VradiStorageServicexmlFieldBindingId - the id of the XmlFieldBinding
XmlFieldBindingpublic List<XmlFieldBinding> getXmlFieldBindings(XmlStream xmlStream)
VradiStorageServiceXmlFieldBinding belonging to the specified xmlStream.
getXmlFieldBindings in interface VradiStorageServicexmlStream - the XmlStream
XmlFieldBindingpublic void bindFormsToClients()
VradiStorageService
bindFormsToClients in interface VradiStorageService
public List<VradiSendingDTO> getFormsByClients(String dateType,
Date beginDate,
Date endDate,
org.sharengo.wikitty.WikittyExtension extension,
Boolean receptionProof,
Boolean paragraph,
int status)
throws TechnicalException
VradiStorageService
getFormsByClients in interface VradiStorageServicedateType - the date field. Must be fully qualified (extension.field)beginDate - the begin date filterendDate - the end date filterextension - the extension filterreceptionProof - true if the sending must have a reception proofparagraph - the paragraph sent with the formsstatus - the status of the sending
TechnicalException
public Map<Form,List<Client>> getClientsByForms(String dateType,
Date beginDate,
Date endDate,
org.sharengo.wikitty.WikittyExtension extension)
VradiStorageServiceClients indexed by Forms.
getClientsByForms in interface VradiStorageServicedateType - the date field. Must be fully qualified (extension.field)beginDate - the begin date filterendDate - the end date filterextension - the extension filter
public Object[] getFormsFromXmlStream(XmlStream xmlStream,
String lastItemRecorded,
VradiUser vradiUser)
throws TechnicalException
VradiStorageServiceXmlStream by using the XmlStreamBinding
to link xml stream field values with form fields.
getFormsFromXmlStream in interface VradiStorageServicexmlStream - the xml stream to readlastItemRecorded - the encrypted value of the last read item
of the xml streamvradiUser - the VradiUser that launched the import
TechnicalException
public VradiUser updateVradiUser(VradiUser vradiUser)
throws TechnicalException
VradiStorageServiceVradiUser.
updateVradiUser in interface VradiStorageServicevradiUser - the VradiUser to update
TechnicalException
public VradiUser logVradiUser(String vradiUserName,
String vradiUserPassword)
VradiStorageServiceuserName and userPassword matches a valid VradiUser.
logVradiUser in interface VradiStorageServicevradiUserName - the username of a VradiUservradiUserPassword - the password of a VradiUser
VradiUser or null if either userName or userPassword don't matchpublic void updateSendings(List<Sending> sendings)
VradiStorageService
updateSendings in interface VradiStorageServicesendings - the list of Sending to update
public void importData(File file)
throws TechnicalException
VradiStorageService
importData in interface VradiStorageServicefile - the XML file containing datas
TechnicalException
public String exportData()
throws TechnicalException
VradiStorageService
exportData in interface VradiStorageServiceTechnicalExceptionpublic void reindexData()
VradiStorageService
reindexData in interface VradiStorageService
public void changeDataDir(String newDataDir,
String oldDataDir)
VradiStorageService
changeDataDir in interface VradiStorageServicenewDataDir - the new data directory patholdDataDir - the old data directory path.
If null, the data in the old directory will not be copied.
public org.sharengo.wikitty.TreeNode getRootThesaurus()
throws TechnicalException
VradiStorageService
getRootThesaurus in interface VradiStorageServiceTreeNode
TechnicalException
public List<org.sharengo.wikitty.TreeNode> getAllThesaurus()
throws TechnicalException
VradiStorageServiceTreeNode considered as thesaurus nodes.
getAllThesaurus in interface VradiStorageServiceTreeNode
TechnicalException
public org.sharengo.wikitty.TreeNode getThesaurus(String thesaurusId)
throws TechnicalException
VradiStorageServiceTreeNode with the specified thesaurusId.
getThesaurus in interface VradiStorageServicethesaurusId - the id of the thesaurus
TreeNode
TechnicalException
public List<org.sharengo.wikitty.TreeNode> getChildrenThesaurus(String thesaurusId)
throws TechnicalException
VradiStorageServicethesaurusId.
getChildrenThesaurus in interface VradiStorageServiceTreeNode
TechnicalException
public Map<org.sharengo.wikitty.TreeNode,Integer> getNbFormsByThesaurus()
throws TechnicalException
VradiStorageService
getNbFormsByThesaurus in interface VradiStorageServiceTechnicalException
public int getNbFormsForThesaurus(String thesaurusId)
throws TechnicalException
VradiStorageServicethesaurusId.
getNbFormsForThesaurus in interface VradiStorageServiceTechnicalException
public Status getStatus(String statusId)
throws TechnicalException
VradiStorageServiceStatus with the specified statusId.
getStatus in interface VradiStorageServicestatusId - the id of the status
Status
TechnicalException
public List<Status> getStatuses(List<String> statusIds)
throws TechnicalException
VradiStorageServiceStatus with the specified
statusIds.
getStatuses in interface VradiStorageServicestatusIds - the ids of the statuses
Status
TechnicalException
public List<Status> getAllStatuses()
throws TechnicalException
VradiStorageServiceStatus.
getAllStatuses in interface VradiStorageServiceStatus
TechnicalException
public Status updateStatus(Status status)
throws TechnicalException
VradiStorageServiceStatus.
updateStatus in interface VradiStorageServicestatus - the Status to update
Status updated
TechnicalException
public List<Status> updateStatuses(List<Status> statuses)
throws TechnicalException
VradiStorageServiceStatus.
updateStatuses in interface VradiStorageServicestatuses - the list of Status to update
Status updated
TechnicalException
public void deleteStatus(String statusId)
throws TechnicalException
VradiStorageServiceStatus.
deleteStatus in interface VradiStorageServicestatusId - the id of the Status to delete
TechnicalException
public void deleteStatuses(List<String> statusIds)
throws TechnicalException
VradiStorageServiceStatus.
deleteStatuses in interface VradiStorageServicestatusIds - the list of ids of the Status to delete
TechnicalExceptionpublic Status getToTreatStatus()
VradiStorageService
getToTreatStatus in interface VradiStorageServiceStatuspublic Status getValidatedStatus()
VradiStorageService
getValidatedStatus in interface VradiStorageServiceStatus
public List<org.sharengo.wikitty.TreeNode> proposeThesaurus(Form form,
List<org.sharengo.wikitty.TreeNode> thesaurus)
throws TechnicalException
VradiStorageService
proposeThesaurus in interface VradiStorageServiceform - the Form containing the information needed
to search the thesaurus nodesthesaurus - the list of all the tree nodes of the thesaurus
TreeNode
TechnicalException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||