com.jurismarches.vradi.services
Class VradiStorageServiceImpl

java.lang.Object
  extended by com.jurismarches.vradi.services.VradiStorageServiceImpl
All Implemented Interfaces:
VradiStorageService

public class VradiStorageServiceImpl
extends Object
implements VradiStorageService

Author:
morin

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

proxy

protected org.sharengo.wikitty.WikittyProxy proxy
Proxy to store and retrieve data.


thesaurusManager

protected ThesaurusManager thesaurusManager

bindingManager

protected BindingManager bindingManager

formManager

protected FormManager formManager

formTypeManager

protected FormTypeManager formTypeManager

clientManager

protected ClientManager clientManager

searchManager

protected SearchManager searchManager

FORM_ID_DATE_FORMAT

public static final SimpleDateFormat FORM_ID_DATE_FORMAT
Form Id date format


DEFAULT_SENDING_PARAGRAPH

public static final String DEFAULT_SENDING_PARAGRAPH
See Also:
Constant Field Values
Constructor Detail

VradiStorageServiceImpl

public VradiStorageServiceImpl()
Method Detail

getEntity

public org.sharengo.wikitty.BusinessEntity getEntity(String id,
                                                     Class<? extends org.sharengo.wikitty.BusinessEntity> clazz)
                                              throws TechnicalException
Description copied from interface: VradiStorageService
Returns a BusinessEntity of the specified id and clazz.

Specified by:
getEntity in interface VradiStorageService
Parameters:
id - the id of the entity
clazz - the class of the entity
Returns:
a BusinessEntity
Throws:
TechnicalException

updateEntity

public org.sharengo.wikitty.BusinessEntity updateEntity(org.sharengo.wikitty.BusinessEntity entity)
                                                 throws TechnicalException
Description copied from interface: VradiStorageService
Updates the specified BusinessEntity.

Specified by:
updateEntity in interface VradiStorageService
Parameters:
entity - the entity to update
Returns:
the updated entity
Throws:
TechnicalException

deleteEntity

public void deleteEntity(org.sharengo.wikitty.BusinessEntity entity)
                  throws TechnicalException
Description copied from interface: VradiStorageService
Delete the specified BusinessEntity.

Specified by:
deleteEntity in interface VradiStorageService
Parameters:
entity - the entity to delete
Throws:
TechnicalException

getUser

public User getUser(String userId)
             throws TechnicalException
Description copied from interface: VradiStorageService
Returns a User with the specified userId.

Specified by:
getUser in interface VradiStorageService
Parameters:
userId - the id of the user
Returns:
a User
Throws:
TechnicalException

getClient

public Client getClient(String clientId)
                 throws TechnicalException
Description copied from interface: VradiStorageService
Returns a Client with the specified clientId.

Specified by:
getClient in interface VradiStorageService
Parameters:
clientId - the id of the client
Returns:
a Client
Throws:
TechnicalException

getGroup

public Group getGroup(String groupId)
               throws TechnicalException
Description copied from interface: VradiStorageService
Returns a Group with the specified groupId.

Specified by:
getGroup in interface VradiStorageService
Parameters:
groupId - the id of the group
Returns:
a Group
Throws:
TechnicalException

getGroupUsers

public List<User> getGroupUsers(String groupId)
                         throws TechnicalException
Description copied from interface: VradiStorageService
Returns a list of Users belonging to the specified groupId.

Specified by:
getGroupUsers in interface VradiStorageService
Parameters:
groupId - the id of the group
Returns:
a list of Users
Throws:
TechnicalException

getClientUsers

public List<User> getClientUsers(String clientId)
                          throws TechnicalException
Description copied from interface: VradiStorageService
Returns a list of Users belonging to the specified clientId.

Specified by:
getClientUsers in interface VradiStorageService
Parameters:
clientId - the id of the client
Returns:
a list of Users
Throws:
TechnicalException

getGroupClients

public List<Client> getGroupClients(String groupId)
                             throws TechnicalException
Description copied from interface: VradiStorageService
Returns a list of Clients belonging to the specified groupId.

Specified by:
getGroupClients in interface VradiStorageService
Parameters:
groupId - the id of the group
Returns:
a list of Clients
Throws:
TechnicalException

getClientByUserId

public Client getClientByUserId(String userId)
                         throws TechnicalException
Description copied from interface: VradiStorageService
Returns a Client whose specified userId belongs.

Specified by:
getClientByUserId in interface VradiStorageService
Parameters:
userId - the id of the user
Returns:
a Client
Throws:
TechnicalException

getGroupsByUserId

public List<Group> getGroupsByUserId(String userId)
                              throws TechnicalException
Description copied from interface: VradiStorageService
Returns a list of Group that the specified userId belongs.

Specified by:
getGroupsByUserId in interface VradiStorageService
Parameters:
userId - the id of the user
Returns:
a list of Group
Throws:
TechnicalException

getGroupsByClientId

public List<Group> getGroupsByClientId(String clientId)
                                throws TechnicalException
Description copied from interface: VradiStorageService
Returns a list of Group that the specified clientId belongs.

Specified by:
getGroupsByClientId in interface VradiStorageService
Parameters:
clientId - the id of the client
Returns:
a list of Group
Throws:
TechnicalException

getAllClients

public List<Client> getAllClients()
                           throws TechnicalException
Description copied from interface: VradiStorageService
Returns all the clients.

Specified by:
getAllClients in interface VradiStorageService
Returns:
all the clients
Throws:
TechnicalException

getAllUsers

public List<User> getAllUsers()
                       throws TechnicalException
Description copied from interface: VradiStorageService
Returns all the Users.

Specified by:
getAllUsers in interface VradiStorageService
Returns:
a list of User
Throws:
TechnicalException

getAllGroups

public List<Group> getAllGroups()
                         throws TechnicalException
Description copied from interface: VradiStorageService
Returns all the groups.

Specified by:
getAllGroups in interface VradiStorageService
Returns:
all the groups
Throws:
TechnicalException

updateForm

public Form updateForm(Form form)
                throws TechnicalException
Description copied from interface: VradiStorageService
Creates or Update the specified form.

Specified by:
updateForm in interface VradiStorageService
Parameters:
form - the form to create or update
Returns:
the stored Form
Throws:
TechnicalException

updateForms

public List<Form> updateForms(List<Form> forms)
                       throws TechnicalException
Description copied from interface: VradiStorageService
Create or Update a list of Forms.

Specified by:
updateForms in interface VradiStorageService
Parameters:
forms - the list of forms to insert or update
Returns:
an updated list of Form
Throws:
TechnicalException

findForms

public void findForms(String query,
                      VradiFormPageDTO formPageDTO)
               throws UnsupportedQueryException
Description copied from interface: VradiStorageService
Searches for forms with the specified query.

Specified by:
findForms in interface VradiStorageService
Parameters:
query - the query to filter the forms
formPageDTO - ...
Throws:
UnsupportedQueryException

findForms

public void findForms(String query,
                      org.sharengo.wikitty.WikittyExtension extension,
                      String dateType,
                      Date beginDate,
                      Date endDate,
                      List<String>[] thesaurus,
                      VradiFormPageDTO formPageDTO)
               throws UnsupportedQueryException
Description copied from interface: VradiStorageService
Searches for forms with the specified filters. The beginDate 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.

Specified by:
findForms in interface VradiStorageService
Parameters:
query - the query filter
extension - the extension filter
dateType - the date field. Must be fully qualified (extension.field)
beginDate - the begin date filter
endDate - the end date filter
formPageDTO - ...
Throws:
UnsupportedQueryException

getQueriesReturningForm

public List<String> getQueriesReturningForm(Form form)
                                     throws TechnicalException
Description copied from interface: VradiStorageService
Computes a list of queries returning the specified Form.

Specified by:
getQueriesReturningForm in interface VradiStorageService
Parameters:
form - the form which match queries
Returns:
a list of queries
Throws:
TechnicalException

getAllFormTypes

public List<org.sharengo.wikitty.WikittyExtension> getAllFormTypes()
Description copied from interface: VradiStorageService
Returns all Form Types.

Specified by:
getAllFormTypes in interface VradiStorageService
Returns:
a list of WikittyExtension

getFormType

public org.sharengo.wikitty.WikittyExtension getFormType(String name)
Description copied from interface: VradiStorageService
Returns a form type with the specified name.

Specified by:
getFormType in interface VradiStorageService
Parameters:
name - the name of the form type
Returns:
a WikittyExtension

getFormTypeFields

public Map<String,org.sharengo.wikitty.FieldType> getFormTypeFields(String name)
Description copied from interface: VradiStorageService
Finds fields of a form type.

Specified by:
getFormTypeFields in interface VradiStorageService
Parameters:
name - the name of the form type
Returns:
a map containing the names of the fields and their type

updateFormType

public org.sharengo.wikitty.WikittyExtension updateFormType(String name,
                                                            Map<String,org.sharengo.wikitty.FieldType> fields,
                                                            String requires,
                                                            Map<String,String> tagValues)
Description copied from interface: VradiStorageService
Creates or Update a form type.

Specified by:
updateFormType in interface VradiStorageService
Parameters:
name - the name of the form type
fields - the fields of the form type
requires - the extension requred by the extension to update
tagValues - the map containing the tags and their values
Returns:
a WikittyExtension

updateFormType

public org.sharengo.wikitty.WikittyExtension updateFormType(org.sharengo.wikitty.WikittyExtension extension)
Description copied from interface: VradiStorageService
Creates or Update a form type.

Specified by:
updateFormType in interface VradiStorageService
Parameters:
extension - the extension designing the form type
Returns:
a WikittyExtension

getForm

public Form getForm(String formId)
Description copied from interface: VradiStorageService
Returns a Form with the specified formId.

Specified by:
getForm in interface VradiStorageService
Parameters:
formId - the id of the form
Returns:
the form whose id is id

deleteForm

public void deleteForm(String formId)
Description copied from interface: VradiStorageService
Deletes a Form by the specified formId.

Specified by:
deleteForm in interface VradiStorageService
Parameters:
formId - the id of the Form to delete

getForms

public List<Form> getForms(List<String> formIds)
Description copied from interface: VradiStorageService
Returns all the Forms with the specified list of formIds.

Specified by:
getForms in interface VradiStorageService
Parameters:
formIds - the ids of the forms
Returns:
a list of Form

getAllForms

public List<Form> getAllForms()
Description copied from interface: VradiStorageService
Returns all Forms.

Specified by:
getAllForms in interface VradiStorageService
Returns:
a list of Form

getAllXmlStreams

public List<XmlStream> getAllXmlStreams()
Description copied from interface: VradiStorageService
Returns all XmlStreams.

Specified by:
getAllXmlStreams in interface VradiStorageService
Returns:
a list of XmlStream

updateXmlFieldBindings

public List<XmlFieldBinding> updateXmlFieldBindings(List<XmlFieldBinding> bindings)
Description copied from interface: VradiStorageService
Update a list of XmlFieldBinding.

Specified by:
updateXmlFieldBindings in interface VradiStorageService
Parameters:
bindings - the list of XmlFieldBinding to update
Returns:
the list of updated XmlFieldBinding

getXmlStream

public XmlStream getXmlStream(String xmlStreamId)
                       throws TechnicalException
Description copied from interface: VradiStorageService
Returns a XmlStream with the specified xmlStreamId.

Specified by:
getXmlStream in interface VradiStorageService
Parameters:
xmlStreamId - the id of the XmlStream
Returns:
a XmlStream
Throws:
TechnicalException

getXmlFieldBinding

public XmlFieldBinding getXmlFieldBinding(String xmlFieldBindingId)
Description copied from interface: VradiStorageService
Returns a XmlFieldBinding with the specified xmlFieldBindingId.

Specified by:
getXmlFieldBinding in interface VradiStorageService
Parameters:
xmlFieldBindingId - the id of the XmlFieldBinding
Returns:
a XmlFieldBinding

getXmlFieldBindings

public List<XmlFieldBinding> getXmlFieldBindings(XmlStream xmlStream)
Description copied from interface: VradiStorageService
Returns a list of XmlFieldBinding belonging to the specified xmlStream.

Specified by:
getXmlFieldBindings in interface VradiStorageService
Parameters:
xmlStream - the XmlStream
Returns:
a list of XmlFieldBinding

bindFormsToClients

public void bindFormsToClients()
Description copied from interface: VradiStorageService
Binds all clients with the forms found by their queries and not already sent.

Specified by:
bindFormsToClients in interface VradiStorageService

getFormsByClients

public List<VradiSendingDTO> getFormsByClients(String dateType,
                                               Date beginDate,
                                               Date endDate,
                                               org.sharengo.wikitty.WikittyExtension extension,
                                               Boolean receptionProof,
                                               Boolean paragraph,
                                               int status)
                                        throws TechnicalException
Description copied from interface: VradiStorageService
Computes all forms by clients, status and sent date with a filter.

Specified by:
getFormsByClients in interface VradiStorageService
Parameters:
dateType - the date field. Must be fully qualified (extension.field)
beginDate - the begin date filter
endDate - the end date filter
extension - the extension filter
receptionProof - true if the sending must have a reception proof
paragraph - the paragraph sent with the forms
status - the status of the sending
Returns:
a list of VradiSendingDTO representing the forms sent to the clients
Throws:
TechnicalException

getClientsByForms

public Map<Form,List<Client>> getClientsByForms(String dateType,
                                                Date beginDate,
                                                Date endDate,
                                                org.sharengo.wikitty.WikittyExtension extension)
Description copied from interface: VradiStorageService
Computes a map of Clients indexed by Forms.

Specified by:
getClientsByForms in interface VradiStorageService
Parameters:
dateType - the date field. Must be fully qualified (extension.field)
beginDate - the begin date filter
endDate - the end date filter
extension - the extension filter
Returns:
a map containing the forms and their associated list of clients

getFormsFromXmlStream

public Object[] getFormsFromXmlStream(XmlStream xmlStream,
                                      String lastItemRecorded,
                                      VradiUser vradiUser)
                               throws TechnicalException
Description copied from interface: VradiStorageService
Creates and store forms from an XmlStream by using the XmlStreamBinding to link xml stream field values with form fields.

Specified by:
getFormsFromXmlStream in interface VradiStorageService
Parameters:
xmlStream - the xml stream to read
lastItemRecorded - the encrypted value of the last read item of the xml stream
vradiUser - the VradiUser that launched the import
Returns:
an arry containing : - the encrypted value of the last read item of the xml stream - the number of created forms - the number of forms created with date parsing error - the number of forms created with number parsing error
Throws:
TechnicalException

updateVradiUser

public VradiUser updateVradiUser(VradiUser vradiUser)
                          throws TechnicalException
Description copied from interface: VradiStorageService
Updates a VradiUser.

Specified by:
updateVradiUser in interface VradiStorageService
Parameters:
vradiUser - the VradiUser to update
Returns:
the vradiUser updated
Throws:
TechnicalException

logVradiUser

public VradiUser logVradiUser(String vradiUserName,
                              String vradiUserPassword)
Description copied from interface: VradiStorageService
Checks if userName and userPassword matches a valid VradiUser.

Specified by:
logVradiUser in interface VradiStorageService
Parameters:
vradiUserName - the username of a VradiUser
vradiUserPassword - the password of a VradiUser
Returns:
a VradiUser or null if either userName or userPassword don't match

updateSendings

public void updateSendings(List<Sending> sendings)
Description copied from interface: VradiStorageService
Update a list of Sending.

Specified by:
updateSendings in interface VradiStorageService
Parameters:
sendings - the list of Sending to update

importData

public void importData(File file)
                throws TechnicalException
Description copied from interface: VradiStorageService
Import data from an XML file.

Specified by:
importData in interface VradiStorageService
Parameters:
file - the XML file containing datas
Throws:
TechnicalException

exportData

public String exportData()
                  throws TechnicalException
Description copied from interface: VradiStorageService
Export the datas into an XML format.

Specified by:
exportData in interface VradiStorageService
Returns:
the datas as an XML String
Throws:
TechnicalException

reindexData

public void reindexData()
Description copied from interface: VradiStorageService
Reindex the datas.

Specified by:
reindexData in interface VradiStorageService

changeDataDir

public void changeDataDir(String newDataDir,
                          String oldDataDir)
Description copied from interface: VradiStorageService
Changes datas directory.

Specified by:
changeDataDir in interface VradiStorageService
Parameters:
newDataDir - the new data directory path
oldDataDir - the old data directory path. If null, the data in the old directory will not be copied.

getRootThesaurus

public org.sharengo.wikitty.TreeNode getRootThesaurus()
                                               throws TechnicalException
Description copied from interface: VradiStorageService
Returns the root Thesaurus Node.

Specified by:
getRootThesaurus in interface VradiStorageService
Returns:
a TreeNode
Throws:
TechnicalException

getAllThesaurus

public List<org.sharengo.wikitty.TreeNode> getAllThesaurus()
                                                    throws TechnicalException
Description copied from interface: VradiStorageService
Returns all TreeNode considered as thesaurus nodes.

Specified by:
getAllThesaurus in interface VradiStorageService
Returns:
a list of TreeNode
Throws:
TechnicalException

getThesaurus

public org.sharengo.wikitty.TreeNode getThesaurus(String thesaurusId)
                                           throws TechnicalException
Description copied from interface: VradiStorageService
Returns a TreeNode with the specified thesaurusId.

Specified by:
getThesaurus in interface VradiStorageService
Parameters:
thesaurusId - the id of the thesaurus
Returns:
a TreeNode
Throws:
TechnicalException

getChildrenThesaurus

public List<org.sharengo.wikitty.TreeNode> getChildrenThesaurus(String thesaurusId)
                                                         throws TechnicalException
Description copied from interface: VradiStorageService
Returns all children of the specified thesaurusId.

Specified by:
getChildrenThesaurus in interface VradiStorageService
Returns:
all list of TreeNode
Throws:
TechnicalException

getNbFormsByThesaurus

public Map<org.sharengo.wikitty.TreeNode,Integer> getNbFormsByThesaurus()
                                                                 throws TechnicalException
Description copied from interface: VradiStorageService
Computes the number of forms associated with every thesaurus node.

Specified by:
getNbFormsByThesaurus in interface VradiStorageService
Returns:
a map containing the thesaurus nodes and the number of forms associated with them
Throws:
TechnicalException

getNbFormsForThesaurus

public int getNbFormsForThesaurus(String thesaurusId)
                           throws TechnicalException
Description copied from interface: VradiStorageService
Computes the number of forms associated with the specified thesaurusId.

Specified by:
getNbFormsForThesaurus in interface VradiStorageService
Returns:
the number of forms associated
Throws:
TechnicalException

getStatus

public Status getStatus(String statusId)
                 throws TechnicalException
Description copied from interface: VradiStorageService
Returns a Status with the specified statusId.

Specified by:
getStatus in interface VradiStorageService
Parameters:
statusId - the id of the status
Returns:
a Status
Throws:
TechnicalException

getStatuses

public List<Status> getStatuses(List<String> statusIds)
                         throws TechnicalException
Description copied from interface: VradiStorageService
Returns a list of Status with the specified statusIds.

Specified by:
getStatuses in interface VradiStorageService
Parameters:
statusIds - the ids of the statuses
Returns:
a list of Status
Throws:
TechnicalException

getAllStatuses

public List<Status> getAllStatuses()
                            throws TechnicalException
Description copied from interface: VradiStorageService
Returns all Status.

Specified by:
getAllStatuses in interface VradiStorageService
Returns:
a list of Status
Throws:
TechnicalException

updateStatus

public Status updateStatus(Status status)
                    throws TechnicalException
Description copied from interface: VradiStorageService
Updates a Status.

Specified by:
updateStatus in interface VradiStorageService
Parameters:
status - the Status to update
Returns:
the Status updated
Throws:
TechnicalException

updateStatuses

public List<Status> updateStatuses(List<Status> statuses)
                            throws TechnicalException
Description copied from interface: VradiStorageService
Updates a list of Status.

Specified by:
updateStatuses in interface VradiStorageService
Parameters:
statuses - the list of Status to update
Returns:
the list of the Status updated
Throws:
TechnicalException

deleteStatus

public void deleteStatus(String statusId)
                  throws TechnicalException
Description copied from interface: VradiStorageService
Deletes a Status.

Specified by:
deleteStatus in interface VradiStorageService
Parameters:
statusId - the id of the Status to delete
Throws:
TechnicalException

deleteStatuses

public void deleteStatuses(List<String> statusIds)
                    throws TechnicalException
Description copied from interface: VradiStorageService
Deletes a list of Status.

Specified by:
deleteStatuses in interface VradiStorageService
Parameters:
statusIds - the list of ids of the Status to delete
Throws:
TechnicalException

getToTreatStatus

public Status getToTreatStatus()
Description copied from interface: VradiStorageService
Get the unmodifiable status 'to treat'

Specified by:
getToTreatStatus in interface VradiStorageService
Returns:
a Status

getValidatedStatus

public Status getValidatedStatus()
Description copied from interface: VradiStorageService
Get the unmodifiable status 'validated'

Specified by:
getValidatedStatus in interface VradiStorageService
Returns:
a Status

proposeThesaurus

public List<org.sharengo.wikitty.TreeNode> proposeThesaurus(Form form,
                                                            List<org.sharengo.wikitty.TreeNode> thesaurus)
                                                     throws TechnicalException
Description copied from interface: VradiStorageService
Propose thesaurus nodes that might be in relation with a specified form

Specified by:
proposeThesaurus in interface VradiStorageService
Parameters:
form - the Form containing the information needed to search the thesaurus nodes
thesaurus - the list of all the tree nodes of the thesaurus
Returns:
a list of TreeNode
Throws:
TechnicalException


Copyright © 2009-2010 JurisMarches. All Rights Reserved.