com.ibm.portal.ac
Interface AccessControlEnvironment


public interface AccessControlEnvironment

The AccessControlEnvironment provides some general information about the Access Control configuration, for example the available role types.

Since:
6.1.0.3

Method Summary
 java.util.SortedSet<RoleType> getAllRoleTypes()
          Returns the sorted set of all RoleTypes that are available in the system.
 java.util.SortedSet<RoleType> getApplicableRoleTypes(Identifiable resource)
          Returns the sorted set of all RoleTypes that can be used with the given resource.
 Permission getPermission(Identifiable resource, RoleType accessLevel)
          Returns a new Permission Object representing a tupel of RoleType and resource.
 RoleType getRoleTypeForName(java.lang.String roleTypeName)
          Returns the RoleType identified by the given name.
 

Method Detail

getRoleTypeForName

RoleType getRoleTypeForName(java.lang.String roleTypeName)
                            throws AccessControlException,
                                   SystemException,
                                   ObjectNotFoundException
Returns the RoleType identified by the given name.

Parameters:
roleTypeName -
Returns:
the RoleType with the given name
Throws:
AccessControlException - will be thrown if any access control related error occurs
SystemException - will be thrown if a system resource problem, e.g. a database exception, occurs
ObjectNotFoundException - will be thrown if there is no RoleType with the given name

getAllRoleTypes

java.util.SortedSet<RoleType> getAllRoleTypes()
                                              throws AccessControlException,
                                                     SystemException
Returns the sorted set of all RoleTypes that are available in the system. This set contains at least the elements of RoleType.PREDEFINED_ROLE_TYPES and might contain additional custom RoleTypes.

Returns:
the set of all available RoleTypes in the system
Throws:
AccessControlException - will be thrown if any access control related error occurs
SystemException - will be thrown if a system resource problem, e.g. a database exception, occurs

getApplicableRoleTypes

java.util.SortedSet<RoleType> getApplicableRoleTypes(Identifiable resource)
                                                     throws AccessControlException,
                                                            SystemException
Returns the sorted set of all RoleTypes that can be used with the given resource.

Parameters:
resource - a resource or its ObjectID
Returns:
the set of all RoleTypes that can be used on the given resource
Throws:
AccessControlException - will be thrown if any access control related error occurs
SystemException - will be thrown if a system resource problem, e.g. a database exception, occurs

getPermission

Permission getPermission(Identifiable resource,
                         RoleType accessLevel)
                         throws AccessControlException,
                                SystemException
Returns a new Permission Object representing a tupel of RoleType and resource. Use AccessControlGlobalRuntimeModel.hasPermission(com.ibm.portal.um.Principal, Permission) to query if a principal has all the privileges represented by a Permission object.

Parameters:
resource - the resource of the new Permission
accessLevel - the RoleType of the new Permission
Returns:
Permission object representing the permission of a RoleType an a resource
Throws:
AccessControlException - will be thrown if any access control related error occurs
SystemException - will be thrown if a system resource problem, e.g. a database exception, occurs
See Also:
Permission, AccessControlGlobalRuntimeModel