|
||||||||||
| 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 org.nuiton.util.ApplicationConfig |
config
|
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.util.ApplicationConfig config,
org.nuiton.wikitty.WikittyProxy wikittyProxy)
Constructor with a wikitty proxy. |
|
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.entities.WikittyExtension |
computeExtension(org.nuiton.wikitty.entities.WikittyExtension extension)
Compute the specified extension and return a new one with ordered fields. |
|
List<Status> |
createDefaultStatuses()
Create all default status. |
|
org.nuiton.wikitty.entities.WikittyExtension |
createFormType(String formTypeName)
Create new form type. |
|
RootThesaurus |
createRootThesaurus(String rootThesaurusName)
Create new thesaurus. |
|
void |
deleteAllThesaurus()
Delete all thesauruses recursively. |
|
void |
deleteClient(String clientId)
Delete client, users associated and user groups association |
|
void |
deleteGroup(String groupId)
Delete group |
|
boolean |
deleteStatus(List<String> statusIds)
Delete status if no form is use this |
|
Collection<String> |
deleteThesaurus(String thesaurusId)
Delete all thesaurus and sub thesaurus. |
|
void |
deleteUser(String userId)
Delete users, and groups association |
|
void |
deleteXmlStream(String id)
Delete group |
|
protected
|
findAllByExtension(Class<T> type,
String extension,
String... sortFields)
Do a find all by applying a criteria to WikittyProxy. |
|
List<Client> |
findAllClients()
Find all clients. |
|
List<Group> |
findAllGroups()
Find all groups. |
|
List<Status> |
findAllStatus()
Find all status. |
|
List<User> |
findAllUsers()
Find all users. |
|
List<WebHarvestStream> |
findAllWebHarvest()
Find all webHarvest stream. |
|
List<XmlStream> |
findAllXmlStreams()
Find all xml streams. |
|
List<User> |
findClientUsers(String clientId)
Find all users for a client. |
|
FormPagedResult |
findForms(QueryParameters queryParameters,
FormPagedResult formPagedResult)
Searches for forms with the specified filters. |
|
Map<Group,List<QueryBean>> |
findQueriesReturningForm(List<Group> groups,
String formId)
Computes a list of queries returning the specified Form and groups. |
|
Map<Group,List<QueryBean>> |
findQueriesReturningForm(String formId)
Computes a list of queries returning the specified Form. |
|
List<Group> |
findUserGroups(String userId)
Find all groups for a user. |
|
List<org.nuiton.wikitty.entities.WikittyExtension> |
getAllFormTypes()
Retrieves all the form types |
|
List<String> |
getAllWebHarvestScripts()
Get all WebHarvest script name in server's WebHarvest directory. |
|
Map<Thesaurus,Integer> |
getChildrenCartography(String thesaurusId,
QueryParameters queryParameters)
Computes the number of forms associated with every thesaurus node. |
|
List<Thesaurus> |
getChildrenThesaurus(String thesaurusId)
Returns all children of the specified thesaurusId sorted by name. |
|
org.nuiton.wikitty.entities.WikittyExtension |
getFormType(String name)
Retrieves the form type whose name is the parameter 'name' |
|
Map<String,org.nuiton.wikitty.entities.FieldType> |
getFormTypeFields(String name)
Finds fields of a form type. |
|
String |
getFormTypeTemplateName(org.nuiton.wikitty.entities.WikittyExtension extension)
Get form type template name |
|
List<Group> |
getGroupsForUser(String userId)
Get all the groups a user is in. |
|
Session |
getLastCloseSession()
Get last closed session |
|
Session |
getLastOpenSession()
Get last opened session |
|
int |
getNbFormsForThesaurus(String thesaurusId)
Computes the number of forms associated with the specified thesaurusId. |
|
String |
getPreviousReplaceForm(String formId)
Return formId of previous replace form |
|
Map<Group,List<QueryBean>> |
getQueriesToModifyAfterThesaurusModification(String rootThesaurusName,
String thesaurusName)
Gets the query makers whose queries are potentially to modify after a thesaurus node modification |
|
List<String> |
getRelatedFormsLinkIds(String formId)
Get all related forms ids of form in param |
|
List<String> |
getReplaceFormsLinkIds(String formId)
Get all replace forms ids of form in param |
|
List<RootThesaurus> |
getRootThesaurus()
Return root thesaurus ids (ie thesaurus nodes without parent) sorted by root thesaurus name. |
|
Session |
getSessionBySending(String sendingId)
Return session corresponding of sending id in param |
|
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. |
|
List<Thesaurus> |
getThesaurusAttachedToForm(Form form)
Retourne l'ensemble des thesaurus qui sont attachés a un formulaire. |
|
String |
getWebHarvestPreviewURL(WebHarvestStream stream)
Get web harvest preview url from script |
|
protected void |
initManagers()
Init managers. |
|
boolean |
isFormTypeExists(String formTypeName)
Check if a form type name already exists. |
|
boolean |
isReplaceForm(String formId)
Return true if form is a replace form |
|
boolean |
isRootThesaurusNameExists(String rootThesaurusName)
Return true if rootThesaurusName already exists. |
|
boolean |
isRootThesaurusNameExists(String rootThesaurusName,
String exceptedRootThesaurusId)
Return true if rootThesaurusName already exists. |
|
boolean |
isThesaurusNameExistsInRootThesaurus(RootThesaurus rootThesaurus,
String thesaurusName)
Return true if thesaurusName exists in rootThesaurus children. |
|
boolean |
isThesaurusNameExistsInRootThesaurus(RootThesaurus rootThesaurus,
String thesaurusName,
String exceptedThesaurusId)
Check if name of thesaurus is existing in rootThesaurus. |
|
List<Thesaurus> |
proposeThesaurus(String formId)
Propose thesaurus nodes that might be in relation with a specified form |
|
org.nuiton.wikitty.entities.WikittyExtension |
updateFormType(String name,
Map<String,org.nuiton.wikitty.entities.FieldType> fields,
String requires,
Map<String,String> tagValues)
Updates the form type whose name is 'name'. |
|
org.nuiton.wikitty.entities.WikittyExtension |
updateFormType(org.nuiton.wikitty.entities.WikittyExtension extension)
Update the form type given in parameter |
|
org.nuiton.wikitty.entities.WikittyExtension |
updateFormType(org.nuiton.wikitty.entities.WikittyExtension extension,
String templateName)
Update the form type given in parameter |
|
List<XmlFieldBinding> |
updateXmlFieldBindings(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.util.ApplicationConfig config
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
public VradiDataServiceImpl(org.nuiton.util.ApplicationConfig config,
org.nuiton.wikitty.WikittyProxy wikittyProxy)
config - vradi configurationwikittyProxy - wikitty proxy| Method Detail |
|---|
protected void initManagers()
protected <T extends org.nuiton.wikitty.entities.BusinessEntity> List<T> findAllByExtension(Class<T> type,
String extension,
String... sortFields)
T - type of resulttype - type to searchextension - extension to searchsortFields - sort fields (ascending to sort on)
public List<Client> findAllClients()
findAllClients in interface VradiDataServicepublic List<User> findAllUsers()
findAllUsers in interface VradiDataServicepublic List<Group> findAllGroups()
findAllGroups in interface VradiDataServicepublic List<Status> findAllStatus()
findAllStatus in interface VradiDataService
public List<Group> getGroupsForUser(String userId)
throws VradiException
VradiDataService
getGroupsForUser in interface VradiDataServiceuserId - the user we want the groups of
VradiException
public boolean deleteStatus(List<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(String sendingId)
throws VradiException
VradiDataService
getSessionOfSending in interface VradiDataServicesendingId - concerned
VradiException - if an error occur
public void deleteClient(String clientId)
throws VradiException
VradiDataService
deleteClient in interface VradiDataServiceclientId - to delete
VradiException
public void deleteUser(String userId)
throws VradiException
VradiDataService
deleteUser in interface VradiDataServiceuserId - to delete
VradiException
public void deleteGroup(String groupId)
throws VradiException
VradiDataService
deleteGroup in interface VradiDataServicegroupId - to delete
VradiException
public void deleteXmlStream(String id)
throws VradiException
VradiDataService
deleteXmlStream in interface VradiDataServiceVradiException
public Map<Group,List<QueryBean>> findQueriesReturningForm(String formId)
throws VradiException
VradiDataServiceForm.
findQueriesReturningForm in interface VradiDataServiceformId - id of the form which match queries
VradiException
public Map<Group,List<QueryBean>> findQueriesReturningForm(List<Group> groups,
String formId)
throws VradiException
VradiDataServiceForm and groups.
findQueriesReturningForm in interface VradiDataServicegroups - concernedformId - id of the form which match queries
VradiException
public Map<String,org.nuiton.wikitty.entities.FieldType> getFormTypeFields(String name)
throws VradiException
VradiDataService
getFormTypeFields in interface VradiDataServicename - the name of the form type
VradiException
public List<Status> createDefaultStatuses()
throws VradiException
createDefaultStatuses in interface VradiDataServiceVradiExceptionpublic List<WebHarvestStream> findAllWebHarvest()
findAllWebHarvest in interface VradiDataServicepublic List<XmlStream> findAllXmlStreams()
findAllXmlStreams in interface VradiDataServicepublic List<User> findClientUsers(String clientId)
findClientUsers in interface VradiDataServiceclientId - client wikitty id
public List<Group> findUserGroups(String userId)
findUserGroups in interface VradiDataServiceuserId - user wikitty id
public org.nuiton.wikitty.entities.WikittyExtension getFormType(String name)
throws VradiException
getFormType in interface VradiDataServicename - the name of the form type we want to retrieve
VradiException
public org.nuiton.wikitty.entities.WikittyExtension updateFormType(String name,
Map<String,org.nuiton.wikitty.entities.FieldType> fields,
String requires,
Map<String,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.entities.WikittyExtension updateFormType(org.nuiton.wikitty.entities.WikittyExtension extension)
throws VradiException
updateFormType in interface VradiDataServiceextension - the form type to update
VradiException
public org.nuiton.wikitty.entities.WikittyExtension updateFormType(org.nuiton.wikitty.entities.WikittyExtension extension,
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 Map<Thesaurus,Integer> getChildrenCartography(String thesaurusId,
QueryParameters queryParameters)
throws VradiException,
UnsupportedQueryException
VradiDataService
getChildrenCartography in interface VradiDataServicethesaurusId - thesaurusIdqueryParameters - query parameters
VradiException
UnsupportedQueryException
public Map<Group,List<QueryBean>> getQueriesToModifyAfterThesaurusModification(String rootThesaurusName,
String thesaurusName)
VradiDataService
getQueriesToModifyAfterThesaurusModification in interface VradiDataServicerootThesaurusName - the modified root thesaurus name nodethesaurusName - the modified thesaurus name node
public List<XmlFieldBinding> updateXmlFieldBindings(List<XmlFieldBinding> bindings)
throws VradiException
updateXmlFieldBindings in interface VradiDataServicebindings - the list of the xml field bindings to update
VradiException
public List<org.nuiton.wikitty.entities.WikittyExtension> getAllFormTypes()
throws VradiException
getAllFormTypes in interface VradiDataServiceVradiExceptionprotected org.nuiton.wikitty.entities.WikittyExtension computeExtension(org.nuiton.wikitty.entities.WikittyExtension extension)
extension - specified
public List<Thesaurus> proposeThesaurus(String formId)
throws VradiException
VradiDataService
proposeThesaurus in interface VradiDataServiceformId - the Form id containing the information needed
to search the thesaurus nodes
Thesaurus
VradiException
public List<RootThesaurus> getRootThesaurus()
throws VradiException
getRootThesaurus in interface VradiDataServiceRootThesaurus collection
VradiException
public int getNbFormsForThesaurus(String thesaurusId)
throws VradiException
VradiDataServicethesaurusId.
getNbFormsForThesaurus in interface VradiDataServicethesaurusId - thesaurus id
VradiExceptionpublic List<Thesaurus> getThesaurusAttachedToForm(Form form)
getThesaurusAttachedToForm in interface VradiDataServiceform - form dont on veut les thesaurus
public List<Thesaurus> getChildrenThesaurus(String thesaurusId)
throws VradiException
thesaurusId sorted by name.
getChildrenThesaurus in interface VradiDataServicethesaurusId - thesaurus wikitty id
TreeNodeImpl
VradiException
public RootThesaurus createRootThesaurus(String rootThesaurusName)
throws VradiException
VradiDataService
createRootThesaurus in interface VradiDataServicerootThesaurusName - root thesaurus name (must contains only alphnum characters)
VradiException - if name is not valid
public Collection<String> deleteThesaurus(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,
String thesaurusName)
isThesaurusNameExistsInRootThesaurus in interface VradiDataServicerootThesaurus - root thesaurusthesaurusName - thesaurus name to test
public boolean isThesaurusNameExistsInRootThesaurus(RootThesaurus rootThesaurus,
String thesaurusName,
String exceptedThesaurusId)
isThesaurusNameExistsInRootThesaurus in interface VradiDataServicerootThesaurus - to checkthesaurusName - name to checkexceptedThesaurusId - in case of rename, exclude exceptedThesaurusId from check
public boolean isRootThesaurusNameExists(String rootThesaurusName)
isRootThesaurusNameExists in interface VradiDataServicerootThesaurusName - rootThesaurus name to test
public boolean isRootThesaurusNameExists(String rootThesaurusName,
String exceptedRootThesaurusId)
isRootThesaurusNameExists in interface VradiDataServicerootThesaurusName - rootThesaurus name to testexceptedRootThesaurusId - in case of rename, exclude exceptedRootThesaurusId from check
public boolean isFormTypeExists(String formTypeName)
throws VradiException
isFormTypeExists in interface VradiDataServiceformTypeName - form type name
VradiException - if name is not valid
public org.nuiton.wikitty.entities.WikittyExtension createFormType(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(String sendingId)
VradiDataService
getSessionBySending in interface VradiDataServicesendingId - corresponding to session to find
public List<Session> getSessions(Date sessionDate)
throws VradiException
VradiDataService
getSessions in interface VradiDataServicesessionDate - Date concerned
VradiException
public Session getLastCloseSession()
throws VradiException
VradiDataService
getLastCloseSession in interface VradiDataServiceVradiException - if an error occur
public Session getLastOpenSession()
throws VradiException
VradiDataService
getLastOpenSession in interface VradiDataServiceVradiException - if an error occur
public List<String> getRelatedFormsLinkIds(String formId)
throws VradiException
VradiDataService
getRelatedFormsLinkIds in interface VradiDataServiceformId - concerned
VradiException - if an error occur
public List<String> getReplaceFormsLinkIds(String formId)
throws VradiException
VradiDataService
getReplaceFormsLinkIds in interface VradiDataServiceformId - concerned
VradiException - if an error occurpublic boolean isReplaceForm(String formId)
VradiDataService
isReplaceForm in interface VradiDataServiceformId - concerned
public String getPreviousReplaceForm(String formId)
VradiDataService
getPreviousReplaceForm in interface VradiDataServiceformId - concerned
public List<String> getAllWebHarvestScripts()
VradiDataService
getAllWebHarvestScripts in interface VradiDataService
public String getWebHarvestPreviewURL(WebHarvestStream stream)
throws VradiException
VradiDataService
getWebHarvestPreviewURL in interface VradiDataServiceVradiExceptionpublic String getFormTypeTemplateName(org.nuiton.wikitty.entities.WikittyExtension extension)
VradiDataService
getFormTypeTemplateName in interface VradiDataService
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||