|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserDirectory
A UserDirectory represents an abstraction of an persistent organizational tree containing Users and Organizations. Users and Organizations may be assigned one or more Roles.
Users, Organizations, and Roles are all treated as instances of java.security.Principal, permitting them to be used flexibly across the java.security and atg.security packages. In particular, all Principals obtained from a UserDirectory will be directly usable in access control lists and entries managed by security domains compatible with that directory.
Some roles' membership may be dynamically calculated ("dynamic roles"), while others are explicitly assigned to individual users ("assignable roles"). Most roles are global roles, while RelativeRoles are special in that they represent a certain kind of relationship to a specific principal.
Global roles are organized in a hierarchy of RoleFolders that assists in navigating the global role namespace. RoleFolders are not Principals.
Notes:
Invocations of methods that change one or more transactionally managed objects will behave in a way that depends on whether a transaction is currently active. If no transaction is active, a new one will be created for the update and will be committed before the method returns. If a transaction is active, then all updates will take place within the scope of the transaction, which will remain uncommitted when the method returns.
A returned Principal, either singly or within a collection, must never be modified directly in any way by casting it to a modifiable Java type, since this would prohibit UserDirectory implementations from caching Principals.
All returned Collections are unmodifiable, and are in effect immutable due to the previous convention that the embedded Principal objects should never be modified.
For methods with a Collection result, empty Collection instances are always returned on a valid invocation, whereas null reflects a failure to perform the requested operation.
PrincipalType
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
static int |
SORT_ASCENDING
|
static int |
SORT_DESCENDING
|
Method Summary | |
---|---|
Organization |
findOrganizationByPrimaryKey(java.lang.Object pPrimaryKey)
Given a Organization's primary key, locate a corresponding Organization in the directory. |
Role |
findRoleByPrimaryKey(java.lang.Object pPrimaryKey)
Given a Role's primary key, locate a corresponding Role in the directory. |
User |
findUserByLogin(java.lang.String loginName)
Given a User's primary key, locate a corresponding User in the directory. |
User |
findUserByPrimaryKey(java.lang.Object pPrimaryKey)
Given a User's primary key, locate a corresponding User in the directory. |
Organization |
getOrganizationByPath(java.lang.String orgPath)
Find an Organization by its path. |
Role |
getRoleByPath(java.lang.String pRolePath)
Given the folder path of a global role, obtain the corresponding Role. |
RoleFolder |
getRoleFolderByPath(java.lang.String pRolePath)
Given the folder path of a global role, obtain the corresponding Role. |
java.util.Collection |
getRoles()
Get the set of all roles in the directory, both global and relative. |
java.util.Collection |
getRolesSortByName(int pStartIndex,
int pEndIndex,
int pSortOrder)
Get the set of all roles in the directory, both global and relative, sorted on the name of the role, with index control of the result set returned. |
Organization |
getRootOrganization()
Return an Organization that acts as the root of the organizational hierarchy. |
RoleFolder |
getRootRoleFolder()
Get the root RoleFolder in a hierarchy of RoleFolders that contain all global roles. |
java.lang.String |
getUserDirectoryName()
|
Field Detail |
---|
static final java.lang.String CLASS_VERSION
static final int SORT_ASCENDING
static final int SORT_DESCENDING
Method Detail |
---|
java.lang.String getUserDirectoryName()
User findUserByPrimaryKey(java.lang.Object pPrimaryKey)
pPrimaryKey
- the principal's primary key
User findUserByLogin(java.lang.String loginName)
loginName
- The user's unique login name.
Organization findOrganizationByPrimaryKey(java.lang.Object pPrimaryKey)
pPrimaryKey
- the principal's primary key
Role findRoleByPrimaryKey(java.lang.Object pPrimaryKey)
pPrimaryKey
- the principal's primary key
Organization getRootOrganization()
Organization getOrganizationByPath(java.lang.String orgPath)
orgPath
- The path from the root of the Organization.
java.util.Collection getRoles()
java.util.Collection getRolesSortByName(int pStartIndex, int pEndIndex, int pSortOrder)
pStartIndex
- starting index of rolespEndIndex
- ending index of rolespSortOrder
- sorted order of returned Collection. Values =
{ UserDirectory.SORT_ASCENDING, UserDirectory.SORT_DESCENDING }
RoleFolder getRootRoleFolder()
Role getRoleByPath(java.lang.String pRolePath)
pRolePath
- the path of a global role from the root role
folder to the global role, delimited by '/' characters. No
initial delimiter is required.
RoleFolder getRoleFolderByPath(java.lang.String pRolePath)
pRolePath
- the path of a global role from the root role
folder to the global role, delimited by '/' characters. No
initial delimiter is required.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |