org.jasig.portal.layout.dlm.remoting
Class GroupListHelperImpl

java.lang.Object
  extended by org.jasig.portal.layout.dlm.remoting.GroupListHelperImpl
All Implemented Interfaces:
IGroupListHelper

public class GroupListHelperImpl
extends Object
implements IGroupListHelper


Constructor Summary
GroupListHelperImpl()
           
 
Method Summary
 JsonEntityBean getEntity(String entityType, String entityId, boolean populateChildren)
          Retrieve an individual entity matching the specified type and id.
 List<JsonEntityBean> getEntityBeans(List<String> params)
          Get a list of JsonEntityBeans for a supplied list of string identifiers, where an identifier consists of a colon-separated pairing of entity type and entity ID.
 String getEntityType(IGroupMember entity)
          Return the string representation of the type of a specified entity object.
 String lookupEntityName(JsonEntityBean entity)
          Convenience method that looks up the name of the given group member.
 Set<JsonEntityBean> search(String entityType, String searchTerm)
          Search for entities of a specified entity type using a search string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupListHelperImpl

public GroupListHelperImpl()
Method Detail

search

public Set<JsonEntityBean> search(String entityType,
                                  String searchTerm)
Description copied from interface: IGroupListHelper
Search for entities of a specified entity type using a search string.

Specified by:
search in interface IGroupListHelper
Parameters:
entityType - entity type to search for
searchTerm - search string
Returns:
set of matching JsonEntityBeans

getEntity

public JsonEntityBean getEntity(String entityType,
                                String entityId,
                                boolean populateChildren)
Description copied from interface: IGroupListHelper
Retrieve an individual entity matching the specified type and id. If populateChildren is set to true populate the entity bean with the entity's children before returning it. This argument will be ignored entirely if the entity is not of a group type, since non-group entities may not have children.

Specified by:
getEntity in interface IGroupListHelper
Parameters:
entityType - type of the entity to be returned
entityId - ID of the entity to be returned
populateChildren - true to populate the bean with children
Returns:
JsonEntityBean representation or null

getEntityType

public String getEntityType(IGroupMember entity)
Description copied from interface: IGroupListHelper
Return the string representation of the type of a specified entity object.

Specified by:
getEntityType in interface IGroupListHelper
Parameters:
entity - Entity whose type needs to be determined
Returns:
One of the possible EntityEnum string representations

getEntityBeans

public List<JsonEntityBean> getEntityBeans(List<String> params)
Description copied from interface: IGroupListHelper
Get a list of JsonEntityBeans for a supplied list of string identifiers, where an identifier consists of a colon-separated pairing of entity type and entity ID. For example, a Person Group entity with they key local.0 would be indicated by the identifier string "group:local.0".

Specified by:
getEntityBeans in interface IGroupListHelper
Parameters:
params - List of string identifiers
Returns:
List of matching JsonEntityBeans

lookupEntityName

public String lookupEntityName(JsonEntityBean entity)

Convenience method that looks up the name of the given group member. Used for person types.

Specified by:
lookupEntityName in interface IGroupListHelper
Parameters:
groupMember - Entity to look up
Returns:
groupMember's name or null if there's an error


Copyright © 2010 Jasig. All Rights Reserved.