org.ow2.dragon.service.organization
Class PersonManagerImpl

java.lang.Object
  extended by org.ow2.dragon.service.organization.PersonManagerImpl
All Implemented Interfaces:
PersonManager

public class PersonManagerImpl
extends java.lang.Object
implements PersonManager

Author:
ofabre - eBM WebSourcing

Constructor Summary
PersonManagerImpl()
           
 
Method Summary
 java.lang.String createPerson(PersonTO personTO)
          Add a new person in registry.
 java.util.List<PersonTO> getAllPersons(RequestOptionsTO requestOptionsTO)
          Return the list of all persons in the registry
 PersonTO getPerson(java.lang.String personId)
          Retrieve the person matching the given ID
 java.util.List<PersonTO> getPersonsByOrgAndPost(java.lang.String organizationId, java.lang.String postId, RequestOptionsTO optionsTO)
          Retrieve the list of persons that are assigned to the given post in the given organization unit
 java.util.List<PersonTO> getPersonsByOrganization(java.lang.String organizationId, RequestOptionsTO requestOptionsTO)
          Retrieve the list of persons that are parts of the given organization unit
 java.util.List<PersonTO> getPersonsByPost(java.lang.String postId, RequestOptionsTO requestOptionsTO)
          Retrieve the list of persons that are assigned to the given post
 GenericUnifiedDAO<Person,java.lang.String> getPersonUnifiedDAO()
           
 void removePerson(java.lang.String personId)
          Remove the person matching the given id from the registry
 java.util.List<PersonTO> searchPersons(java.lang.String searchCriteria, java.util.List<PersonSearchProperties> searchedProperties, RequestOptionsTO options)
          Retrieve a list of persons matching the given criteria for the given properties
 void setPersonDAO(PersonDAO personDAO)
           
 void setPersonUnifiedDAO(GenericUnifiedDAO<Person,java.lang.String> personUnifiedDAO)
           
 void setTransfertObjectAssembler(TransfertObjectAssembler transfertObjectAssembler)
           
 java.lang.String updatePerson(PersonTO personTO)
          Update the person in the registry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersonManagerImpl

public PersonManagerImpl()
Method Detail

createPerson

public java.lang.String createPerson(PersonTO personTO)
                              throws OrganizationException
Description copied from interface: PersonManager
Add a new person in registry. Firstname, Lastname and email must be specified

Specified by:
createPerson in interface PersonManager
Parameters:
personTO - the PersonTO handling data of the Person to add
Returns:
the id of the added Person
Throws:
OrganizationException - if you try to create a person with firstname/lastname/email that already exists or a person without firstname, lastname and email

getAllPersons

public java.util.List<PersonTO> getAllPersons(RequestOptionsTO requestOptionsTO)
Description copied from interface: PersonManager
Return the list of all persons in the registry

Specified by:
getAllPersons in interface PersonManager
Parameters:
requestOptionsTO - sort, pagination and case sensitive parameters, could be null
Returns:
the List of all PersonTO handling Person data in the registry, couldn't be null, can be empty

getPerson

public PersonTO getPerson(java.lang.String personId)
                   throws OrganizationException
Description copied from interface: PersonManager
Retrieve the person matching the given ID

Specified by:
getPerson in interface PersonManager
Parameters:
personId - a Person id
Returns:
the PersonTO handling data of the Person matching the given id
Throws:
OrganizationException - if no person found for the given id

getPersonUnifiedDAO

public GenericUnifiedDAO<Person,java.lang.String> getPersonUnifiedDAO()

getPersonsByOrgAndPost

public java.util.List<PersonTO> getPersonsByOrgAndPost(java.lang.String organizationId,
                                                       java.lang.String postId,
                                                       RequestOptionsTO optionsTO)
Description copied from interface: PersonManager
Retrieve the list of persons that are assigned to the given post in the given organization unit

Specified by:
getPersonsByOrgAndPost in interface PersonManager
Parameters:
organizationId - an OrganizationUnit id
postId - a Post id
optionsTO - sort, pagination and case sensitive parameters, could be null
Returns:
the List of PersonTOs that are assigned to the given post in the given organization unit

getPersonsByOrganization

public java.util.List<PersonTO> getPersonsByOrganization(java.lang.String organizationId,
                                                         RequestOptionsTO requestOptionsTO)
                                                  throws OrganizationException
Description copied from interface: PersonManager
Retrieve the list of persons that are parts of the given organization unit

Specified by:
getPersonsByOrganization in interface PersonManager
Parameters:
organizationId - an OrganizationUnit id
requestOptionsTO - sort, pagination and case sensitive parameters, could be null
Returns:
the List of PersonTOs that are parts of the given OrganizationUnit
Throws:
OrganizationException - if an error occurs during persons retrieval

getPersonsByPost

public java.util.List<PersonTO> getPersonsByPost(java.lang.String postId,
                                                 RequestOptionsTO requestOptionsTO)
                                          throws OrganizationException
Description copied from interface: PersonManager
Retrieve the list of persons that are assigned to the given post

Specified by:
getPersonsByPost in interface PersonManager
Parameters:
postId - a Post id
requestOptionsTO - sort, pagination and case sensitive parameters, could be null
Returns:
the List of PersonTOs that are assigned to the given Post
Throws:
OrganizationException - if an error occurs during persons retrieval

removePerson

public void removePerson(java.lang.String personId)
Description copied from interface: PersonManager
Remove the person matching the given id from the registry

Specified by:
removePerson in interface PersonManager
Parameters:
personId - a Person id

searchPersons

public java.util.List<PersonTO> searchPersons(java.lang.String searchCriteria,
                                              java.util.List<PersonSearchProperties> searchedProperties,
                                              RequestOptionsTO options)
                                       throws OrganizationException
Description copied from interface: PersonManager
Retrieve a list of persons matching the given criteria for the given properties

Specified by:
searchPersons in interface PersonManager
Parameters:
searchCriteria - the search criteria (a String containing criteria separated with whitespaces)
searchedProperties - the searched properties
options - sort, pagination and case sensitive parameters, could be null
Returns:
a List of PersonTO matching the given criteria for the given properties
Throws:
OrganizationException - if an error occurs during persons retrieval

setPersonUnifiedDAO

public void setPersonUnifiedDAO(GenericUnifiedDAO<Person,java.lang.String> personUnifiedDAO)

setTransfertObjectAssembler

public void setTransfertObjectAssembler(TransfertObjectAssembler transfertObjectAssembler)

updatePerson

public java.lang.String updatePerson(PersonTO personTO)
                              throws OrganizationException
Description copied from interface: PersonManager
Update the person in the registry

Specified by:
updatePerson in interface PersonManager
Parameters:
personTO - the PersonTO handling information of the Person to update
Returns:
the updated Person id
Throws:
OrganizationException - if an error occurs during person update

setPersonDAO

public void setPersonDAO(PersonDAO personDAO)


Copyright © 2008-2009 eBMWebsourcing. All Rights Reserved.