|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.crowd.integration.model.DirectoryEntity
com.atlassian.crowd.integration.directory.internal.InternalDirectory
public class InternalDirectory
Internal directory connector. Stores all entity information to the database used by the crowd server.
Field Summary | |
---|---|
static String |
ATTRIBUTE_PASSWORD_HISTORY_COUNT
|
static String |
ATTRIBUTE_PASSWORD_MAX_ATTEMPTS
|
static String |
ATTRIBUTE_PASSWORD_MAX_CHANGE_TIME
|
static String |
ATTRIBUTE_PASSWORD_REGEX
|
static String |
EMAIL_REGEX
|
static String |
NAME
|
Fields inherited from class com.atlassian.crowd.integration.model.DirectoryEntity |
---|
active, attributes, conception, description, directoryID, ID, lastModified, name |
Fields inherited from interface com.atlassian.crowd.integration.directory.RemoteDirectory |
---|
DIRECTORY_TYPE |
Constructor Summary | |
---|---|
InternalDirectory()
|
Method Summary | |
---|---|
RemoteGroup |
addGroup(RemoteGroup group)
Adds a group to the directory store. |
RemotePrincipal |
addPrincipal(RemotePrincipal principal)
Adds a principal to the directory store. |
void |
addPrincipalToGroup(String name,
String unsubscribedGroup)
Adds a principal to a group. |
void |
addPrincipalToRole(String name,
String unsubscribedRole)
Adds a principal to a role. |
RemoteRole |
addRole(RemoteRole role)
Adds a role to the directory store. |
RemotePrincipal |
authenticate(String name,
PasswordCredential[] credentials)
Authenticates a principal verses the directory store. |
RemoteGroup |
findGroupByName(String name)
Finds the group that matches the supplied name . |
List |
findGroupMemberships(String principalName)
Returns a list of group names |
RemotePrincipal |
findPrincipalByName(String username)
Finds the principal that matches the supplied name . |
RemoteRole |
findRoleByName(String name)
Finds the role that matches the supplied name . |
List |
findRoleMemberships(String principalName)
Returns a list of role names |
long |
getDirectoryID()
Sets the internal directory of the entity
is mapped too. |
String |
getDirectoryType()
Returns the DIRECTORY_TYPE name of the implementation. |
boolean |
isGroupMember(String group,
String principal)
Checks if a principal is a member of a group. |
boolean |
isRoleMember(String role,
String username)
Checks if a principal is a member of a role. |
void |
processAuthentication(PasswordCredential[] credentials,
RemotePrincipal principal)
|
void |
removeGroup(String name)
Removes the role that matches the supplied name . |
void |
removePrincipal(String name)
Removes the principal that matches the supplied name . |
void |
removePrincipalFromGroup(String name,
String unsubscribedGroup)
Removes a principal from a group. |
void |
removePrincipalFromRole(String name,
String removeRole)
Removes a principal from a role. |
void |
removeRole(String name)
Removes the group that matches the supplied name . |
List |
searchGroups(SearchContext searchContext)
Searches for all principals who match the supplied search criteria. |
List |
searchPrincipals(SearchContext searchContext)
Search for all principals who match the supplied search criteria. |
List |
searchRoles(SearchContext searchContext)
Search for all roles who match the supplied search criteria. |
void |
setDirectoryDAO(DirectoryDAO directoryDAO)
|
void |
setDirectoryID(long directoryID)
Gets the internal directory of the entity
is mapped too. |
void |
setGroupDAO(GroupDAO groupDAO)
|
void |
setPasswordHelper(PasswordHelper passwordHelper)
|
void |
setPrincipalDAO(PrincipalDAO principalDAO)
|
void |
setRoleDAO(RoleDAO roleDAO)
|
void |
testConnection()
Test if a connection to the directory server can be established. |
RemoteGroup |
updateGroup(RemoteGroup group)
Updates the group by the name attribute. |
RemotePrincipal |
updatePrincipal(RemotePrincipal principal)
Updates the principal by the name attribute. |
void |
updatePrincipalCredential(String name,
PasswordCredential credential)
Updates the password credential for a principal. |
RemoteRole |
updateRole(RemoteRole role)
Updates the role by the name attribute. |
Methods inherited from class com.atlassian.crowd.integration.model.DirectoryEntity |
---|
equals, getAttribute, getAttributes, getConception, getDescription, getID, getLastModified, getName, hashCode, isActive, setActive, setAttribute, setAttribute, setAttributes, setConception, setDescription, setID, setLastModified, setName, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.atlassian.crowd.integration.directory.RemoteDirectory |
---|
getAttributes, getID, setAttributes, setID |
Field Detail |
---|
public static final String NAME
public static final String EMAIL_REGEX
public static final String ATTRIBUTE_PASSWORD_REGEX
public static final String ATTRIBUTE_PASSWORD_MAX_ATTEMPTS
public static final String ATTRIBUTE_PASSWORD_HISTORY_COUNT
public static final String ATTRIBUTE_PASSWORD_MAX_CHANGE_TIME
Constructor Detail |
---|
public InternalDirectory()
Method Detail |
---|
public long getDirectoryID()
DirectoryEntity
directory
of the entity
is mapped too.
getDirectoryID
in class DirectoryEntity
public void setDirectoryID(long directoryID)
DirectoryEntity
directory
of the entity
is mapped too.
setDirectoryID
in class DirectoryEntity
directoryID
- The directory ID.public String getDirectoryType()
RemoteDirectory
DIRECTORY_TYPE
name of the implementation.
getDirectoryType
in interface RemoteDirectory
public RemotePrincipal addPrincipal(RemotePrincipal principal) throws InvalidPrincipalException, RemoteException, InvalidCredentialException
RemoteDirectory
addPrincipal
in interface RemoteDirectory
principal
- The principal to add.
InvalidPrincipalException
- The supplied principal is invalid.
RemoteException
- An unknown remote exception occured.
InvalidCredentialException
- The supplied credential(s) are invalid.public RemoteGroup addGroup(RemoteGroup group) throws InvalidGroupException, RemoteException
RemoteDirectory
addGroup
in interface RemoteDirectory
group
- The group to add.
InvalidGroupException
- The supplied group is invalid.
RemoteException
- An unknown remote exception occured.public RemotePrincipal authenticate(String name, PasswordCredential[] credentials) throws RemoteException, InvalidPrincipalException, InactiveAccountException, InvalidAuthenticationException
RemoteDirectory
authenticate
in interface RemoteDirectory
name
- The name of the principal.credentials
- The supplied credentials.
RemoteException
- An unknown remote exception occured.
InvalidPrincipalException
- The supplied principal is invalid.
InactiveAccountException
- The supplied principal is inactive.
InvalidAuthenticationException
- The supplied authentication is invalid.public boolean isGroupMember(String group, String principal) throws RemoteException
RemoteDirectory
isGroupMember
in interface RemoteDirectory
group
- The group name.principal
- The principal name.
true
if and only if the principal is a member of the group, otherwise false
.
RemoteException
- An unknown remote exception occured.public boolean isRoleMember(String role, String username) throws RemoteException
RemoteDirectory
isRoleMember
in interface RemoteDirectory
role
- The group name.username
- The principal name.
true
if and only if the principal is a member of the role, otherwise false
.
RemoteException
- An unknown remote exception occured.public List findGroupMemberships(String principalName) throws RemoteException, ObjectNotFoundException
RemoteDirectory
findGroupMemberships
in interface RemoteDirectory
RemoteException
- An unknown and remote exception occured.
ObjectNotFoundException
public List findRoleMemberships(String principalName) throws RemoteException, ObjectNotFoundException
RemoteDirectory
findRoleMemberships
in interface RemoteDirectory
RemoteException
- An unknown and remote exception occured.
ObjectNotFoundException
public List searchGroups(SearchContext searchContext) throws RemoteException
RemoteDirectory
principals
who match the supplied search criteria.
searchGroups
in interface RemoteDirectory
searchContext
- The search criteria.
results
.
RemoteException
- An unknown remote exception occured.public RemoteGroup findGroupByName(String name) throws RemoteException, ObjectNotFoundException
RemoteDirectory
group
that matches the supplied name
.
findGroupByName
in interface RemoteDirectory
name
- The name of the group.
RemoteException
- An unknown remote exception occured.
ObjectNotFoundException
- The group does not exist.public RemoteGroup updateGroup(RemoteGroup group) throws RemoteException
RemoteDirectory
name
attribute.
updateGroup
in interface RemoteDirectory
group
- The group to update.
RemoteException
- An unknown remote exception occured.public List searchRoles(SearchContext searchContext) throws RemoteException
RemoteDirectory
roles
who match the supplied search criteria.
searchRoles
in interface RemoteDirectory
searchContext
- The search criteria.
results
.
RemoteException
- an unknown remote exception occured.public RemoteRole findRoleByName(String name) throws RemoteException, ObjectNotFoundException
RemoteDirectory
role
that matches the supplied name
.
findRoleByName
in interface RemoteDirectory
name
- The name of the role.
RemoteException
- An unknown remote exception occured.
ObjectNotFoundException
- The role does not exist.public RemoteRole addRole(RemoteRole role) throws InvalidRoleException, RemoteException
RemoteDirectory
addRole
in interface RemoteDirectory
role
- The role to add.
InvalidRoleException
- The supplied role is invalid.
RemoteException
- An unknown remote exception occured.public RemoteRole updateRole(RemoteRole role) throws RemoteException
RemoteDirectory
name
attribute.
updateRole
in interface RemoteDirectory
role
- The role to update.
RemoteException
- An unknown remote exception occured.public void removeGroup(String name) throws RemoteException, ObjectNotFoundException
RemoteDirectory
role
that matches the supplied name
.
removeGroup
in interface RemoteDirectory
name
- The name of the role.
RemoteException
- An unknown remote exception occured.
ObjectNotFoundException
- The role does not exist.public void removeRole(String name) throws RemoteException, ObjectNotFoundException
RemoteDirectory
group
that matches the supplied name
.
removeRole
in interface RemoteDirectory
name
- The name of the group.
RemoteException
- An unknown remote exception occured.
ObjectNotFoundException
- The role does not exist.public List searchPrincipals(SearchContext searchContext) throws RemoteException
RemoteDirectory
principals
who match the supplied search criteria.
searchPrincipals
in interface RemoteDirectory
searchContext
- The search criteria.
results
.
RemoteException
- an unknown remote exception occured.public RemotePrincipal findPrincipalByName(String username) throws RemoteException, ObjectNotFoundException
RemoteDirectory
principal
that matches the supplied name
.
findPrincipalByName
in interface RemoteDirectory
username
- The name of the principal.
RemoteException
- An unknown remote exception occured.
ObjectNotFoundException
- The principal does not exist.public RemotePrincipal updatePrincipal(RemotePrincipal principal) throws RemoteException
RemoteDirectory
name
attribute.
updatePrincipal
in interface RemoteDirectory
principal
- The principal to update.
RemoteException
- An unknown remote exception occured.public void addPrincipalToGroup(String name, String unsubscribedGroup) throws RemoteException
RemoteDirectory
addPrincipalToGroup
in interface RemoteDirectory
name
- The name of the principal.unsubscribedGroup
- The name of the group.
RemoteException
- An unknown wire exception occured.public void removePrincipalFromGroup(String name, String unsubscribedGroup) throws RemoteException
RemoteDirectory
removePrincipalFromGroup
in interface RemoteDirectory
name
- The name of the principal.unsubscribedGroup
- The name of the group.
RemoteException
- An unknown wire exception occured.public void addPrincipalToRole(String name, String unsubscribedRole) throws RemoteException
RemoteDirectory
addPrincipalToRole
in interface RemoteDirectory
name
- The name of the principal.unsubscribedRole
- The name of the role.
RemoteException
- An unknown wire exception occured.public void removePrincipalFromRole(String name, String removeRole) throws RemoteException
RemoteDirectory
removePrincipalFromRole
in interface RemoteDirectory
name
- The name of the principal.removeRole
- The name of the role.
RemoteException
- An unknown wire exception occured.public void removePrincipal(String name) throws RemoteException, ObjectNotFoundException
RemoteDirectory
principal
that matches the supplied name
.
removePrincipal
in interface RemoteDirectory
name
- The name of the principal.
RemoteException
- An unknown remote exception occured.
ObjectNotFoundException
- The principal does not exist.public void updatePrincipalCredential(String name, PasswordCredential credential) throws RemoteException, ObjectNotFoundException, InvalidCredentialException
RemoteDirectory
updatePrincipalCredential
in interface RemoteDirectory
name
- The name of the principal.credential
- The new credential.
RemoteException
- An unknown remote exception occured.
ObjectNotFoundException
- The principal does not exist.
InvalidCredentialException
- The supplied credential is invalid.public void testConnection() throws RemoteException
RemoteDirectory
testConnection
in interface RemoteDirectory
RemoteException
- An unknown wire exception occured.public void processAuthentication(PasswordCredential[] credentials, RemotePrincipal principal) throws InvalidAuthenticationException
InvalidAuthenticationException
public void setPasswordHelper(PasswordHelper passwordHelper)
public void setDirectoryDAO(DirectoryDAO directoryDAO)
public void setPrincipalDAO(PrincipalDAO principalDAO)
public void setRoleDAO(RoleDAO roleDAO)
public void setGroupDAO(GroupDAO groupDAO)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |