AtnManagerProxy Class

com.bea.p13n.security.management.authentication
AtnManagerProxy Class

public class AtnManagerProxy

    extends Object

This class provides access to all user and group management functions as defined by the WLS Security Service Provider Interface (SSPI). This class acts as a proxy for a single, configured Authentication Provider plug-in by proxying calls to the UserProvider and GroupProvider classes.

This class should not contain any layered product dependencies.

Since it is possible that an Authentication Provider may not implement all optional management interfaces, an OperationNotSupportedException may be thrown.

This class is constructed using the AtnProviderDescription.

Related Topics

AtnSecurityMgmtHelper


Hierarchy
Object
  AtnManagerProxy

Constructor Summary

AtnManagerProxy(AtnProviderDescription aProviderDescription, boolean cacheAdminMBean)

AtnManagerProxy(AtnProviderDescription aProviderDescription)

 

Method Summary

public void
addGroupToGroup(String parentGroup, String childGroup)
Add a child group to a group within this provider.
public void
addUserToGroup(String groupName, String userName)
Add a user to an existing group within this provider.
public void
createGroup(String groupName)
Create a new group within this provider.
public void
createUser(String userName, String password)
Creates a user with the given username and password.
public List
getAllGroupNames()
Retrieve a list of all groups from this provider.
public List
getChildGroupNames(String groupName)
Retrieve a list of all children of a group within this provider.
public List
getGroupNamesForUser(String userName)
Retrieve a list of all groups that a given user belongs to within this provider.
public String
getName()
The name of the provider is the AtnProviderDescription's name
public String
getUniqueName()
Get the unique name for this AtnManagerProxy.
public List
getUserNames(String searchExpression, int limit)
Returns a List of user names matching the search expression
public List
getUsernamesForGroup(String groupName)
Retrieve a list of all users in a group in this provider.
public List
getUsernamesForGroup(String groupName, String searchExpression, int limit)
Retrieve a list of users in a group within this provider, matching the provided wildcard expression.
public boolean
groupExists(String groupName)
Determines if a group exists within this provider (does not check all providers).
public boolean
isDescendent(String ancestor, String descendent)
Determine if one group is a descendent of another.
public boolean
isMemberGroup(String groupNameParent, String userNameChild, boolean recurse)
Determine if a group is a member of a group.
public boolean
isMemberUser(String groupName, String userName, boolean recurse)
Determine if a user is a member of a group.
public void
removeGroup(String groupName)
Remove a group from this provider.
public void
removeGroupFromGroup(String parentGroup, String childGroup)
Remove a child group from an existing group within this provider.
public void
removeUser(String userName)
Removes a user from the system.
public void
removeUserFromGroup(String groupName, String userName)
Remove a user from an existing group within this provider.
public void
setPassword(String userName, String password)
Sets the password for a user in the realm.
public boolean
userExists(String userName)
Determines if a user exists.
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   

Constructor Detail

AtnManagerProxy

public AtnManagerProxy(AtnProviderDescription aProviderDescription, 
                       boolean cacheAdminMBean)

AtnManagerProxy

public AtnManagerProxy(AtnProviderDescription aProviderDescription)
 

Method Detail

addGroupToGroup(String, String) Method

public void addGroupToGroup(String parentGroup, 
                            String childGroup)
throws OperationNotSupportedException
Add a child group to a group within this provider.

Parameters

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

Exceptions

OperationNotSupportedException

addUserToGroup(String, String) Method

public void addUserToGroup(String groupName, 
                           String userName)
throws OperationNotSupportedException
Add a user to an existing group within this provider.

Parameters

groupName
the name of the group to modify
userName
the name of the user to add

Exceptions

OperationNotSupportedException

createGroup(String) Method

public void createGroup(String groupName)
throws GroupAlreadyExistsException, InvalidGroupnameException, OperationNotSupportedException
Create a new group within this provider. This method will always check to insure the group name is not a reserved WLS group name or a reserved group name as listed in the Security Provider Service settings in the Portal Admin tool.

Parameters

groupName
the name of the group to create.

Exceptions

GroupAlreadyExistsException
InvalidGroupnameException
OperationNotSupportedException

createUser(String, String) Method

public void createUser(String userName, 
                       String password)
throws UserAlreadyExistsException, InvalidUsernameException, InvalidPasswordException, OperationNotSupportedException
Creates a user with the given username and password.

Parameters

userName
the username for the new user
password
the password for the new user

Exceptions

UserAlreadyExistsException
InvalidUsernameException
InvalidPasswordException
OperationNotSupportedException

getAllGroupNames() Method

public List getAllGroupNames()
throws OperationNotSupportedException
Retrieve a list of all groups from this provider.

Exceptions

OperationNotSupportedException

getChildGroupNames(String) Method

public List getChildGroupNames(String groupName)
throws OperationNotSupportedException
Retrieve a list of all children of a group within this provider.

Parameters

groupName
the group to query

Returns

a List of Strings containing the children which are groups

Exceptions

OperationNotSupportedException

getGroupNamesForUser(String) Method

public List getGroupNamesForUser(String userName)
throws OperationNotSupportedException
Retrieve a list of all groups that a given user belongs to within this provider.

Parameters

userName
the user to query

Returns

a List of Strings containing the groups

Exceptions

OperationNotSupportedException

getName() Method

public String getName()
The name of the provider is the AtnProviderDescription's name


getUniqueName() Method

public String getUniqueName()
Get the unique name for this AtnManagerProxy. It's the concatenation of the display name with the version.


getUserNames(String, int) Method

public List getUserNames(String searchExpression, 
                         int limit)
throws OperationNotSupportedException
Returns a List of user names matching the search expression

Parameters

searchExpression
a wildcard search expression
limit
a limit of results to return

Exceptions

OperationNotSupportedException

getUsernamesForGroup(String) Method

public List getUsernamesForGroup(String groupName)
throws OperationNotSupportedException
Retrieve a list of all users in a group in this provider.

Parameters

groupName
the group to query

Returns

a List of Strings containing the users

Exceptions

OperationNotSupportedException

getUsernamesForGroup(String, String, int) Method

public List getUsernamesForGroup(String groupName, 
                                 String searchExpression, 
                                 int limit)
throws OperationNotSupportedException
Retrieve a list of users in a group within this provider, 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

OperationNotSupportedException

groupExists(String) Method

public boolean groupExists(String groupName)
throws OperationNotSupportedException
Determines if a group exists within this provider (does not check all providers).

Parameters

groupName
the group name to check

Returns

true if the group exists, false otherwise

Exceptions

OperationNotSupportedException

isDescendent(String, String) Method

public boolean isDescendent(String ancestor, 
                            String descendent)
throws OperationNotSupportedException
Determine if one group is a descendent of another.

Parameters

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

Returns

true if group is a descendentl, otherwise false

Exceptions

OperationNotSupportedException

isMemberGroup(String, String, boolean) Method

public boolean isMemberGroup(String groupNameParent, 
                             String userNameChild, 
                             boolean recurse)
throws OperationNotSupportedException
Determine if a group is a member of a group.

Parameters

groupNameParent
the group to query
userNameChild
the user to look for
recurse
Extend search to descendents of groupName

Exceptions

OperationNotSupportedException

isMemberUser(String, String, boolean) Method

public boolean isMemberUser(String groupName, 
                            String userName, 
                            boolean recurse)
throws OperationNotSupportedException
Determine if a user is a member of a group.

Parameters

groupName
the group to query
userName
the user to look for
recurse
Extend search to descendents of groupName

Exceptions

OperationNotSupportedException

removeGroup(String) Method

public void removeGroup(String groupName)
throws InvalidGroupnameException, OperationNotSupportedException
Remove a group from this provider.

Parameters

groupName
of the group to remove

Exceptions

InvalidGroupnameException
if the group is protected and cannot be deleted
OperationNotSupportedException

removeGroupFromGroup(String, String) Method

public void removeGroupFromGroup(String parentGroup, 
                                 String childGroup)
throws OperationNotSupportedException
Remove a child group from an existing group within this provider.

Parameters

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

Exceptions

OperationNotSupportedException

removeUser(String) Method

public void removeUser(String userName)
throws InvalidUsernameException, OperationNotSupportedException
Removes a user from the system.

Parameters

userName
the username of the user to remove

Exceptions

InvalidUsernameException
OperationNotSupportedException

removeUserFromGroup(String, String) Method

public void removeUserFromGroup(String groupName, 
                                String userName)
throws OperationNotSupportedException
Remove a user from an existing group within this provider.

Parameters

groupName
the name of the group to modify
userName
the name of the user to remove

Exceptions

OperationNotSupportedException

setPassword(String, String) Method

public void setPassword(String userName, 
                        String password)
throws InvalidPasswordException, OperationNotSupportedException
Sets the password for a user in the realm.

Parameters

userName
the username of the user
password
the new password for the user

Exceptions

InvalidPasswordException
OperationNotSupportedException

userExists(String) Method

public boolean userExists(String userName)
throws OperationNotSupportedException
Determines if a user exists. This method simply checks all providers for a user with the given name.

Parameters

userName
the user to look for

Returns

true if the user exists, false if it does not

Exceptions

OperationNotSupportedException