Modifier and Type | Method and Description |
---|---|
RMRole |
addNewRole(java.lang.String roleName,
java.lang.String roleType,
java.lang.String applicationName,
java.lang.String description)
Creates a new
RMRole member for this
collection and saves it to the corresponding repository from which this
collection originated. |
java.lang.String |
getApplicationName()
Returns the application name
String , if any, that was originally used to fetch
this RMRoles collection; see RMDomain.fetchRMRoles(Repository, String) . |
Repository |
getRepository()
Specifies the
Repository used to retrieve
roles from and save roles to. |
RMRole |
getRoleById(java.lang.String id)
Retrieves a
RMRole instance from the repository
based upon its ID string. |
RMRole |
getRoleByNames(java.lang.String roleName,
java.lang.String applicationName)
Retrieves a
RMRole instance from the repository
based upon the specified role name and application name values. |
boolean |
isCurrentUserInAnyRole(java.util.List<RMRole> roles)
Indicates whether the current user is a member of any of the specified
RMRole instances. |
java.util.Iterator<RMRole> |
iterator()
Returns an
Iterator for this collection. |
int |
size()
Returns the count of the number of roles in this collection.
|
Repository getRepository()
Repository
used to retrieve
roles from and save roles to.Repository
instance.java.lang.String getApplicationName()
String
, if any, that was originally used to fetch
this RMRoles
collection; see RMDomain.fetchRMRoles(Repository, String)
.String
value. This entry can be null
.boolean isCurrentUserInAnyRole(java.util.List<RMRole> roles)
RMRole
instances.
The current user is defined as the javax.security.auth.Subject
instance associated with the current thread.roles
- a Collection
of RMRole
instances in question. Each instance must be a member of
this RMRoles
collection.true
if the current user is a member of the one or more of
the specified roles, false
otherwise.RMRole addNewRole(java.lang.String roleName, java.lang.String roleType, java.lang.String applicationName, java.lang.String description)
RMRole
member for this
collection and saves it to the corresponding repository from which this
collection originated.roleName
- the name to assign to the new role. Must be unique
within the subset of roles having the same applicationName value.
This entry cannot be null
or blank.roleType
- a String
providing an indication of the type of
role the new instance represents.
This entry cannot be null
or blank.applicationName
- the name of the application responsible for the creation
of the new role instance.
This entry cannot be null
or blank.description
- an optional String
providing descriptive text.
This entry can be null
.RMRole
instance.RAL_ROLE_ALREADY_EXISTS
- if a existing role with matching values for the specified
applicationName
and either roleName
or roleType
parameters was found.RAL_RETRIEVING_SECURED_ACCESS_ROLE_FAILED
- if an unexpected retrieval error occurred.RMRole getRoleByNames(java.lang.String roleName, java.lang.String applicationName)
RMRole
instance from the repository
based upon the specified role name and application name values.roleName
- the role name String
of the desired role.
This entry cannot be null
.applicationName
- the application name String
of the desired role.
This entry cannot be null
.RMRole
, or null
if none found.RAL_RETRIEVING_SECURED_ACCESS_ROLE_FAILED
- if an unexpected retrieval error occurred.RMRole getRoleById(java.lang.String id)
RMRole
instance from the repository
based upon its ID string.id
- the object ID String
used to look up the desired role.RMRole
, or null
if none found.RAL_RETRIEVING_SECURED_ACCESS_ROLE_FAILED
- if an unexpected retrieval error occurred.java.util.Iterator<RMRole> iterator()
Iterator
for this collection.int size()
int
value.© Copyright IBM Corp. 2010, 2013. All Rights Reserved.