org.ow2.dragon.api.service.organization
Interface RoleOfPartyManager

All Known Implementing Classes:
RoleOfPartyManagerImpl

@Transactional
public interface RoleOfPartyManager

This API allows to create, retrieve or delete roles between linkable entities (Endpoint, Service, Organization, Person). Method arguments must be non null, unless the contrary is explicitly specified.

Author:
ofabre - eBM WebSourcing

Nested Class Summary
static class RoleOfPartyManager.LINK_TYPE
          An enumeration of all available types of links between registry entities
 
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 iOptions)
          Get all role types for a particular link type.
 void removeRole(java.lang.String roleId)
          Remove a role from the registry
 

Method Detail

createEndpointRole

java.lang.String createEndpointRole(java.lang.String partyId,
                                    java.lang.String endpointId,
                                    java.lang.String type)
                                    throws OrganizationException
Create a link between a party (person or organization) and an endpoint

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 one of the link end doesn't exist in registry

createTechServiceRole

java.lang.String createTechServiceRole(java.lang.String partyId,
                                       java.lang.String technicalServiceId,
                                       java.lang.String type)
                                       throws OrganizationException
Create a link between a party (person or organization) and a tech service

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 one of the link end doesn't exist in registry

getOrgRolesByEndpoint

@Transactional(readOnly=true)
java.util.List<OrgToEndpointTO> getOrgRolesByEndpoint(java.lang.String endpointId,
                                                                    RequestOptionsTO requestOptionsTO)
Retrieve all links between the given endpoint and an organization

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

getOrgRolesByTechService

@Transactional(readOnly=true)
java.util.List<OrgToTechServiceTO> getOrgRolesByTechService(java.lang.String techServiceId,
                                                                          RequestOptionsTO requestOptionsTO)
Retrieve all links between the given tech service and an organization

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

getPersonRolesByEndpoint

@Transactional(readOnly=true)
java.util.List<PersonToEndpointTO> getPersonRolesByEndpoint(java.lang.String endpointId,
                                                                          RequestOptionsTO requestOptionsTO)
Retrieve all links between the given endpoint and a person

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

getPersonRolesByTechService

@Transactional(readOnly=true)
java.util.List<PersonToTechServiceTO> getPersonRolesByTechService(java.lang.String techServiceId,
                                                                                RequestOptionsTO requestOptionsTO)
Retrieve all links between the given tech service and a person

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

getRolesTypes

@Transactional(readOnly=true)
java.lang.String[] getRolesTypes(RoleOfPartyManager.LINK_TYPE linkType,
                                               RequestOptionsTO iOptions)
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".

Parameters:
linkType - a RoleOfPartyManager.LINK_TYPE
iOptions - sort, pagination and case sensitive parameters, could be null
Returns:
all role types as String array for a particular RoleOfPartyManager.LINK_TYPE

removeRole

void removeRole(java.lang.String roleId)
Remove a role from the registry

Parameters:
roleId - a role ( Link) id


Copyright © 2008-2009 eBMWebsourcing. All Rights Reserved.