|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jurismarches.vradi.services.VradiDataServiceImpl
public class VradiDataServiceImpl
Vradi data service implementation (on a local wikiity proxy).
| Field Summary | |
|---|---|
protected BindingManager |
bindingManager
|
protected ClientManager |
clientManager
|
protected FormManager |
formManager
|
protected FormTypeManager |
formTypeManager
|
protected SearchManager |
searchManager
|
protected ThesaurusManager |
thesaurusManager
|
protected org.nuiton.wikitty.WikittyProxy |
wikittyProxy
Wikiity proxy. |
| Constructor Summary | |
|---|---|
VradiDataServiceImpl(org.nuiton.wikitty.WikittyProxy wikittyProxy)
Constructor with a wikitty proxy. |
|
| Method Summary | ||
|---|---|---|
boolean |
checkUserEmail(Sending sending)
Check if user have email non empyt |
|
protected org.nuiton.wikitty.WikittyExtension |
computeExtension(org.nuiton.wikitty.WikittyExtension extension)
Compute the specified extension and return a new one with ordered fields. |
|
java.util.List<Status> |
createDefaultStatuses()
Create all default status. |
|
org.nuiton.wikitty.WikittyExtension |
createFormType(java.lang.String formTypeName)
Create new form type. |
|
RootThesaurus |
createRootThesaurus(java.lang.String rootThesaurusName)
Create new thesaurus. |
|
void |
deleteAllThesaurus()
Delete all thesauruses recursively. |
|
void |
deleteClient(java.lang.String clientId)
Delete client, users associated and user groups association |
|
void |
deleteGroup(java.lang.String groupId)
Delete group |
|
boolean |
deleteStatus(java.util.List<java.lang.String> statusIds)
Delete status if no form is use this |
|
java.util.List<java.lang.String> |
deleteThesaurus(java.lang.String thesaurusId)
Delete all thesaurus and sub thesaurus. |
|
void |
deleteUser(java.lang.String userId)
Delete users, and groups association |
|
void |
deleteXmlStream(java.lang.String id)
Delete group |
|
protected
|
findAllByExtension(java.lang.Class<T> type,
java.lang.String extension,
java.lang.String... sortFields)
Do a find all by applying a criteria to WikittyProxy. |
|
java.util.List<Client> |
findAllClients()
Find all clients. |
|
java.util.List<Group> |
findAllGroups()
Find all groups. |
|
java.util.List<Status> |
findAllStatus()
Find all status. |
|
java.util.List<User> |
findAllUsers()
Find all users. |
|
java.util.List<WebHarvestStream> |
findAllWebHarvest()
Find all webHarvest stream. |
|
java.util.List<XmlStream> |
findAllXmlStreams()
Find all xml streams. |
|
java.util.List<User> |
findClientUsers(java.lang.String clientId)
Find all users for a client. |
|
FormPagedResult |
findForms(QueryParameters queryParameters,
FormPagedResult formPagedResult)
Searches for forms with the specified filters. |
|
java.util.Map<Group,java.util.List<QueryBean>> |
findQueriesReturningForm(java.util.List<Group> groups,
java.lang.String formId)
Computes a list of queries returning the specified Form and groups. |
|
java.util.Map<Group,java.util.List<QueryBean>> |
findQueriesReturningForm(java.lang.String formId)
Computes a list of queries returning the specified Form. |
|
java.util.List<Group> |
findUserGroups(java.lang.String userId)
Find all groups for a user. |
|
java.util.List<org.nuiton.wikitty.WikittyExtension> |
getAllFormTypes()
Retrieves all the form types |
|
java.util.List<java.lang.String> |
getAllWebHarvestScripts()
Get all WebHarvest script name in server's WebHarvest directory. |
|
java.util.Map<Thesaurus,java.lang.Integer> |
getChildrenCartography(java.lang.String thesaurusId,
QueryParameters queryParameters)
Computes the number of forms associated with every thesaurus node. |
|
java.util.List<Thesaurus> |
getChildrenThesaurus(java.lang.String thesaurusId)
Returns all children of the specified thesaurusId sorted by name. |
|
org.nuiton.wikitty.WikittyExtension |
getFormType(java.lang.String name)
Retrieves the form type whose name is the parameter '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. |
|
Session |
getLastCloseSession()
Get last closed session |
|
Session |
getLastOpenSession()
Get last opened session |
|
int |
getNbFormsForThesaurus(java.lang.String thesaurusId)
Computes the number of forms associated with the specified thesaurusId. |
|
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<RootThesaurus> |
getRootThesaurus()
Return root thesaurus ids (ie thesaurus nodes without parent) sorted by root thesaurus name. |
|
Session |
getSessionBySending(java.lang.String sendingId)
Return session corresponding of sending id in param |
|
Session |
getSessionOfSending(java.lang.String sendingId)
Get session contain sending |
|
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.util.List<Thesaurus> |
getThesaurusAttachedToForm(Form form)
Retourne l'ensemble des thesaurus qui sont attachés a un formulaire. |
|
java.lang.String |
getWebHarvestPreviewURL(WebHarvestStream stream)
Get web harvest preview url from script |
|
protected void |
initManagers()
Init managers. |
|
boolean |
isFormTypeExists(java.lang.String formTypeName)
Check if a form type name already exists. |
|
boolean |
isRootThesaurusNameExists(java.lang.String rootThesaurusName)
Return true if rootThesaurusName already exists. |
|
boolean |
isRootThesaurusNameExists(java.lang.String rootThesaurusName,
java.lang.String exceptedRootThesaurusId)
Return true if rootThesaurusName already exists. |
|
boolean |
isThesaurusNameExistsInRootThesaurus(RootThesaurus rootThesaurus,
java.lang.String thesaurusName)
Return true if thesaurusName exists in rootThesaurus children. |
|
boolean |
isThesaurusNameExistsInRootThesaurus(RootThesaurus rootThesaurus,
java.lang.String thesaurusName,
java.lang.String exceptedThesaurusId)
Check if name of thesaurus is existing in rootThesaurus. |
|
java.util.List<Thesaurus> |
proposeThesaurus(java.lang.String formId)
Propose thesaurus nodes that might be in relation with a specified form |
|
org.nuiton.wikitty.WikittyExtension |
updateFormType(java.lang.String name,
java.util.Map<java.lang.String,org.nuiton.wikitty.FieldType> fields,
java.lang.String requires,
java.util.Map<java.lang.String,java.lang.String> tagValues)
Updates the form type whose name is 'name'. |
|
org.nuiton.wikitty.WikittyExtension |
updateFormType(org.nuiton.wikitty.WikittyExtension extension)
Update the form type given in parameter |
|
org.nuiton.wikitty.WikittyExtension |
updateFormType(org.nuiton.wikitty.WikittyExtension extension,
java.lang.String templateName)
Update the form type given in parameter |
|
java.util.List<XmlFieldBinding> |
updateXmlFieldBindings(java.util.List<XmlFieldBinding> bindings)
Updates the xml field bindings given in parameters. |
|
| 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 ThesaurusManager thesaurusManager
protected SearchManager searchManager
protected FormManager formManager
protected FormTypeManager formTypeManager
protected BindingManager bindingManager
protected ClientManager clientManager
| Constructor Detail |
|---|
public VradiDataServiceImpl(org.nuiton.wikitty.WikittyProxy wikittyProxy)
wikittyProxy - wikitty proxy| Method Detail |
|---|
protected void initManagers()
protected <T extends org.nuiton.wikitty.BusinessEntity> java.util.List<T> findAllByExtension(java.lang.Class<T> type,
java.lang.String extension,
java.lang.String... sortFields)
T - type of resulttype - type to searchextension - extension to searchsortFields - sort fields (ascending to sort on)
public java.util.List<Client> findAllClients()
findAllClients in interface VradiDataServicepublic java.util.List<User> findAllUsers()
findAllUsers in interface VradiDataServicepublic java.util.List<Group> findAllGroups()
findAllGroups in interface VradiDataServicepublic java.util.List<Status> findAllStatus()
findAllStatus in interface VradiDataService
public java.util.List<Group> getGroupsForUser(java.lang.String userId)
throws VradiException
VradiDataService
getGroupsForUser in interface VradiDataServiceuserId - the user we want the groups of
VradiException
public boolean deleteStatus(java.util.List<java.lang.String> statusIds)
throws VradiException
VradiDataService
deleteStatus in interface VradiDataServicestatusIds - to delete
VradiException - is occured if status deletion is aborded
public Status getStatus(VradiConstants.FormStatus formStatus)
throws VradiException
getStatus in interface VradiDataServiceformStatus - the status from enum
VradiException - if an error occur during statuses initialisation
public Session getSessionOfSending(java.lang.String sendingId)
throws VradiException
VradiDataService
getSessionOfSending in interface VradiDataServicesendingId - concerned
VradiException - if an error occur
public void deleteClient(java.lang.String clientId)
throws VradiException
VradiDataService
deleteClient in interface VradiDataServiceclientId - to delete
VradiException
public void deleteUser(java.lang.String userId)
throws VradiException
VradiDataService
deleteUser in interface VradiDataServiceuserId - to delete
VradiException
public void deleteGroup(java.lang.String groupId)
throws VradiException
VradiDataService
deleteGroup in interface VradiDataServicegroupId - to delete
VradiException
public void deleteXmlStream(java.lang.String id)
throws VradiException
VradiDataService
deleteXmlStream in interface VradiDataServiceVradiException
public java.util.Map<Group,java.util.List<QueryBean>> findQueriesReturningForm(java.lang.String formId)
throws VradiException
VradiDataServiceForm.
findQueriesReturningForm in interface VradiDataServiceformId - id of the form which match queries
VradiException
public java.util.Map<Group,java.util.List<QueryBean>> findQueriesReturningForm(java.util.List<Group> groups,
java.lang.String formId)
throws VradiException
VradiDataServiceForm and groups.
findQueriesReturningForm in interface VradiDataServicegroups - concernedformId - id of the form which match queries
VradiException
public java.util.Map<java.lang.String,org.nuiton.wikitty.FieldType> getFormTypeFields(java.lang.String name)
throws VradiException
VradiDataService
getFormTypeFields in interface VradiDataServicename - the name of the form type
VradiException
public java.util.List<Status> createDefaultStatuses()
throws VradiException
createDefaultStatuses in interface VradiDataServiceVradiExceptionpublic java.util.List<WebHarvestStream> findAllWebHarvest()
findAllWebHarvest in interface VradiDataServicepublic java.util.List<XmlStream> findAllXmlStreams()
findAllXmlStreams in interface VradiDataServicepublic java.util.List<User> findClientUsers(java.lang.String clientId)
findClientUsers in interface VradiDataServiceclientId - client wikitty id
public java.util.List<Group> findUserGroups(java.lang.String userId)
findUserGroups in interface VradiDataServiceuserId - user wikitty id
public org.nuiton.wikitty.WikittyExtension getFormType(java.lang.String name)
throws VradiException
getFormType in interface VradiDataServicename - the name of the form type we want to retrieve
VradiException
public org.nuiton.wikitty.WikittyExtension updateFormType(java.lang.String name,
java.util.Map<java.lang.String,org.nuiton.wikitty.FieldType> fields,
java.lang.String requires,
java.util.Map<java.lang.String,java.lang.String> tagValues)
throws VradiException
updateFormType in interface VradiDataServicename - the name of the form type to updatefields - the new fields of the form typerequires - the new requires of the form typetagValues - the new tag values of the form type
VradiException
public org.nuiton.wikitty.WikittyExtension updateFormType(org.nuiton.wikitty.WikittyExtension extension)
throws VradiException
updateFormType in interface VradiDataServiceextension - the form type to update
VradiExceptionpublic java.util.Collection<java.lang.String> getTemplateFilenames(org.nuiton.wikitty.WikittyExtension extension)
VradiDataServiceWikittyExtension
doesn't have a files fields.
getTemplateFilenames in interface VradiDataService
public org.nuiton.wikitty.WikittyExtension updateFormType(org.nuiton.wikitty.WikittyExtension extension,
java.lang.String templateName)
throws VradiException
updateFormType in interface VradiDataServiceextension - the form type to update
VradiException
public FormPagedResult findForms(QueryParameters queryParameters,
FormPagedResult formPagedResult)
throws UnsupportedQueryException,
VradiException
VradiDataServicebeginDate 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 VradiDataServicequeryParameters - query parameters
UnsupportedQueryException
VradiException
public java.util.Map<Thesaurus,java.lang.Integer> getChildrenCartography(java.lang.String thesaurusId,
QueryParameters queryParameters)
throws VradiException,
UnsupportedQueryException
VradiDataService
getChildrenCartography in interface VradiDataServicethesaurusId - thesaurusIdqueryParameters - query parameters
VradiException
UnsupportedQueryException
public java.util.Map<Group,java.util.List<QueryBean>> getQueriesToModifyAfterThesaurusModification(java.lang.String rootThesaurusName,
java.lang.String thesaurusName)
VradiDataService
getQueriesToModifyAfterThesaurusModification in interface VradiDataServicerootThesaurusName - the modified root thesaurus name nodethesaurusName - the modified thesaurus name node
public java.util.List<XmlFieldBinding> updateXmlFieldBindings(java.util.List<XmlFieldBinding> bindings)
throws VradiException
updateXmlFieldBindings in interface VradiDataServicebindings - the list of the xml field bindings to update
VradiException
public java.util.List<org.nuiton.wikitty.WikittyExtension> getAllFormTypes()
throws VradiException
getAllFormTypes in interface VradiDataServiceVradiExceptionprotected org.nuiton.wikitty.WikittyExtension computeExtension(org.nuiton.wikitty.WikittyExtension extension)
extension - specified
public java.util.List<Thesaurus> proposeThesaurus(java.lang.String formId)
throws VradiException
VradiDataService
proposeThesaurus in interface VradiDataServiceformId - the Form id containing the information needed
to search the thesaurus nodes
Thesaurus
VradiException
public java.util.List<RootThesaurus> getRootThesaurus()
throws VradiException
getRootThesaurus in interface VradiDataServiceRootThesaurus collection
VradiException
public int getNbFormsForThesaurus(java.lang.String thesaurusId)
throws VradiException
VradiDataServicethesaurusId.
getNbFormsForThesaurus in interface VradiDataServicethesaurusId - thesaurus id
VradiExceptionpublic java.util.List<Thesaurus> getThesaurusAttachedToForm(Form form)
getThesaurusAttachedToForm in interface VradiDataServiceform - form dont on veut les thesaurus
public java.util.List<Thesaurus> getChildrenThesaurus(java.lang.String thesaurusId)
throws VradiException
thesaurusId sorted by name.
getChildrenThesaurus in interface VradiDataServicethesaurusId - thesaurus wikitty id
TreeNodeImpl
VradiException
public RootThesaurus createRootThesaurus(java.lang.String rootThesaurusName)
throws VradiException
VradiDataService
createRootThesaurus in interface VradiDataServicerootThesaurusName - root thesaurus name (must contains only alphnum characters)
VradiException - if name is not valid
public java.util.List<java.lang.String> deleteThesaurus(java.lang.String thesaurusId)
throws VradiException
deleteThesaurus in interface VradiDataServicethesaurusId - thesaurusId to delete
VradiException
public void deleteAllThesaurus()
throws VradiException
deleteAllThesaurus in interface VradiDataServiceVradiException
public boolean isThesaurusNameExistsInRootThesaurus(RootThesaurus rootThesaurus,
java.lang.String thesaurusName)
isThesaurusNameExistsInRootThesaurus in interface VradiDataServicerootThesaurus - root thesaurusthesaurusName - thesaurus name to test
public boolean isThesaurusNameExistsInRootThesaurus(RootThesaurus rootThesaurus,
java.lang.String thesaurusName,
java.lang.String exceptedThesaurusId)
isThesaurusNameExistsInRootThesaurus in interface VradiDataServicerootThesaurus - to checkthesaurusName - name to checkexceptedThesaurusId - in case of rename, exclude exceptedThesaurusId from check
public boolean isRootThesaurusNameExists(java.lang.String rootThesaurusName)
isRootThesaurusNameExists in interface VradiDataServicerootThesaurusName - rootThesaurus name to test
public boolean isRootThesaurusNameExists(java.lang.String rootThesaurusName,
java.lang.String exceptedRootThesaurusId)
isRootThesaurusNameExists in interface VradiDataServicerootThesaurusName - rootThesaurus name to testexceptedRootThesaurusId - in case of rename, exclude exceptedRootThesaurusId from check
public boolean isFormTypeExists(java.lang.String formTypeName)
throws VradiException
isFormTypeExists in interface VradiDataServiceformTypeName - form type name
VradiException - if name is not valid
public org.nuiton.wikitty.WikittyExtension createFormType(java.lang.String formTypeName)
throws VradiException
createFormType in interface VradiDataServiceformTypeName - form type name
VradiException - if name is not validpublic boolean checkUserEmail(Sending sending)
VradiDataService
checkUserEmail in interface VradiDataServicesending - to check
public Session getSessionBySending(java.lang.String sendingId)
VradiDataService
getSessionBySending in interface VradiDataServicesendingId - corresponding to session to find
public java.util.List<Session> getSessions(java.util.Date sessionDate)
throws VradiException
VradiDataService
getSessions in interface VradiDataServicesessionDate - Date concerned
VradiException
public Session getLastCloseSession()
throws VradiException
VradiDataService
getLastCloseSession in interface VradiDataServiceVradiException
public Session getLastOpenSession()
throws VradiException
VradiDataService
getLastOpenSession in interface VradiDataServiceVradiExceptionpublic java.util.List<java.lang.String> getAllWebHarvestScripts()
VradiDataService
getAllWebHarvestScripts in interface VradiDataService
public java.lang.String getWebHarvestPreviewURL(WebHarvestStream stream)
throws VradiException
VradiDataService
getWebHarvestPreviewURL in interface VradiDataServiceVradiException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||