|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface provides methods to access, create, search and delete IRole objects.
| Field Summary | |
static java.lang.String |
VERSIONSTRING
|
| Method Summary | |
void |
addGroupToRole(java.lang.String uniqueIdOfGroup,
java.lang.String uniqueIdOfRole)
Adds the specified group to the specified role and implicitly does a commit. |
void |
addUserToRole(java.lang.String uniqueIdOfUser,
java.lang.String uniqueIdOfRole)
Adds the specified user to the specified role and implicitly does a commit. |
void |
deleteRole(java.lang.String uniqueID)
Delete a role from the used store |
java.lang.String[] |
getGroupsOfRole(java.lang.String uniqueIdOfRole,
boolean recursive)
Returns groups which are assigned to role identified by uniqueIdOfRole |
int |
getMaxRoleDescriptionLength()
Deprecated. the maximum length is defined in (String, String, String[]) |
IRole |
getMutableRole(java.lang.String uniqueID)
Gets a modifiable IRole objects for a unique ID |
IRole |
getRole(java.lang.String uniqueID)
Gets the role object with the given unique ID |
IRole |
getRole(java.lang.String uniqueID,
AttributeList populateAttributes)
Gets the role object with the given unique ID and populates the attributes in populateAttributes |
IRole |
getRoleByUniqueName(java.lang.String uniqueName)
Gets the role object with the given uniqueName |
IRole[] |
getRoles(java.lang.String[] uniqueIDs)
Gets the role objects for multiple unique IDs |
IRole[] |
getRoles(java.lang.String[] uniqueIDs,
AttributeList populateAttributes)
Gets the role objects for multiple unique IDs and populates the attributes defined in populateAttributes |
IRoleSearchFilter |
getRoleSearchFilter()
Returns an IRoleSearchFilter object to be used to specify query attributes |
java.lang.String[] |
getRolesOfGroup(java.lang.String uniqueIdOfGroup,
boolean recursive)
Returns roles which are assigned to a group identified by uniqueIdOfGroup |
java.lang.String[] |
getRolesOfUser(java.lang.String uniqueIdOfUser,
boolean recursive)
Returns roles which are assigned to user identified by uniqueIdOfUser |
java.lang.String[] |
getUsersOfRole(java.lang.String uniqueIdOfRole,
boolean recursive)
Returns users who are assigned to role identified by uniqueIdOfRole |
IRole |
newRole(java.lang.String uniqueName)
Creates a new, initially blank role object. |
void |
registerListener(RoleListener roleListener,
int modifier)
registerListener allows to subscribe to a predefined eventName RoleListener
The caller has to provide a receiver object which implements RoleListener |
void |
removeGroupFromRole(java.lang.String uniqueIdOfGroup,
java.lang.String uniqueIdOfRole)
Remove the specified group from the specified role and implicitly does a commit. |
void |
removeUserFromRole(java.lang.String uniqueIdOfUser,
java.lang.String uniqueIdOfRole)
Remove the specified user from the specified role and implicitly does a commit. |
ISearchResult |
searchRoles(IRoleSearchFilter filter)
Search for roles in the role store and role account store which match the criteria specified in the |
void |
unregisterListener(RoleListener roleListener)
unregisterListener unsubscribes a receiver from a previously subscribed event. |
| Methods inherited from interface com.sap.security.api.IConfigurable |
initialize |
| Field Detail |
public static final java.lang.String VERSIONSTRING
| Method Detail |
public IRole getRole(java.lang.String uniqueID)
throws UMException
uniqueID: - String representing the uniqueID of a role object.NoSuchRoleException - if no role with the given unique ID
public IRole getRole(java.lang.String uniqueID,
AttributeList populateAttributes)
throws UMException
uniqueID: - String representing the uniqueID of a role object.populateAttributes - AttributeListNoSuchRoleException - if no role with the given unique ID
exists
public void deleteRole(java.lang.String uniqueID)
throws UMException
uniqueID: - String representing the uniqueID of a role object.UMException - if the role can't be deletedNoSuchRoleException - if the role does not exist
public ISearchResult searchRoles(IRoleSearchFilter filter)
throws UMException
given filter. In order to get a role search filter use
getRoleSearchFilter().
You can define a search filter using methods of class IRoleSearchFilter.
If you are using roles stored in the PCD, the behaviour not as expected. When searching with the
uniquename and the equals operator for a role stored in PCD, only the first role
which is found is returned. If you want to get all roles with a similar unique name you have
to use the like operator in the role search filter.
This PCD-Role specific behaviour is caused by the fact that the UME unique name is
mapped to the pcd name of the role which is for example:
pcd:portal_content/myFolder/myPrefix.MyRole
However searching is only possible with the last part of the pcd name like "myPrefix.MyRole".
In order to get all roles named for example "myPrefix.MyRole" you have to use the like
operator with search string: "myPrefix.MyRole*"
filter - defined to search for rolesISearchResult
public IRoleSearchFilter getRoleSearchFilter()
throws UMException
IRoleSearchFilter contains attributes which can be queried
UMException - FeatureNotAvailableException -
public IRole newRole(java.lang.String uniqueName)
throws UMException
IPrincipalMaint.commit().uniqueName - of new IRole object.
Note: This uniqueName has to be unique for ALL data storesRoleAlreadyExistsException - if role with uniqueName already exists
public IRole getRoleByUniqueName(java.lang.String uniqueName)
throws UMException
Note: If you use this method be prepared to get an exception if multiple objects with the same name are found
uniqueName - of IRole objectNoSuchRoleException - if no role with the given uniqueName
existsUMException - if given unique name is not unique
public IRole[] getRoles(java.lang.String[] uniqueIDs)
throws UMException
String[] - array of uniqueIDs which are used to get an array of IRole
objects.NoSuchRoleException - if one or more of the given unique IDs
are not assigned to any roleNoSuchPCDRoleException - if the role does not exist
public IRole[] getRoles(java.lang.String[] uniqueIDs,
AttributeList populateAttributes)
throws UMException
String[] - array of uniqueIDs which are used to get an array of IRole
objects.populateAttributes - AttributeListNoSuchRoleException - if one or more of the given unique IDs
are not assigned to any roleNoSuchPCDRoleException - if the role does not exist
public IRole getMutableRole(java.lang.String uniqueID)
throws UMException
uniqueID - of an IRole objectNoSuchRoleException - if the unique ID does not existNoSuchPCDRoleException - if the role does not existpublic int getMaxRoleDescriptionLength()
(String, String, String[])
public void registerListener(RoleListener roleListener,
int modifier)
RoleListener
The caller has to provide a receiver object which implements RoleListenerRoleListener - object which implements interface RoleListenermodifier - constant defined in RoleListenerpublic void unregisterListener(RoleListener roleListener)
RoleListener - object which implements interface RoleListener
public java.lang.String[] getUsersOfRole(java.lang.String uniqueIdOfRole,
boolean recursive)
uniqueIdOfRole - representing the ID of an IRolerecursive. - If this parameter is set to false
all direct users are returned
if recursive is true all users which are assigned via groups to this role
are returnedNoSuchPCDRoleException - if the role does not exist
public java.lang.String[] getGroupsOfRole(java.lang.String uniqueIdOfRole,
boolean recursive)
uniqueIdOfRole - representing the ID of an IRolerecursive. - If this parameter is set to false
all direct groups are returned
if recursive is true all groups which are assigned via
other groups to this role are returned.
public java.lang.String[] getRolesOfUser(java.lang.String uniqueIdOfUser,
boolean recursive)
uniqueIdOfUser - representing the ID of an IUserrecursive. - If this parameter is set to false
all directly assigned roles are returned
if recursive is true all roles which are assigned via
other groups to this role are returned.
public java.lang.String[] getRolesOfGroup(java.lang.String uniqueIdOfGroup,
boolean recursive)
uniqueIdOfGroup - representing the ID of an IGrouprecursive. - If this parameter is set to false
all directly assigned roles are returned
if recursive is true all roles which are assigned via
other groups to this role are returned.
public void addUserToRole(java.lang.String uniqueIdOfUser,
java.lang.String uniqueIdOfRole)
throws UMException
uniqueIdOfUser - - the id of the user who will be added to the roleuniqueIdOfRole - - the id of the role to which the user will be added
public void addGroupToRole(java.lang.String uniqueIdOfGroup,
java.lang.String uniqueIdOfRole)
throws UMException
uniqueIdOfGroup - - the id of the group which will be added to the roleuniqueIdOfRole - - the id of the role to which the group will be added
public void removeUserFromRole(java.lang.String uniqueIdOfUser,
java.lang.String uniqueIdOfRole)
throws UMException
uniqueIdOfUser - - the id of the user which will be removed from the roleuniqueIdOfRole - - the id of the role from which the user will be removed
public void removeGroupFromRole(java.lang.String uniqueIdOfGroup,
java.lang.String uniqueIdOfRole)
throws UMException
uniqueIdOfGroup - - the id of the group which will be removed from the roleuniqueIdOfRole - - the id of the role from which the group will be removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||