|
SAP NetWeaver 2004S SPS 09 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface provides methods to access, create, search and delete IRole objects.
NOTE: As this interface can be extended, this interface can be freely used, but must not be implemented.
| Field Summary | |
static String |
VERSIONSTRING
|
| Method Summary | |
void |
addGroupToRole(String uniqueIdOfGroup,
String uniqueIdOfRole)
Adds the specified group to the specified role and implicitly does a commit. |
void |
addUserToRole(String uniqueIdOfUser,
String uniqueIdOfRole)
Adds the specified user to the specified role and implicitly does a commit. |
void |
deleteRole(String uniqueID)
Delete a role from the used store |
String[] |
getGroupsOfRole(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(String uniqueID)
Gets a modifiable IRole objects for a unique ID |
IRole |
getRole(String uniqueID)
Gets the role object with the given unique ID |
IRole |
getRole(String uniqueID,
AttributeList populateAttributes)
Gets the role object with the given unique ID and populates the attributes in populateAttributes |
IRole |
getRoleByUniqueName(String uniqueName)
Gets the role object with the given uniqueName Note: If you use this method be prepared to get an exception if multiple objects with the same name are found |
IRole[] |
getRoles(String[] uniqueIDs)
Gets the role objects for multiple unique IDs |
IRole[] |
getRoles(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 IRoleSearchFilter contains attributes which can be queried |
String[] |
getRolesOfGroup(String uniqueIdOfGroup,
boolean recursive)
Returns roles which are assigned to a group identified by uniqueIdOfGroup |
String[] |
getRolesOfUser(String uniqueIdOfUser,
boolean recursive)
Returns roles which are assigned to user identified by uniqueIdOfUser |
String[] |
getUsersOfRole(String uniqueIdOfRole,
boolean recursive)
Returns users who are assigned to role identified by uniqueIdOfRole |
IRole |
newRole(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 |
registerListener(RoleListener roleListener,
int modifier,
boolean notifyAfterPhysicalCommitCompleted)
registerListener allows to subscribe to a predefined eventName RoleListener
The caller has to provide a receiver object which implements RoleListener |
void |
removeGroupFromRole(String uniqueIdOfGroup,
String uniqueIdOfRole)
Remove the specified group from the specified role and implicitly does a commit. |
void |
removeUserFromRole(String uniqueIdOfUser,
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 given filter. |
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 String VERSIONSTRING
| Method Detail |
public IRole getRole(String uniqueID)
throws UMException
{@link - NoSuchRoleException} if no role with the given unique ID
UMException
public IRole getRole(String uniqueID,
AttributeList populateAttributes)
throws UMException
populateAttributes - AttributeList
{@link - NoSuchRoleException} if no role with the given unique ID
exists
UMException
public void deleteRole(String uniqueID)
throws UMException
UMException - if the role can't be deleted
{@link - NoSuchRoleException} 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 roles
ISearchResult
UMException
public IRoleSearchFilter getRoleSearchFilter()
throws UMException
IRoleSearchFilter contains attributes which can be queried
UMException
FeatureNotAvailableException
public IRole newRole(String uniqueName)
throws UMException
IPrincipalMaint.commit().
uniqueName - of new IRole object.
Note: This uniqueName has to be unique for ALL data stores
RoleAlreadyExistsException - if role with uniqueName already exists
UMException
public IRole getRoleByUniqueName(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 object
NoSuchRoleException - if no role with the given uniqueName
exists
UMException - if given unique name is not unique
public IRole[] getRoles(String[] uniqueIDs)
throws UMException
NoSuchRoleException - if one or more of the given unique IDs
are not assigned to any role
NoSuchPCDRoleException - if the role does not exist
UMException
public IRole[] getRoles(String[] uniqueIDs,
AttributeList populateAttributes)
throws UMException
populateAttributes - AttributeList
NoSuchRoleException - if one or more of the given unique IDs
are not assigned to any role
NoSuchPCDRoleException - if the role does not exist
UMException
public IRole getMutableRole(String uniqueID)
throws UMException
uniqueID - of an IRole object
NoSuchRoleException - if the unique ID does not exist
NoSuchPCDRoleException - if the role does not exist
UMExceptionpublic int getMaxRoleDescriptionLength()
(String, String, String[])
public void registerListener(RoleListener roleListener,
int modifier)
RoleListener
The caller has to provide a receiver object which implements RoleListener
modifier - constant defined in RoleListener
public void registerListener(RoleListener roleListener,
int modifier,
boolean notifyAfterPhysicalCommitCompleted)
RoleListener
The caller has to provide a receiver object which implements RoleListener
modifier - constant defined in RoleListenernotifyAfterPhysicalCommitCompleted - Allows callers when set to false, to get a notification before the physical transaction is completed in order to include their actions into the same physical transaction.public void unregisterListener(RoleListener roleListener)
public String[] getUsersOfRole(String uniqueIdOfRole,
boolean recursive)
uniqueIdOfRole - representing the ID of an IRole
NoSuchPCDRoleException - if the role does not exist
public String[] getGroupsOfRole(String uniqueIdOfRole,
boolean recursive)
uniqueIdOfRole - representing the ID of an IRole
public String[] getRolesOfUser(String uniqueIdOfUser,
boolean recursive)
uniqueIdOfUser - representing the ID of an IUser
public String[] getRolesOfGroup(String uniqueIdOfGroup,
boolean recursive)
uniqueIdOfGroup - representing the ID of an IGroup
public void addUserToRole(String uniqueIdOfUser,
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
UMException
public void addGroupToRole(String uniqueIdOfGroup,
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
UMException
public void removeUserFromRole(String uniqueIdOfUser,
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
UMException
public void removeGroupFromRole(String uniqueIdOfGroup,
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
UMException
|
SAP NetWeaver 2004S SPS 09 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||