org.sakaiproject.api.common.agent
Interface AgentGroupManager

All Superinterfaces:
DefaultContainer, UuidTypeResolvable
All Known Implementing Classes:
AgentGroupManagerImpl, AgentGroupManagerUserDirectoryProxy

public interface AgentGroupManager
extends DefaultContainer, UuidTypeResolvable

Since:
Sakai 2.0
Version:
$Id: AgentGroupManager.java 4178 2005-11-28 16:37:52Z lance@indiana.edu $
Author:
Lance Speelmon

Method Summary
 Agent createAgent(Node parentNode, String enterpriseId, String displayName)
          Creates an Agent in the OU specified by parentNode, with a default Agent Type.
 Agent createAgent(Node parentNode, String sessionManagerUserId, String enterpriseId, String displayName, Type agentType)
          Creates an Agent with a Type specified by agentType, contained by the OU specified by parentNode.
 Agent createAgent(String displayName)
          Creates an Agent in the default Agent OU, with a default Agent Type.
 Agent createAgent(String enterpriseId, String displayName)
          Creates an Agent in the default Agent OU, with a default Agent Type.
 Group createGroup(Node parentNode, String displayName)
          Create a Group in the container specified by parentNode.
 Group createGroup(Node parentNode, String enterpriseId, String displayName, Type groupType)
          Provides the caller with full control over the location in the SuperStructure as well as the Group Type.
 Group createGroup(String displayName)
          Create a Group in the default OU with the default Group Type.
 Group createGroup(String displayName, Type groupType)
          Creates a new Group in the default OU container but gives caller control of Group Type.
 void delete(Agent agentOrGroup)
          Delete the Agent.
 void delete(String uuid)
          Delete the Agent by UUID.
 List findTransitiveDescendents(Group group)
          Find all transitive children for a given Group.
 List findTransitiveDescendents(Group group, boolean includeThisAgent)
          Find all transitive children for a given Group.
 Agent getAgent()
          Convenience method to get the currently logged in Agent
 Agent getAgentByEnterpriseId(String enterpriseId)
          Polymorphic retrieve will include both Agent and Group objects.
 Agent getAgentBySessionManagerUserId(String sessionManagerUserId)
          Retrieve an Agent by the unique id generated by SessionManager.
 Agent getAgentByUuid(String uuid)
          Polymorphic retrieve will include both Agent and Group objects.
 Group getAnonymousGroup()
          Returns a reference to a special Group.
 Group getAuthenticatedUsers()
          Returns a reference to a special Group.
 Type getDefaultAgentType()
          The default Type for an Agent
 Type getDefaultGroupType()
          The default Type for a Group
 Group getGroupByEnterpriseId(String enterpriseId)
          Retrieve only objects of type Group.
 Group getGroupByUuid(String uuid)
          Retrieve only objects of type Group.
 void save(Agent agentOrGroup)
          Persist an Agent or Group.
 
Methods inherited from interface org.sakaiproject.api.common.superstructure.DefaultContainer
getDefaultContainer
 
Methods inherited from interface org.sakaiproject.api.common.type.UuidTypeResolvable
getObject
 

Method Detail

createAgent

public Agent createAgent(String displayName)
Creates an Agent in the default Agent OU, with a default Agent Type.

Parameters:
displayName -
Returns:

createAgent

public Agent createAgent(String enterpriseId,
                         String displayName)
Creates an Agent in the default Agent OU, with a default Agent Type.

Parameters:
enterpriseId - Enterprise username
displayName -
Returns:

createAgent

public Agent createAgent(Node parentNode,
                         String enterpriseId,
                         String displayName)
Creates an Agent in the OU specified by parentNode, with a default Agent Type.

Parameters:
parentNode - The OU that will contain new Agent.
enterpriseId - Enterprise username
displayName -
Returns:

createAgent

public Agent createAgent(Node parentNode,
                         String sessionManagerUserId,
                         String enterpriseId,
                         String displayName,
                         Type agentType)
Creates an Agent with a Type specified by agentType, contained by the OU specified by parentNode.

Parameters:
parentNode - Container OU for new Agent.
sessionManagerUserId - The unique id from Session.getUserId()
enterpriseId -
displayName - Text that will presented in the UI
agentType - Caller specified Agent Type.
Returns:

createGroup

public Group createGroup(String displayName)
Create a Group in the default OU with the default Group Type.

Parameters:
displayName -
Returns:

createGroup

public Group createGroup(Node parentNode,
                         String displayName)
Create a Group in the container specified by parentNode. Group is created with default Group Type.

Parameters:
parentNode - The newly created Group's parent.
displayName -
Returns:

createGroup

public Group createGroup(Node parentNode,
                         String enterpriseId,
                         String displayName,
                         Type groupType)
Provides the caller with full control over the location in the SuperStructure as well as the Group Type.

Parameters:
parentNode - The newly created Group's parent.
enterpriseId -
displayName -
groupType -
Returns:

createGroup

public Group createGroup(String displayName,
                         Type groupType)
Creates a new Group in the default OU container but gives caller control of Group Type.

Parameters:
displayName -
groupType -
Returns:

getAgent

public Agent getAgent()
Convenience method to get the currently logged in Agent

Returns:
The currently logged in Agent

getAgentByUuid

public Agent getAgentByUuid(String uuid)
Polymorphic retrieve will include both Agent and Group objects.

Parameters:
uuid -
Returns:
null if not found.

getAgentByEnterpriseId

public Agent getAgentByEnterpriseId(String enterpriseId)
Polymorphic retrieve will include both Agent and Group objects.

Parameters:
enterpriseId -
Returns:
null if not found.

getAgentBySessionManagerUserId

public Agent getAgentBySessionManagerUserId(String sessionManagerUserId)
Retrieve an Agent by the unique id generated by SessionManager.

Parameters:
sessionManagerUserId -
Returns:
See Also:
Session.getUserId()

getGroupByUuid

public Group getGroupByUuid(String uuid)
Retrieve only objects of type Group.

Parameters:
uuid -
Returns:

getGroupByEnterpriseId

public Group getGroupByEnterpriseId(String enterpriseId)
Retrieve only objects of type Group.

Parameters:
enterpriseId -
Returns:

getAnonymousGroup

public Group getAnonymousGroup()
Returns a reference to a special Group. The "Anonymous" Group virtually contains all known Agents; i.e. "Everyone" is a virtual member of this Group.

Returns:

getAuthenticatedUsers

public Group getAuthenticatedUsers()
Returns a reference to a special Group. The "Authenticated Users" Group virtually contains all Agents which are authenticated or identifiable.

Returns:

findTransitiveDescendents

public List findTransitiveDescendents(Group group)
Find all transitive children for a given Group. The passed Group will not be included in the results by default.

Parameters:
group -
Returns:
List of Agents

findTransitiveDescendents

public List findTransitiveDescendents(Group group,
                                      boolean includeThisAgent)
Find all transitive children for a given Group.

Parameters:
group -
includeThisAgent - TRUE == include passed Group in returned results. FALSE == do not include passed Group in results.
Returns:
List of Agents

save

public void save(Agent agentOrGroup)
Persist an Agent or Group.


delete

public void delete(Agent agentOrGroup)
Delete the Agent.

Parameters:
agentOrGroup -

delete

public void delete(String uuid)
Delete the Agent by UUID.

Parameters:
uuid -

getDefaultAgentType

public Type getDefaultAgentType()
The default Type for an Agent

Returns:

getDefaultGroupType

public Type getDefaultGroupType()
The default Type for a Group

Returns: