org.ow2.dragon.service.organization
Class RoleOfPartyManagerImpl

java.lang.Object
  extended by org.ow2.dragon.service.organization.RoleOfPartyManagerImpl
All Implemented Interfaces:
RoleOfPartyManager

public class RoleOfPartyManagerImpl
extends java.lang.Object
implements RoleOfPartyManager

Author:
ofabre - eBM WebSourcing

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.ow2.dragon.api.service.organization.RoleOfPartyManager
RoleOfPartyManager.LINK_TYPE
 
Constructor Summary
RoleOfPartyManagerImpl()
           
 
Method Summary
 java.lang.String createEndpointRole(java.lang.String partyId, java.lang.String endpointId, java.lang.String type)
          Create a link between a party (person or organization) and an endpoint
 java.lang.String createTechServiceRole(java.lang.String partyId, java.lang.String technicalServiceId, java.lang.String type)
          Create a link between a party (person or organization) and a tech service
 java.util.List<OrgToEndpointTO> getOrgRolesByEndpoint(java.lang.String endpointId, RequestOptionsTO requestOptionsTO)
          Retrieve all links between the given endpoint and an organization
 java.util.List<OrgToTechServiceTO> getOrgRolesByTechService(java.lang.String techServiceId, RequestOptionsTO requestOptionsTO)
          Retrieve all links between the given tech service and an organization
 java.util.List<PersonToEndpointTO> getPersonRolesByEndpoint(java.lang.String endpointId, RequestOptionsTO requestOptionsTO)
          Retrieve all links between the given endpoint and a person
 java.util.List<PersonToTechServiceTO> getPersonRolesByTechService(java.lang.String techServiceId, RequestOptionsTO requestOptionsTO)
          Retrieve all links between the given tech service and a person
 java.lang.String[] getRolesTypes(RoleOfPartyManager.LINK_TYPE linkType, RequestOptionsTO options)
          Get all role types for a particular link type.
 void removeRole(java.lang.String roleId)
          Remove a role from the registry
 void setEntityLinkManager(EntityLinkManager entityLinkManager)
           
 void setTransfertObjectAssembler(TransfertObjectAssembler transfertObjectAssembler)
           
 void setUniversalORMDAO(UniversalORMDAO universalORMDAO)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoleOfPartyManagerImpl

public RoleOfPartyManagerImpl()
Method Detail

createEndpointRole

public java.lang.String createEndpointRole(java.lang.String partyId,
                                           java.lang.String endpointId,
                                           java.lang.String type)
                                    throws OrganizationException
Description copied from interface: RoleOfPartyManager
Create a link between a party (person or organization) and an endpoint

Specified by:
createEndpointRole in interface RoleOfPartyManager
Parameters:
partyId - the Party id ( Person id or OrganizationUnit id)
endpointId - the Endpoint id
type - the role of the Party towards the Endpoint
Returns:
the created role id
Throws:
OrganizationException - if an error occurs during role creation

createTechServiceRole

public java.lang.String createTechServiceRole(java.lang.String partyId,
                                              java.lang.String technicalServiceId,
                                              java.lang.String type)
                                       throws OrganizationException
Description copied from interface: RoleOfPartyManager
Create a link between a party (person or organization) and a tech service

Specified by:
createTechServiceRole in interface RoleOfPartyManager
Parameters:
partyId - the Party id ( Person id or OrganizationUnit id)
technicalServiceId - the TechnicalService id
type - the role of the Party towards the TechnicalService
Returns:
the created role id
Throws:
OrganizationException - if an error occurs during role creation

getOrgRolesByEndpoint

public java.util.List<OrgToEndpointTO> getOrgRolesByEndpoint(java.lang.String endpointId,
                                                             RequestOptionsTO requestOptionsTO)
                                                      throws OrganizationException
Description copied from interface: RoleOfPartyManager
Retrieve all links between the given endpoint and an organization

Specified by:
getOrgRolesByEndpoint in interface RoleOfPartyManager
Parameters:
endpointId - an Endpoint id
requestOptionsTO - sort, pagination and case sensitive parameters, could be null
Returns:
a List of OrgToEndpointTO roles between OrganizationUnits and the given Endpoint
Throws:
OrganizationException - if an error occurs during roles retrieval

getOrgRolesByTechService

public java.util.List<OrgToTechServiceTO> getOrgRolesByTechService(java.lang.String techServiceId,
                                                                   RequestOptionsTO requestOptionsTO)
                                                            throws OrganizationException
Description copied from interface: RoleOfPartyManager
Retrieve all links between the given tech service and an organization

Specified by:
getOrgRolesByTechService in interface RoleOfPartyManager
Parameters:
techServiceId - a TechnicalService id
requestOptionsTO - sort, pagination and case sensitive parameters, could be null
Returns:
a List of OrgToTechServiceTO roles between OrganizationUnits and the given TechnicalService
Throws:
OrganizationException - if an error occurs during roles retrieval

getPersonRolesByEndpoint

public java.util.List<PersonToEndpointTO> getPersonRolesByEndpoint(java.lang.String endpointId,
                                                                   RequestOptionsTO requestOptionsTO)
                                                            throws OrganizationException
Description copied from interface: RoleOfPartyManager
Retrieve all links between the given endpoint and a person

Specified by:
getPersonRolesByEndpoint in interface RoleOfPartyManager
Parameters:
endpointId - an Endpoint id
requestOptionsTO - sort, pagination and case sensitive parameters, could be null
Returns:
a List of PersonToEndpointTO roles between Persons and the given Endpoint
Throws:
OrganizationException - if an error occurs during roles retrieval

getPersonRolesByTechService

public java.util.List<PersonToTechServiceTO> getPersonRolesByTechService(java.lang.String techServiceId,
                                                                         RequestOptionsTO requestOptionsTO)
                                                                  throws OrganizationException
Description copied from interface: RoleOfPartyManager
Retrieve all links between the given tech service and a person

Specified by:
getPersonRolesByTechService in interface RoleOfPartyManager
Parameters:
techServiceId - a TechnicalService id
requestOptionsTO - sort, pagination and case sensitive parameters, could be null
Returns:
a List of PersonToTechServiceTO roles between Persons and the given TechnicalService
Throws:
OrganizationException - if an error occurs during roles retrieval

getRolesTypes

public java.lang.String[] getRolesTypes(RoleOfPartyManager.LINK_TYPE linkType,
                                        RequestOptionsTO options)
                                 throws OrganizationException
Description copied from interface: RoleOfPartyManager
Get all role types for a particular link type. For exemple, the list of role type for a link between an organization and an endpoint is: "Analyst", "Consumer", "Owner", "Provider".

Specified by:
getRolesTypes in interface RoleOfPartyManager
Parameters:
linkType - a RoleOfPartyManager.LINK_TYPE
options - sort, pagination and case sensitive parameters, could be null
Returns:
all role types as String array for a particular RoleOfPartyManager.LINK_TYPE
Throws:
OrganizationException - if an error occurs during role types retrieval

removeRole

public void removeRole(java.lang.String roleId)
                throws OrganizationException
Description copied from interface: RoleOfPartyManager
Remove a role from the registry

Specified by:
removeRole in interface RoleOfPartyManager
Parameters:
roleId - a role ( Link) id
Throws:
OrganizationException - if an error occurs during role removal

setTransfertObjectAssembler

public void setTransfertObjectAssembler(TransfertObjectAssembler transfertObjectAssembler)

setUniversalORMDAO

public void setUniversalORMDAO(UniversalORMDAO universalORMDAO)

setEntityLinkManager

public void setEntityLinkManager(EntityLinkManager entityLinkManager)


Copyright © 2008-2009 eBMWebsourcing. All Rights Reserved.