com.ibm.portal.um
Interface PumaController

All Superinterfaces:
PumaProfile

public interface PumaController
extends PumaProfile

The PumaController provides functions to read and/or write attributes of com.ibm.portal.um.User,com.ibm.portal.um.Group objects.
An instance of this Interface can be retrieved by calling com.ibm.portal.um.PumaHome, com.ibm.portal.um.portletservice.PumaHome or com.ibm.portal.um.portletservice.legacy.PumaHome

Since:
5.1.0.1
See Also:
PumaHome, PumaHome, PumaHome

Field Summary
 
Fields inherited from interface com.ibm.portal.um.PumaProfile
EXTERNAL_USERS_PARENT_DN_ALIAS
 
Method Summary
 void addAttributes(Principal aPrincipal, java.util.Map<java.lang.String,?> aValueMap)
          Adds the given Attributes to the given Principal.
 void addToGroup(Group aGroup, java.util.List<? extends Principal> aPrincipals)
          Adds the given Principals to the given Group
 Group createGroup(java.lang.String aName, java.lang.String parentDN, java.util.Map<java.lang.String,?> aInitialAttributes)
          Creates a new Groups with the given shortname for the given Parent dn and the available initial Attributes
The character encoding used as input for attribute key and value must match the encoding acceptable by the user store
 User createUser(java.lang.String aName, java.lang.String parentDN, java.util.Map<java.lang.String,?> aInitialAttributes)
          Creates a new User with the given shortname for the given Parent DN and the available initial Attributes.

 User createUser(java.lang.String aName, java.lang.String parentDN, java.util.Map<java.lang.String,?> aInitialAttributes, java.lang.String initalApplicationRole)
          Creates a new User with the given shortname for the given Parent DN and the available initial Attributes and assigns it the given application role

 void deleteGroup(Group aGroup)
          Removes the provided Group from the backend system.
 void deleteUser(User aUser)
          Removes the provided User from the backend system.
 void removeAttributes(Principal aPrincipal, java.util.List<java.lang.String> aAttributeNames)
          Removes the given attributes from the given Principal
The character encoding used as input for attribute key must match the encoding acceptable by the user store
 void removeFromGroup(Group aGroup, java.util.List<? extends Principal> aPrincipals)
          Removes the given Principals from the given Group
 void setAttributes(Principal aPrincipal, java.util.Map<java.lang.String,?> aValueMap)
          Sets the given Attributes at the given Principal.
 
Methods inherited from interface com.ibm.portal.um.PumaProfile
getAllParentDNs, getAttributes, getAttributes, getCurrentUser, getDefinedGroupAttributeDefinitions, getDefinedUserAttributeDefinitions, getDefinedUserAttributeNames, getExternalParentDN, getGroupAttributeDefinition, getGroupDefaultSearchAttributeName, getIdentifier, getMandatoryGroupAttributeNames, getMandatoryUserAttributeNames, getParentDN, getUserAttributeDefinition, getUserDefaultSearchAttributeName, isExternal, matchesParentDN, reload
 

Method Detail

setAttributes

void setAttributes(Principal aPrincipal,
                   java.util.Map<java.lang.String,?> aValueMap)
                   throws PumaAttributeException,
                          PumaSystemException,
                          PumaModelException,
                          PumaMissingAccessRightsException
Sets the given Attributes at the given Principal. If a given attribute is already defined at the Principal this attribute will be overwritten.
The character encoding used as input for attribute key and value must match the encoding acceptable by the user store

Parameters:
aPrincipal - the Principal to be modified, null is not allowed as input parameter
aValueMap - a name/value map including the AttributeNames as keys
Throws:
PumaAttributeException - will be thrown if attributes are read-only, missing or not defined
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaModelException - will be thrown if the Principal could not be found
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights

addAttributes

void addAttributes(Principal aPrincipal,
                   java.util.Map<java.lang.String,?> aValueMap)
                   throws PumaAttributeException,
                          PumaSystemException,
                          PumaModelException,
                          PumaMissingAccessRightsException
Adds the given Attributes to the given Principal. If a given attribute is already defined at the Principal the new values will be added. For single value attributes the new value will replace the old one. *
The character encoding used as input for attribute key and value must match the encoding acceptable by the user store

Parameters:
aPrincipal - the Principal to be modified, null is not allowed as input parameter
aValueMap - a name/value map including the AttributeNames as keys
Throws:
PumaAttributeException - will be thrown if attributes are read-only, missing or not defined
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaModelException - will be thrown if the Principal could not be found
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights

removeAttributes

void removeAttributes(Principal aPrincipal,
                      java.util.List<java.lang.String> aAttributeNames)
                      throws PumaAttributeException,
                             PumaSystemException,
                             PumaModelException,
                             PumaMissingAccessRightsException
Removes the given attributes from the given Principal
The character encoding used as input for attribute key must match the encoding acceptable by the user store

Parameters:
aPrincipal - the Principal to be modified, null is not allowed as input parameter
aAttributeNames - the AttributeNames provided as String
Throws:
PumaAttributeException - will be thrown if attributes are read-only, missing or not defined
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaModelException - will be thrown if the Principal could not be found
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights

addToGroup

void addToGroup(Group aGroup,
                java.util.List<? extends Principal> aPrincipals)
                throws PumaSystemException,
                       PumaModelException,
                       PumaMissingAccessRightsException
Adds the given Principals to the given Group

Parameters:
aGroup - the Group to be modified, null is not allowed as input parameter
aPrincipals - the Principals to be added
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaModelException - will be thrown if either the Group or a provided Principal could not be found
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights

removeFromGroup

void removeFromGroup(Group aGroup,
                     java.util.List<? extends Principal> aPrincipals)
                     throws PumaSystemException,
                            PumaModelException,
                            PumaMissingAccessRightsException
Removes the given Principals from the given Group

Parameters:
aGroup - the group to be modified, null is not allowed as input parameter
aPrincipals - the principals to be removed
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaModelException - will be thrown if either the Group or a provided Principal could not be found
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights

createUser

User createUser(java.lang.String aName,
                java.lang.String parentDN,
                java.util.Map<java.lang.String,?> aInitialAttributes)
                throws PumaAttributeException,
                       PumaSystemException,
                       PumaModelException,
                       PumaMissingAccessRightsException
Creates a new User with the given shortname for the given Parent DN and the available initial Attributes.

Parameters:
aName - the shortname of the new user
parentDN - the parent object of the new user. If null is provided the system default will be used
aInitialAttributes - the attributes for an initial storage
Returns:
a new created user
Throws:
PumaAttributeException - will be thrown if attributes are read-only, missing or not defined
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaModelException - will be thrown if a User already exists matching the given parameters or the given parentDN cannot be found within the used repository
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights

createUser

User createUser(java.lang.String aName,
                java.lang.String parentDN,
                java.util.Map<java.lang.String,?> aInitialAttributes,
                java.lang.String initalApplicationRole)
                throws PumaAttributeException,
                       PumaSystemException,
                       PumaModelException,
                       PumaMissingAccessRightsException
Creates a new User with the given shortname for the given Parent DN and the available initial Attributes and assigns it the given application role

Parameters:
aName - the shortname of the new user
parentDN - the parent object of the new user. If null is provided the system default will be used
aInitialAttributes - the attributes for an initial storage
initalApplicationRole - the name of the application role the newly created user should be assigned to. Note: the role must be situated in the community domain, else the role is not found and the user is not cretaed
Returns:
a new created user
Throws:
PumaAttributeException - will be thrown if attributes are read-only, missing or not defined
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs, e.g. the appplication role could not be found.
PumaModelException - will be thrown if a User already exists matching the given parameters or the given parentDN cannot be found within the used repository
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights
Since:
6.0.1

createGroup

Group createGroup(java.lang.String aName,
                  java.lang.String parentDN,
                  java.util.Map<java.lang.String,?> aInitialAttributes)
                  throws PumaAttributeException,
                         PumaSystemException,
                         PumaModelException,
                         PumaMissingAccessRightsException
Creates a new Groups with the given shortname for the given Parent dn and the available initial Attributes
The character encoding used as input for attribute key and value must match the encoding acceptable by the user store

Parameters:
aName - shortname of the group
parentDN - the parent object of the new user. If null is provided the system default will be used
aInitialAttributes - the attributes for an initial storage
Returns:
returns a new created group
Throws:
PumaAttributeException - will be thrown if attributes are read-only, missing or not defined
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaModelException - will be thrown if a Group already exists matching the given parameters or the given parentDN cannot be found within the used repository
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights

deleteUser

void deleteUser(User aUser)
                throws PumaSystemException,
                       PumaModelException,
                       PumaMissingAccessRightsException
Removes the provided User from the backend system. The user will be removed imediatly

Parameters:
aUser - the user to be removed. null is not allowed as input
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaModelException - will be thrown if the User could not be found
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights

deleteGroup

void deleteGroup(Group aGroup)
                 throws PumaSystemException,
                        PumaModelException,
                        PumaMissingAccessRightsException
Removes the provided Group from the backend system. The group will be removed imediatly

Parameters:
aGroup - the group to be deleted. null is not allowed as input
Throws:
PumaSystemException - will be thrown whenever an unrecoverable backend error occurs
PumaModelException - will be thrown if the Group could not be found
PumaMissingAccessRightsException - will be thrown if the current authenticated user does not have the necessary rights