org.ow2.dragon.service.organization
Class OrganizationManagerImpl

java.lang.Object
  extended by org.ow2.dragon.service.organization.OrganizationManagerImpl
All Implemented Interfaces:
OrganizationManager

public class OrganizationManagerImpl
extends java.lang.Object
implements OrganizationManager

Author:
ofabre - eBM WebSourcing

Constructor Summary
OrganizationManagerImpl()
           
 
Method Summary
 void addCategory(java.lang.String orgId, java.lang.String categoryId, java.lang.String categoryValueId)
          Add a category to the given organization.
 void addCategory(java.lang.String orgId, java.lang.String categoryId, java.lang.String categoryValue, java.lang.String categoryDesc)
          Add a category to the given organization.
 void addIdentifier(java.lang.String orgId, java.lang.String identifierId, java.lang.String identifierValue, java.lang.String identifierDesc)
          Add an identifier to the given organization.
 void addPost(java.lang.String organizationId, java.lang.String postId)
          Add the post matching the given postId to the organization unit matching the given organizationId
 java.lang.String createOrganization(OrganizationUnitTO organizationUnitTO)
          Add a new organization unit in registry.
 java.util.List<OrganizationUnitTO> getAllOrganizations(RequestOptionsTO requestOptionsTO)
          Return the list of all organization units in the registry
 java.util.List<OrganizationUnitTO> getAllOrgsWithoutMeAndMyChildren(java.lang.String organizationId)
          Return the list of all organization units in the registry excluding me and my children
 java.util.List<KeyedRefTO> getCategoriesForOrg(java.lang.String orgId)
          Return all the categories related to the given organization unit.
 java.util.List<KeyedRefTO> getIdentifiersForOrg(java.lang.String orgId)
          Return all identifiers related to the given organization unit.
 OrganizationUnitTO getOrganization(java.lang.String organizationId)
          Retrieve the organization unit matching the given id
 GenericUnifiedDAO<OrganizationUnit,java.lang.String> getOrganizationUnitDAO()
           
 java.util.List<PostTO> getPostsByOrganization(java.lang.String orgId, RequestOptionsTO requestOptionsTO)
          Return the list of all posts that are linked to the given organization
 void removeCategories(java.lang.String orgId, java.util.List<java.lang.String> categoryIds)
          Remove a list of categories from the given organization unit.
 void removeIdentifiers(java.lang.String orgId, java.util.List<java.lang.String> identifierIds)
          Remove a list of identifiers from the given organization unit.
 void removeOrganization(java.lang.String organizationId)
          Remove the organization unit matching the given id from the registry.
 void removePost(java.lang.String organizationId, java.lang.String postId)
          Remove the post matching the given postId from the list of posts of the organization unit matching the given organizationId.
 java.util.List<OrganizationUnitTO> searchOrganization(java.lang.String searchCriteria, java.util.List<OrganizationSearchProperties> searchedProperties, RequestOptionsTO requestOptionsTO)
          Retrieve a list of organization units matching the given criteria for the given properties
 void setOrganizationUnitUnifiedDAO(OrganizationUnitUnifiedDAO organizationUnitUnifiedDAO)
           
 void setPostDAO(PostDAO postDAO)
           
 void setTransfertObjectAssembler(TransfertObjectAssembler transfertObjectAssembler)
           
 void setUniversalUnifiedDAO(UniversalUnifiedDAO universalUnifiedDAO)
           
 java.lang.String updateOrganization(OrganizationUnitTO organizationUnitTO)
          Update the organization unit in the registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrganizationManagerImpl

public OrganizationManagerImpl()
Method Detail

addPost

public void addPost(java.lang.String organizationId,
                    java.lang.String postId)
             throws OrganizationException
Description copied from interface: OrganizationManager
Add the post matching the given postId to the organization unit matching the given organizationId

Specified by:
addPost in interface OrganizationManager
Parameters:
organizationId - an OrganizationUnit id
postId - a Post id
Throws:
OrganizationException - if at least one of the given id doesn't exist in database

addCategory

public void addCategory(java.lang.String orgId,
                        java.lang.String categoryId,
                        java.lang.String categoryValueId)
                 throws OrganizationException
Description copied from interface: OrganizationManager
Add a category to the given organization. The added category is of the type of the category denoted by the categoryId argument and the selected value is denoted by the categoryValueId argument.

Specified by:
addCategory in interface OrganizationManager
Parameters:
orgId - a OrganizationUnit id
categoryId - a Category id
categoryValueId - an identifier of a CategoryValue containing category info to add
Throws:
OrganizationException - if at least one of the given id doesn't exist in database or if you try to add the same category twice

addIdentifier

public void addIdentifier(java.lang.String orgId,
                          java.lang.String identifierId,
                          java.lang.String identifierValue,
                          java.lang.String identifierDesc)
                   throws OrganizationException
Description copied from interface: OrganizationManager
Add an identifier to the given organization. The added identifier is of the type of the identifier system denoted by the identifierId argument and the identifier value is denoted by the identifierValue argument.

Specified by:
addIdentifier in interface OrganizationManager
Parameters:
orgId - an OrganizationUnit id
identifierId - an Identifier system id
identifierValue - an identifier value
identifierDesc - an identifier description, could be null or empty
Throws:
OrganizationException - if at least one of the given id doesn't exist in database

addCategory

public void addCategory(java.lang.String orgId,
                        java.lang.String categoryId,
                        java.lang.String categoryValue,
                        java.lang.String categoryDesc)
                 throws OrganizationException
Description copied from interface: OrganizationManager
Add a category to the given organization. The added category is of the type of the category denoted by the categoryId argument and the selected value is denoted by the categoryValue argument. The categoryDesc is used to describe the created category

Specified by:
addCategory in interface OrganizationManager
Parameters:
orgId - a OrganizationUnit id
categoryId - a Category id
categoryValue - a category value (UDDI: categoryValue)
categoryDesc - a category description (UDDI: categoryName), could be null or empty
Throws:
OrganizationException - if at least one of the given id doesn't exist in database or if you try to add the same category twice

createOrganization

public java.lang.String createOrganization(OrganizationUnitTO organizationUnitTO)
                                    throws OrganizationException
Description copied from interface: OrganizationManager
Add a new organization unit in registry. The organization name and city must be specified.

Specified by:
createOrganization in interface OrganizationManager
Parameters:
organizationUnitTO - the OrganizationUnitTO handling data of the OrganizationUnit to create
Returns:
the id of the added OrganizationUnit
Throws:
OrganizationException - if you try to create an organization with name/city that already exists or an organization without name and city

getAllOrganizations

public java.util.List<OrganizationUnitTO> getAllOrganizations(RequestOptionsTO requestOptionsTO)
Description copied from interface: OrganizationManager
Return the list of all organization units in the registry

Specified by:
getAllOrganizations in interface OrganizationManager
Parameters:
requestOptionsTO - sort, pagination and case sensitive parameters, could be null
Returns:
the List of all OrganizationUnitTO in the registry, couldn't be null, can be empty

getOrganization

public OrganizationUnitTO getOrganization(java.lang.String organizationId)
                                   throws OrganizationException
Description copied from interface: OrganizationManager
Retrieve the organization unit matching the given id

Specified by:
getOrganization in interface OrganizationManager
Parameters:
organizationId - an OrganizationUnit id
Returns:
the OrganizationUnitTO handling data of the OrganizationUnit that matches the given id
Throws:
OrganizationException - if no organization found for the given id

getAllOrgsWithoutMeAndMyChildren

public java.util.List<OrganizationUnitTO> getAllOrgsWithoutMeAndMyChildren(java.lang.String organizationId)
                                                                    throws OrganizationException
Description copied from interface: OrganizationManager
Return the list of all organization units in the registry excluding me and my children

Specified by:
getAllOrgsWithoutMeAndMyChildren in interface OrganizationManager
Returns:
the List of all OrganizationUnitTO in the registry excluding me and my children
Throws:
OrganizationException - if an error occurs during organization units retrieval

getOrganizationUnitDAO

public GenericUnifiedDAO<OrganizationUnit,java.lang.String> getOrganizationUnitDAO()

getCategoriesForOrg

public java.util.List<KeyedRefTO> getCategoriesForOrg(java.lang.String orgId)
                                               throws OrganizationException
Description copied from interface: OrganizationManager
Return all the categories related to the given organization unit. Categories are keyed references as specified in the UDDI specification

Specified by:
getCategoriesForOrg in interface OrganizationManager
Parameters:
orgId - an OrganizationUnit id
Returns:
a List of categories ( KeyedRefTO )
Throws:
OrganizationException - if not organization found for the given id

removeCategories

public void removeCategories(java.lang.String orgId,
                             java.util.List<java.lang.String> categoryIds)
                      throws OrganizationException
Description copied from interface: OrganizationManager
Remove a list of categories from the given organization unit.

Specified by:
removeCategories in interface OrganizationManager
Parameters:
orgId - an OrganizationUnit id
categoryIds - a List of category ids
Throws:
OrganizationException - if no organization found for the given id

getIdentifiersForOrg

public java.util.List<KeyedRefTO> getIdentifiersForOrg(java.lang.String orgId)
                                                throws OrganizationException
Description copied from interface: OrganizationManager
Return all identifiers related to the given organization unit. Identifiers are keyed references as specified in the UDDI specification

Specified by:
getIdentifiersForOrg in interface OrganizationManager
Parameters:
orgId - an OrganizationUnit id
Returns:
a List of identifiers ( KeyedRefTO )
Throws:
OrganizationException - if no organization found for the given id

removeIdentifiers

public void removeIdentifiers(java.lang.String orgId,
                              java.util.List<java.lang.String> identifierIds)
                       throws OrganizationException
Description copied from interface: OrganizationManager
Remove a list of identifiers from the given organization unit.

Specified by:
removeIdentifiers in interface OrganizationManager
Parameters:
orgId - an OrganizationUnit id
identifierIds - a List of identifier ids
Throws:
OrganizationException - if no organization found for the given id

removeOrganization

public void removeOrganization(java.lang.String organizationId)
Description copied from interface: OrganizationManager
Remove the organization unit matching the given id from the registry.

Specified by:
removeOrganization in interface OrganizationManager
Parameters:
organizationId - an OrganizationUnit id

removePost

public void removePost(java.lang.String organizationId,
                       java.lang.String postId)
                throws OrganizationException
Description copied from interface: OrganizationManager
Remove the post matching the given postId from the list of posts of the organization unit matching the given organizationId. The post isn't removed from the registry and can be re-affected to any organization

Specified by:
removePost in interface OrganizationManager
Parameters:
organizationId - an OrganizationUnit id
postId - a Post id
Throws:
OrganizationException - if no organization found for the given id

searchOrganization

public java.util.List<OrganizationUnitTO> searchOrganization(java.lang.String searchCriteria,
                                                             java.util.List<OrganizationSearchProperties> searchedProperties,
                                                             RequestOptionsTO requestOptionsTO)
                                                      throws OrganizationException
Description copied from interface: OrganizationManager
Retrieve a list of organization units matching the given criteria for the given properties

Specified by:
searchOrganization in interface OrganizationManager
Parameters:
searchCriteria - the search criteria (a String containing criteria separated with whitespaces), mustn't be empty
searchedProperties - the searched properties, mustn't be empty
requestOptionsTO - sort, pagination and case sensitive parameters, could be null
Returns:
a List of OrganizationUnitTO matching the given criteria for the given properties
Throws:
OrganizationException - if you try to search orgs without specifying search criteria

setOrganizationUnitUnifiedDAO

public void setOrganizationUnitUnifiedDAO(OrganizationUnitUnifiedDAO organizationUnitUnifiedDAO)

setPostDAO

public void setPostDAO(PostDAO postDAO)

setTransfertObjectAssembler

public void setTransfertObjectAssembler(TransfertObjectAssembler transfertObjectAssembler)

getPostsByOrganization

public java.util.List<PostTO> getPostsByOrganization(java.lang.String orgId,
                                                     RequestOptionsTO requestOptionsTO)
                                              throws OrganizationException
Description copied from interface: OrganizationManager
Return the list of all posts that are linked to the given organization

Specified by:
getPostsByOrganization in interface OrganizationManager
Parameters:
orgId - an OrganizationUnit id
requestOptionsTO - sort, pagination and case sensitive parameters, could be null
Returns:
the List of all PostTOs that are linked to the given organization
Throws:
OrganizationException - if an error occurs during posts retrieval

updateOrganization

public java.lang.String updateOrganization(OrganizationUnitTO organizationUnitTO)
                                    throws OrganizationException
Description copied from interface: OrganizationManager
Update the organization unit in the registry.

Specified by:
updateOrganization in interface OrganizationManager
Parameters:
organizationUnitTO - the OrganizationUnitTO handling data of the OrganizationUnit to update
Returns:
the updated organization unit ID
Throws:
OrganizationException - if an error occurs during organization unit update : organization to update doesn't exist or have the same name and city as an other registered organization

setUniversalUnifiedDAO

public void setUniversalUnifiedDAO(UniversalUnifiedDAO universalUnifiedDAO)


Copyright © 2008-2009 eBMWebsourcing. All Rights Reserved.