org.ow2.dragon.service.organization
Class PostManagerImpl

java.lang.Object
  extended by org.ow2.dragon.service.organization.PostManagerImpl
All Implemented Interfaces:
PostManager

public class PostManagerImpl
extends java.lang.Object
implements PostManager

Author:
ofabre - eBM WebSourcing

Constructor Summary
PostManagerImpl()
           
 
Method Summary
 java.lang.String createPost(PostTO postTO)
          Add a new post in registry.
 java.util.List<PostTO> getAllPosts(RequestOptionsTO requestOptionsTO)
          Return the list of all posts in the registry
 PostTO getPost(java.lang.String postId)
          Retrieve the post matching the given id
 java.util.List<PostTO> getPostsNotLinkedToOrganization(java.lang.String orgId, RequestOptionsTO requestOptionsTO)
          Return the list of all posts in the registry that aren't linked to the given organization
 void removePost(java.lang.String postId)
          Remove the post matching the given id from the registry
 void setOrganizationUnitDAO(OrganizationUnitDAO organizationUnitDAO)
           
 void setPostDAO(PostDAO postDAO)
           
 void setTransfertObjectAssembler(TransfertObjectAssembler transfertObjectAssembler)
           
 java.lang.String updatePost(PostTO postTO)
          Update the post in the registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostManagerImpl

public PostManagerImpl()
Method Detail

createPost

public java.lang.String createPost(PostTO postTO)
                            throws OrganizationException
Description copied from interface: PostManager
Add a new post in registry. The post name must be specified.

Specified by:
createPost in interface PostManager
Parameters:
postTO - the PostTO handling data of the Post to add
Returns:
the added Post id
Throws:
OrganizationException - if you try to create a post with no name or a name that already exist

getAllPosts

public java.util.List<PostTO> getAllPosts(RequestOptionsTO requestOptionsTO)
Description copied from interface: PostManager
Return the list of all posts in the registry

Specified by:
getAllPosts in interface PostManager
Parameters:
requestOptionsTO - sort, pagination and case sensitive parameters, could be null
Returns:
the List of all PostTOs in the registry. Not null, could be empty

getPost

public PostTO getPost(java.lang.String postId)
               throws OrganizationException
Description copied from interface: PostManager
Retrieve the post matching the given id

Specified by:
getPost in interface PostManager
Parameters:
postId - a Post id
Returns:
the PostTO handling data of the Post that match the given id
Throws:
OrganizationException - if you try to retrieve a post that doesn't exist

getPostsNotLinkedToOrganization

public java.util.List<PostTO> getPostsNotLinkedToOrganization(java.lang.String orgId,
                                                              RequestOptionsTO requestOptionsTO)
                                                       throws OrganizationException
Description copied from interface: PostManager
Return the list of all posts in the registry that aren't linked to the given organization

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

removePost

public void removePost(java.lang.String postId)
Description copied from interface: PostManager
Remove the post matching the given id from the registry

Specified by:
removePost in interface PostManager
Parameters:
postId - a Post id

setOrganizationUnitDAO

public void setOrganizationUnitDAO(OrganizationUnitDAO organizationUnitDAO)

setPostDAO

public void setPostDAO(PostDAO postDAO)

setTransfertObjectAssembler

public void setTransfertObjectAssembler(TransfertObjectAssembler transfertObjectAssembler)

updatePost

public java.lang.String updatePost(PostTO postTO)
                            throws OrganizationException
Description copied from interface: PostManager
Update the post in the registry. Post name and id must be specified

Specified by:
updatePost in interface PostManager
Parameters:
postTO - the PostTO handling data of the Post to update
Returns:
the updated post ID
Throws:
OrganizationException - if you try to update a post with a name that already exist or with a null or empty name, or if you try to update a post that doesn't exist


Copyright © 2008-2009 eBMWebsourcing. All Rights Reserved.