com.jurismarches.vradi.services
Interface VradiDataService

All Known Implementing Classes:
VradiDataServiceImpl

public interface VradiDataService

This service contains business code to do on data before calling WikittyProxy. It's intended to be used on a local WikittyProxy.

Version:
$Revision: 1515 $ Last update : $Date: 2010-09-28 11:41:33 +0200 (mar., 28 sept. 2010) $ By : $Author: sletellier $
Author:
chatellier

Method Summary
 boolean checkUserEmail(Sending sending)
          Check if user have email non empyt
 List<Status> createDefaultStatuses()
          Create all default status.
 org.nuiton.wikitty.WikittyExtension createFormType(String formTypeName)
          Create new form type.
 RootThesaurus createRootThesaurus(String rootThesaurusName)
          Create new thesaurus.
 void deleteAllThesaurus()
          Delete all thesauruses recursively.
 List<String> deleteThesaurus(String thesaurusId)
          Delete all thesaurus and sub thesaurus.
 List<Client> findAllClients()
          Find all clients ordered by client name.
 List<Group> findAllGroups()
          Find all groups ordered by group name.
 List<Status> findAllStatus()
          Find all status ordered by status name.
 List<User> findAllUsers()
          Find all users ordered by user name.
 List<WebHarvestStream> findAllWebHarvest()
          Find all webHarvest stream ordered by stream name.
 List<XmlStream> findAllXmlStreams()
          Find all xml streams ordered by stream name.
 List<User> findClientUsers(String clientId)
          Find all users for a client ordered by user name.
 FormPagedResult findForms(QueryParameters queryParameters, FormPagedResult formPagedResult)
          Searches for forms with the specified filters.
 List<Group> findUserGroups(String userId)
          Find user group.
 List<org.nuiton.wikitty.WikittyExtension> getAllFormTypes()
          Retrieves all the form types
 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.WikittyExtension getFormType(String name)
          Retrieves the form type whose name is the parameter 'name'
 int getNbFormsForThesaurus(String thesaurusId)
          Computes the number of forms associated with the specified thesaurusId.
 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
 List<Thesaurus> getThesaurusAttachedToForm(Form form)
          Retourne l'ensemble des thesaurus qui sont attachés a un formulaire.
 boolean isFormTypeExists(String formTypeName)
          Check if a form type name already exists.
 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.
 org.nuiton.wikitty.WikittyExtension updateFormType(String name, Map<String,org.nuiton.wikitty.FieldType> fields, String requires, Map<String,String> tagValues)
          Creates or Update a form type.
 org.nuiton.wikitty.WikittyExtension updateFormType(org.nuiton.wikitty.WikittyExtension extension)
          Creates or Update a form type.
 org.nuiton.wikitty.WikittyExtension updateFormType(org.nuiton.wikitty.WikittyExtension extension, String templateName)
          Creates or Update a form type.
 List<XmlFieldBinding> updateXmlFieldBindings(List<XmlFieldBinding> bindings)
          Update a list of XmlFieldBinding.
 

Method Detail

findAllClients

List<Client> findAllClients()
Find all clients ordered by client name.

Returns:
all clients

findAllUsers

List<User> findAllUsers()
Find all users ordered by user name.

Returns:
all users

findClientUsers

List<User> findClientUsers(String clientId)
Find all users for a client ordered by user name.

Parameters:
clientId - client wikitty id
Returns:
all users for client

findUserGroups

List<Group> findUserGroups(String userId)
Find user group.

Parameters:
userId - user wikitty id
Returns:
all groups for user

findAllGroups

List<Group> findAllGroups()
Find all groups ordered by group name.

Returns:
all groups

findAllStatus

List<Status> findAllStatus()
Find all status ordered by status name.

Returns:
all status

createDefaultStatuses

List<Status> createDefaultStatuses()
                                   throws VradiException
Create all default status.

Returns:
all status
Throws:
VradiException

findAllWebHarvest

List<WebHarvestStream> findAllWebHarvest()
Find all webHarvest stream ordered by stream name.

Returns:
all stream webHarvest

findAllXmlStreams

List<XmlStream> findAllXmlStreams()
Find all xml streams ordered by stream name.

Returns:
all xml streams

getRootThesaurus

List<RootThesaurus> getRootThesaurus()
                                     throws VradiException
Return root thesaurus ids (ie thesaurus nodes without parent) sorted by root thesaurus name.

Returns:
a RootThesaurus collection
Throws:
VradiException

getFormType

org.nuiton.wikitty.WikittyExtension getFormType(String name)
                                                throws VradiException
Retrieves the form type whose name is the parameter 'name'

Parameters:
name - the name of the form type we want to retrieve
Returns:
the form type whose name is the parameter
Throws:
VradiException

updateFormType

org.nuiton.wikitty.WikittyExtension updateFormType(org.nuiton.wikitty.WikittyExtension extension)
                                                   throws VradiException
Creates or Update a form type.

Parameters:
extension - the extension designing the form type
Returns:
a WikittyExtension
Throws:
VradiException

updateFormType

org.nuiton.wikitty.WikittyExtension updateFormType(org.nuiton.wikitty.WikittyExtension extension,
                                                   String templateName)
                                                   throws VradiException
Creates or Update a form type.

Parameters:
extension - the extension designing the form type
template - name
Returns:
a WikittyExtension
Throws:
VradiException

updateFormType

org.nuiton.wikitty.WikittyExtension updateFormType(String name,
                                                   Map<String,org.nuiton.wikitty.FieldType> fields,
                                                   String requires,
                                                   Map<String,String> tagValues)
                                                   throws VradiException
Creates or Update a form type.

Parameters:
name - the name of the form type
fields - the fields of the form type
requires - the extension required by the extension to update
tagValues - the map containing the tags and their values
Returns:
a WikittyExtension
Throws:
VradiException

getThesaurusAttachedToForm

List<Thesaurus> getThesaurusAttachedToForm(Form form)
                                           throws VradiException
Retourne l'ensemble des thesaurus qui sont attachés a un formulaire.

Parameters:
form - form dont on veut les thesaurus
Returns:
thesaurus attachés au formulaire
Throws:
VradiException

findForms

FormPagedResult findForms(QueryParameters queryParameters,
                          FormPagedResult formPagedResult)
                          throws VradiException,
                                 UnsupportedQueryException
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.

Parameters:
queryParameters - query parameters
Returns:
FormPagedResult
Throws:
UnsupportedQueryException
VradiException

getChildrenCartography

Map<Thesaurus,Integer> getChildrenCartography(String thesaurusId,
                                              QueryParameters queryParameters)
                                              throws VradiException,
                                                     UnsupportedQueryException
Computes the number of forms associated with every thesaurus node.

Parameters:
thesaurusId - thesaurusId
queryParameters - query parameters
Returns:
a map with children thesaurus and associated form count
Throws:
VradiException
UnsupportedQueryException

updateXmlFieldBindings

List<XmlFieldBinding> updateXmlFieldBindings(List<XmlFieldBinding> bindings)
                                             throws VradiException
Update a list of XmlFieldBinding.

Parameters:
bindings - the list of XmlFieldBinding to update
Returns:
the list of updated XmlFieldBinding
Throws:
VradiException

getAllFormTypes

List<org.nuiton.wikitty.WikittyExtension> getAllFormTypes()
                                                          throws VradiException
Retrieves all the form types

Returns:
a list containing all the form types
Throws:
VradiException

getChildrenThesaurus

List<Thesaurus> getChildrenThesaurus(String thesaurusId)
                                     throws VradiException
Returns all children of the specified thesaurusId sorted by name.

Parameters:
thesaurusId - thesaurus wikitty id
Returns:
all list of TreeNodeImpl
Throws:
VradiException

getNbFormsForThesaurus

int getNbFormsForThesaurus(String thesaurusId)
                           throws VradiException
Computes the number of forms associated with the specified thesaurusId.

Parameters:
thesaurusId - thesaurus id
Returns:
the number of forms associated
Throws:
VradiException

createRootThesaurus

RootThesaurus createRootThesaurus(String rootThesaurusName)
                                  throws VradiException
Create new thesaurus.

Parameters:
rootThesaurusName - root thesaurus name (must contains only alphnum characters)
Returns:
new created thesaurus
Throws:
VradiException - if name is not valid

deleteThesaurus

List<String> deleteThesaurus(String thesaurusId)
                             throws VradiException
Delete all thesaurus and sub thesaurus.

Parameters:
thesaurusId - thesaurusId to delete
Throws:
VradiException

isFormTypeExists

boolean isFormTypeExists(String formTypeName)
                         throws VradiException
Check if a form type name already exists.

Parameters:
formTypeName - form type name
Returns:
new created wikitty extension
Throws:
VradiException - if name is not valid

createFormType

org.nuiton.wikitty.WikittyExtension createFormType(String formTypeName)
                                                   throws VradiException
Create new form type.

Parameters:
formTypeName - form type name
Returns:
new created wikitty extension
Throws:
VradiException - if name is not valid

isThesaurusNameExistsInRootThesaurus

boolean isThesaurusNameExistsInRootThesaurus(RootThesaurus rootThesaurus,
                                             String thesaurusName)
Return true if thesaurusName exists in rootThesaurus children.

Parameters:
rootThesaurus - root thesaurus
thesaurusName - thesaurus name to test
Returns:
true if thesaurusName exists in rootThesaurus children

isThesaurusNameExistsInRootThesaurus

boolean isThesaurusNameExistsInRootThesaurus(RootThesaurus rootThesaurus,
                                             String thesaurusName,
                                             String exceptedThesaurusId)
Check if name of thesaurus is existing in rootThesaurus.

Parameters:
rootThesaurus - to check
thesaurusName - name to check
exceptedThesaurusId - in case of rename, exclude exceptedThesaurusId from check
Returns:
true if thesaurus already exist

isRootThesaurusNameExists

boolean isRootThesaurusNameExists(String rootThesaurusName)
Return true if rootThesaurusName already exists.

Parameters:
rootThesaurusName - rootThesaurus name to test
Returns:
true if rootThesaurusName already exists

isRootThesaurusNameExists

boolean isRootThesaurusNameExists(String rootThesaurusName,
                                  String exceptedRootThesaurusId)
Return true if rootThesaurusName already exists.

Parameters:
rootThesaurusName - rootThesaurus name to test
exceptedRootThesaurusId - in case of rename, exclude exceptedRootThesaurusId from check
Returns:
true if rootThesaurusName already exists

checkUserEmail

boolean checkUserEmail(Sending sending)
Check if user have email non empyt

Parameters:
sending - to check
Returns:
false if no valid email found

getSessionBySending

Session getSessionBySending(String sendingId)
Return session corresponding of sending id in param

Parameters:
sendingId - corresponding to session to find
Returns:
session found

deleteAllThesaurus

void deleteAllThesaurus()
                        throws VradiException
Delete all thesauruses recursively.

Throws:
VradiException


Copyright © 2009-2010 JurisMarches. All Rights Reserved.