|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RepositoryUserDirectory
A RepositoryUserDirectory is a UserDirectory which is backed by a data store in an ATG repository. It permits conversion between RepositoryItems and the Principals that they represent. It also associates each PrincipalType with a corresponding RepositoryView in the repository, which allows one to perform queries against these views, obtaining sets of principals that satisfy some condition. The RepositoryViews can also be used for adding and removing items that correspond to principals of different types.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from interface atg.userdirectory.UserDirectory |
---|
SORT_ASCENDING, SORT_DESCENDING |
Method Summary | |
---|---|
Organization |
createOrganization(java.lang.String orgName,
java.lang.String orgDescription,
java.lang.Object parentOrgPrimaryKey)
Create a new Organization. |
Organization |
createOrganization(java.lang.String orgName,
java.lang.String orgDescription,
Organization parentOrg)
Create a new Organization. |
User |
createUser(java.lang.String pLogin,
java.lang.String pPassword,
boolean pHashPassword,
java.util.Map pProperties)
Create a new User. |
User |
createUser(java.lang.String pLogin,
java.lang.String pPassword,
boolean pHashPassword,
java.util.Map pProperties,
java.lang.Object pParentOrgPrimaryKey)
Create a new User. |
User |
createUser(java.lang.String pLogin,
java.lang.String pClearTextPassword,
java.util.Map pProperties)
Create a new User. |
User |
createUser(java.lang.String pLogin,
java.lang.String pClearTextPassword,
java.util.Map pProperties,
java.lang.Object pParentOrgPrimaryKey)
Create a new User. |
void |
deleteOrganization(Organization pOrganization)
Given an Organization, delete it from this UserDirectory's repository. |
void |
deleteUser(User pUser)
Given a User, delete it from this UserDirectory's repository. |
RepositoryItem |
getItem(java.security.Principal pPrincipal)
Given a principal that is backed by a persistent repository item in the directory, return the item. |
RepositoryItem |
getItem(RoleFolder pFolder)
Given a RoleFolder that is backed by a persistent repository item in the directory, return the item. |
MutableRepositoryItem |
getItemForUpdate(java.security.Principal pPrincipal)
Given a principal that is backed by a persistent repository item in the directory, return a mutable repository item that can be used to update this principal. |
java.security.Principal |
getPrincipalForItem(RepositoryItem pItem)
Given a persistent item in the repository used by this directory, return a Principal corresponding to that persistent item. |
RepositoryView |
getView(java.lang.Class pType)
Return the RepositoryView whose items are used by this directory to store all principals of a given principal type. |
Methods inherited from interface atg.userdirectory.UserDirectory |
---|
findOrganizationByPrimaryKey, findRoleByPrimaryKey, findUserByLogin, findUserByPrimaryKey, getOrganizationByPath, getRoleByPath, getRoleFolderByPath, getRoles, getRolesSortByName, getRootOrganization, getRootRoleFolder, getUserDirectoryName |
Field Detail |
---|
static final java.lang.String CLASS_VERSION
Method Detail |
---|
User createUser(java.lang.String pLogin, java.lang.String pClearTextPassword, java.util.Map pProperties) throws RepositoryException, DirectoryModificationException
pLogin
- The login.pClearTextPassword
- The clear text password.pProperties
- The map of properties to set in the User.
RepositoryException
DirectoryModificationException
- if the Repository isn't Mutable.User createUser(java.lang.String pLogin, java.lang.String pPassword, boolean pHashPassword, java.util.Map pProperties) throws RepositoryException, DirectoryModificationException
pLogin
- The login.pPassword
- The password.pHashPassword
- If true, hash the password.pProperties
- The map of properties to set in the User.
RepositoryException
DirectoryModificationException
- if the Repository isn't Mutable.User createUser(java.lang.String pLogin, java.lang.String pClearTextPassword, java.util.Map pProperties, java.lang.Object pParentOrgPrimaryKey) throws RepositoryException, DirectoryModificationException
pLogin
- The login.pClearTextPassword
- The clear text password.pProperties
- The map of properties to set in the User.pParentOrgPrimaryKey
- The primary key of the user's parent
organization. If this is null, the user has no parent
organization.
RepositoryException
DirectoryModificationException
- if the Repository isn't Mutable.User createUser(java.lang.String pLogin, java.lang.String pPassword, boolean pHashPassword, java.util.Map pProperties, java.lang.Object pParentOrgPrimaryKey) throws RepositoryException, DirectoryModificationException
pLogin
- The login.pPassword
- The password.pHashPassword
- If true, hash the password.pProperties
- The map of properties to set in the User.pParentOrgPrimaryKey
- The primary key of the user's parent
organization. If this is null, the user has no parent
organization.
RepositoryException
DirectoryModificationException
- if the Repository isn't Mutable.Organization createOrganization(java.lang.String orgName, java.lang.String orgDescription, java.lang.Object parentOrgPrimaryKey) throws RepositoryException, DirectoryModificationException
orgName
- The name of the new Organization.orgDescription
- The description of the new Organization.parentOrgPrimaryKey
- The primary key of the parent organization. If this
is null, the root Organization will be the parent.
RepositoryException
DirectoryModificationException
- if the Repository isn't Mutable.Organization createOrganization(java.lang.String orgName, java.lang.String orgDescription, Organization parentOrg) throws RepositoryException, DirectoryModificationException
orgName
- The name of the new Organization.orgDescription
- The description of the new Organization.parentOrg
- The parent organization. If this
is null, the root Organization will be the parent.
RepositoryException
DirectoryModificationException
- if the Repository isn't Mutable.RepositoryView getView(java.lang.Class pType) throws RepositoryException
Note that such a view may be of an abstract, non-instantiable item type, in which case one may not be able to create items in the view directly - one may need to decide on a concrete subtype to use for new items.
pType
- the Class corresponding to the interface (User,
Organization, Role etc.) for the principal type in question.
RepositoryException
- if there was an error while
attempting to return the RepositoryViewRepositoryItem getItem(java.security.Principal pPrincipal)
The state of the item is not guaranteed to reflect updates that may have occurred as part of a current transaction associated with the calling thread.
pPrincipal
- the principal
getItemForUpdate(java.security.Principal)
RepositoryItem getItem(RoleFolder pFolder)
pFolder
- the RoleFolder
MutableRepositoryItem getItemForUpdate(java.security.Principal pPrincipal)
The state of the item is not guaranteed to reflect updates that may have occurred as part of a current transaction associated with the calling thread.
pPrincipal
- the principal
java.security.Principal getPrincipalForItem(RepositoryItem pItem)
If modifications were made to the item which have not been committed to the item's persistent store, the resulting Principal is not guaranteed to reflect those modifications -- the principal is only required to correspond to the item's identity.
pItem
- A persistent object backing a principal
void deleteUser(User pUser) throws RepositoryException, DirectoryModificationException
An attempt to delete the user will only be made if it has
been detached from its immediate parent organization before calling
this method. An user can be deleted using this code
Organization parentOrganization = userToDelete.getParentOrganization();
parentOrganization.removeChild(userToDelete);
userDirectory.deleteUser(userToDelete);
pUser
- The User to be deleted from the repository.
RepositoryException
DirectoryModificationException
- if the Repository isn't Mutable.void deleteOrganization(Organization pOrganization) throws RepositoryException, DirectoryModificationException
An attempt to delete the organization will only be made if it has
been detached from its immediate parent organization before calling
this method. An organization can be deleted using this code
Organization parentOrganization = organizationToDelete.getParentOrganization();
parentOrganization.removeChild(organizationToDelete);
userDirectory.deleteOrganization(organizationToDelete);
pOrganization
- The Organization to be deleted from the repository.
RepositoryException
DirectoryModificationException
- if the Repository isn't Mutable.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |