GroupManager Interface

com.bea.p13n.controls.ejb.usermgmt
GroupManager Interface

public interface GroupManager

    extends Control

Remote interface for the GroupManager session bean.
This class depends on the following EJB environment in the ejb deployment descriptor:


This control requires that the GroupManager EJB has been deployed to the application. The GroupManager EJB is contained in p13n_ejb.jar, and is automatically deployed as part of a Portal application.
Security requirements: The caller must be in the role of "PortalSystemAdministrator" to invoke most of these methods

This control is deprecated as of Portal 8.1.x. Each method will note the replacement control and method to use.


All Superinterfaces
Control, Control, Serializable

Method Summary

public void
addGroupToGroup(String parentGroup, String childGroup)
Add a child group to a group Caller must be in the role of PortalSystemAdminstrator
public void
addUserToGroup(String groupname, String username)
Add a user to a group.
public ProfileWrapper
createGroup(String name)
Caller must be in the role of PortalSystemAdminstrator
public List
getAllGroupNames()
Caller must be in the role of PortalSystemAdminstrator
public List
getChildGroupNames(String groupname)
Caller must be in the role of PortalSystemAdminstrator Retrieve a list of all children of a group.
public List
getGroupNamesForUser(String username)
Retrieve a list of all groups that a user belongs to.
public ProfileWrapper
getGroupProfile(String name)
Get the profile for this group.
public ProfileManager
getGroupProfileManager(String name)
Returns a profile manager that can be used to access a group's profile.
public String
getParentGroupName(String groupname)
Retrieve the parent of a group.
public List
getTopLevelGroupNames()
Retrieve a list of groups that do not have parent groups.
public List
getUsernamesForGroup(String groupname)
public List
getUsernamesForGroupLimited(String groupname, String searchExpression, int limit)
Retrieve a list of users in a group, matching the provided wildcard expression
public boolean
groupExists(String group)
Determines if a group exists in the realm.
public boolean
isDeletableGroup(String groupName)
Determine if a group can be deleted.
public boolean
isDescendent(String ancestor, String descendent)
Determine if one group is a descendent of another.
public boolean
isMember(String groupname, String username)
Determine if a user is a member of a group.
public void
removeGroup(String groupname)
Remove a group.
public void
removeGroupFromGroup(String parentGroup, String childGroup)
Remove a child group from a group Caller must be in the role of PortalSystemAdminstrator
public void
removeUserFromGroup(String groupname, String username)
Remove a user from a group Caller must be in the role of PortalSystemAdminstrator

Method Detail

addGroupToGroup(String, String) Method

DEPRECATED As of Portal 8.1.x, use GroupProviderControl.addGroupToGroup(parentGroup, childGroup)

public void addGroupToGroup(String parentGroup, 
                            String childGroup)
throws P13nControlException
Add a child group to a group Caller must be in the role of PortalSystemAdminstrator

Parameters

parentGroup
the name of the group to modify
childGroup
the name of the group to add

Exceptions

P13nControlException
if the child group cannot be added to the group or caller is not in allowed role

addUserToGroup(String, String) Method

DEPRECATED As of Portal 8.1.x, use GroupProviderControl.addUserToGroup(groupname, username)

public void addUserToGroup(String groupname, 
                           String username)
throws P13nControlException
Add a user to a group. Caller must be in the role of PortalSystemAdminstrator

Parameters

groupname
the name of the group to modify
username
the name of the user to add

Exceptions

P13nControlException
if the user cannot be added to the group or caller is not in allowed role

createGroup(String) Method

DEPRECATED As of Portal 8.1.x, use GroupProviderControl.createGroup(name)

public ProfileWrapper createGroup(String name)
throws P13nControlException
Caller must be in the role of PortalSystemAdminstrator

Parameters

name
name of the group to create

Exceptions

P13nControlException
if name is invalid or if group already exists or caller is not in allowed role

getAllGroupNames() Method

DEPRECATED As of Portal 8.1.x, use GroupProviderControl.getAllGroupNames()

public List getAllGroupNames()
throws P13nControlException
Caller must be in the role of PortalSystemAdminstrator

Exceptions

P13nControlException
if remote errors from the GroupManager EJB

getChildGroupNames(String) Method

DEPRECATED As of Portal 8.1.x, use GroupProviderControl.getChildGroupNames(groupname)

public List getChildGroupNames(String groupname)
throws P13nControlException
Caller must be in the role of PortalSystemAdminstrator Retrieve a list of all children of a group.

Parameters

groupname
the group to query

Exceptions

P13nControlException
if remote errors from the GroupManager EJB or caller is not in allowed role

getGroupNamesForUser(String) Method

DEPRECATED As of Portal 8.1.x, use GroupProviderControl.getGroupNamesForUser(username)

public List getGroupNamesForUser(String username)
throws P13nControlException
Retrieve a list of all groups that a user belongs to.

Parameters

username
the user to query

Exceptions

P13nControlException
if remote errors from the GroupManager EJB

getGroupProfile(String) Method

DEPRECATED As of Portal 8.1.x, use UserProfileControl.getProfileForGroup(name)

public ProfileWrapper getGroupProfile(String name)
throws P13nControlException
Get the profile for this group. Caller must be in the role of PortalSystemAdminstrator

Parameters

name
the name of the group to access

Returns

the profile representing the group

Exceptions

P13nControlException
if profile is not found or caller is not in allowed role

getGroupProfileManager(String) Method

DEPRECATED Use ProfileControl.getGroupProfileManager(name)

public ProfileManager getGroupProfileManager(String name)
throws P13nControlException
Returns a profile manager that can be used to access a group's profile. If the requested group exists in the realm but does not have a profile yet, a new profile will be created at this time.

Parameters

name
the name of the group to access

Returns

the GroupProfileManager

Exceptions

P13nControlException
if the group is not in the realm or caller is not in allowed role

getParentGroupName(String) Method

DEPRECATED As of Portal 8.1.x, use GroupProviderControl.getParentGroupNames(groupname)

public String getParentGroupName(String groupname)
throws P13nControlException
Retrieve the parent of a group. Assumes that a group will only have one parent, as enforced by the GroupManager. If your realm has groups with more than one parent, the first one encountered will be returned. Caller must be in the role of PortalSystemAdminstrator

Parameters

groupname
the group to query

Exceptions

P13nControlException
if runtime errors occur or caller is not in allowed role

getTopLevelGroupNames() Method

DEPRECATED As of Portal 8.1.x, use GroupProviderControl.getTopLevelGroupNames()

public List getTopLevelGroupNames()
throws P13nControlException
Retrieve a list of groups that do not have parent groups. This will not return the built-in WLS "everyone" or "users" groups. Caller must be in the role of PortalSystemAdminstrator

Exceptions

P13nControlException
if runtime errors occur or caller is not in allowed role

getUsernamesForGroup(String) Method

DEPRECATED As of Portal 8.1.x, use GroupProviderControl.getUsernamesForGroup(groupname)

public List getUsernamesForGroup(String groupname)
throws P13nControlException

Exceptions

P13nControlException
if runtime errors

getUsernamesForGroupLimited(String, String, int) Method

DEPRECATED As of Portal 8.1.x, use GroupProviderControl.getUsernamesForGroupLimited(groupname, searchExpression, limit)

public List getUsernamesForGroupLimited(String groupname, 
                                        String searchExpression, 
                                        int limit)
throws P13nControlException
Retrieve a list of users in a group, matching the provided wildcard expression

Parameters

groupname
the group to query
searchExpression
a wildcard expression to match
limit
the maximum number of results to return

Returns

a List of usernames that are in this group

Exceptions

P13nControlException
if runtime errors occur

groupExists(String) Method

DEPRECATED As of Portal 8.1.x, use GroupProviderControl.groupExists(group)

public boolean groupExists(String group)
throws P13nControlException
Determines if a group exists in the realm.

Parameters

group
the group name to check

Returns

true if the group exists, false otherwise

Exceptions

P13nControlException
if runtime errors

isDeletableGroup(String) Method

public boolean isDeletableGroup(String groupName)
throws P13nControlException
Determine if a group can be deleted. Caller must be in the role of PortalSystemAdminstrator

Returns

false if the group name given is protected by the system in any way

Exceptions

P13nControlException
if runtime errors or caller is not in allowed role

isDescendent(String, String) Method

DEPRECATED As of Portal 8.1.x, use GroupProviderControl.isDescendent(ancestor, descendent)

public boolean isDescendent(String ancestor, 
                            String descendent)
throws P13nControlException
Determine if one group is a descendent of another. Caller must be in the role of PortalSystemAdminstrator

Parameters

ancestor
see if the other group is a descendent of this group
descendent
see if this is a descendent of the other group

Exceptions

P13nControlException
if runtime errors or caller is not in allowed role

isMember(String, String) Method

DEPRECATED As of Portal 8.1.x, use GroupProviderControl.isMemberGroup(groupname, username, recurse)

public boolean isMember(String groupname, 
                        String username)
throws P13nControlException
Determine if a user is a member of a group.

Parameters

groupname
the group to query
username
the user to look for

Exceptions

P13nControlException
if runtime errors

removeGroup(String) Method

DEPRECATED As of Portal 8.1.x, use GroupProviderControl.removeGroup(groupname)

public void removeGroup(String groupname)
throws P13nControlException
Remove a group. This will remove the group from both the realm and the profile tables. Caller must be in the role of PortalSystemAdminstrator

Parameters

groupname
name of the group to remove

Exceptions

P13nControlException
if the group is protected and cannot be deleted or caller is not in allowed role

removeGroupFromGroup(String, String) Method

DEPRECATED As of Portal 8.1.x, use GroupProviderControl.removeGroupFromGroup(parentGroup, childGroup)

public void removeGroupFromGroup(String parentGroup, 
                                 String childGroup)
throws P13nControlException
Remove a child group from a group Caller must be in the role of PortalSystemAdminstrator

Parameters

parentGroup
the name of the group to modify
childGroup
the name of the group to remove

Exceptions

P13nControlException
if the group is not found or caller is not in allowed role

removeUserFromGroup(String, String) Method

DEPRECATED As of Portal 8.1.x, use GroupProviderControl.removeUserFromGroup(groupname, username)

public void removeUserFromGroup(String groupname, 
                                String username)
throws P13nControlException
Remove a user from a group Caller must be in the role of PortalSystemAdminstrator

Parameters

groupname
the name of the group to modify
username
the name of the user to remove

Exceptions

P13nControlException
if user or group is not found, or caller is not in allowed role