org.ow2.dragon.ui.uibeans.organization
Class ListOfPostsBean

java.lang.Object
  extended by org.ow2.dragon.ui.uibeans.organization.ListOfPostsBean

public class ListOfPostsBean
extends java.lang.Object

This bean holds a list of posts. It is initialized either by loading all posts from the database, or by searching directors by keywords on various fields.

This version of the bean performs the search when loading, then lets the framework manage sort and pagination. This design may only be used if you're sure the amount of data is "reasonable" and under control.

Author:
ambarthe, ofabre

Constructor Summary
ListOfPostsBean()
           
 
Method Summary
 java.util.List<org.ow2.dragon.api.to.organization.PostTO> getFreePosts()
           
 boolean getIsSearchOnDescription()
           
 boolean getIsSearchOnName()
           
 boolean getIsSearchOnNature()
           
 java.util.List<org.ow2.dragon.api.to.organization.PostTO> getOrgPosts()
           
 java.util.List<org.ow2.dragon.api.to.organization.PostTO> getPosts()
           
 java.util.List<org.ow2.dragon.api.to.organization.PostTO> getPostsToAdd()
           
 java.lang.String getSearchCriteria()
           
 void loadAll()
          Loads all posts from the database
 void loadByOrganization(java.lang.String orgId)
          Loads all posts from the database
 void loadFree(javax.servlet.http.HttpServletRequest request)
          Loads all posts from the database
 void noOrgSelected()
          TODO to be replaced by a more elegant solution
 java.lang.String search()
          Search on multiple criteria and considering the person's choice (ticking or not a field to search)
 void setIsSearchOnDescription(boolean isSearchOnDescription)
           
 void setIsSearchOnName(boolean isSearchOnName)
           
 void setIsSearchOnNature(boolean isSearchOnNature)
           
 void setSearchCriteria(java.lang.String searchCriteria)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListOfPostsBean

public ListOfPostsBean()
Method Detail

loadAll

public void loadAll()
             throws org.ow2.opensuit.core.error.LocalizedError
Loads all posts from the database

Throws:
org.ow2.opensuit.core.error.LocalizedError

loadByOrganization

public void loadByOrganization(java.lang.String orgId)
                        throws org.ow2.opensuit.core.error.LocalizedError
Loads all posts from the database

Throws:
org.ow2.opensuit.core.error.LocalizedError

loadFree

public void loadFree(javax.servlet.http.HttpServletRequest request)
              throws org.ow2.opensuit.core.error.LocalizedError
Loads all posts from the database

Throws:
org.ow2.opensuit.core.error.LocalizedError

getPostsToAdd

public java.util.List<org.ow2.dragon.api.to.organization.PostTO> getPostsToAdd()

noOrgSelected

public void noOrgSelected()
TODO to be replaced by a more elegant solution


search

public java.lang.String search()
                        throws org.ow2.opensuit.core.error.LocalizedError
Search on multiple criteria and considering the person's choice (ticking or not a field to search)

Returns:
Throws:
org.ow2.opensuit.core.error.LocalizedError

getPosts

public java.util.List<org.ow2.dragon.api.to.organization.PostTO> getPosts()

getFreePosts

public java.util.List<org.ow2.dragon.api.to.organization.PostTO> getFreePosts()

getOrgPosts

public java.util.List<org.ow2.dragon.api.to.organization.PostTO> getOrgPosts()

getSearchCriteria

public java.lang.String getSearchCriteria()
Returns:
the searchCriteria

setSearchCriteria

public void setSearchCriteria(java.lang.String searchCriteria)
Parameters:
searchCriteria - the searchCriteria to set

getIsSearchOnName

public boolean getIsSearchOnName()
Returns:
the isSearchOnName

setIsSearchOnName

public void setIsSearchOnName(boolean isSearchOnName)
Parameters:
isSearchOnName - the isSearchOnName to set

getIsSearchOnNature

public boolean getIsSearchOnNature()
Returns:
the isSearchOnNature

setIsSearchOnNature

public void setIsSearchOnNature(boolean isSearchOnNature)
Parameters:
isSearchOnNature - the isSearchOnNature to set

getIsSearchOnDescription

public boolean getIsSearchOnDescription()
Returns:
the isSearchOnDescription

setIsSearchOnDescription

public void setIsSearchOnDescription(boolean isSearchOnDescription)
Parameters:
isSearchOnDescription - the isSearchOnDescription to set


Copyright © 2008-2009 eBMWebsourcing. All Rights Reserved.