com.atlassian.crowd.integration.directory.connector
Class AppleOpenDirectory

java.lang.Object
  extended by com.atlassian.crowd.integration.directory.connector.LDAPDirectory
      extended by com.atlassian.crowd.integration.directory.connector.AppleOpenDirectory
All Implemented Interfaces:
RemoteDirectory

public class AppleOpenDirectory
extends LDAPDirectory

Apple OS X Server LDAP connector.

Version:
1.0
Author:
Justen Stepka

Field Summary
protected static String DISTINGUISHED_NAME
          The distrinbuished name attribute: cn.
static String NAME
          The name of the server: Apple OSX Open Directory Server.
protected  boolean pagingResultsControl
          This server does not support paging directory results.
 
Fields inherited from class com.atlassian.crowd.integration.directory.connector.LDAPDirectory
attributes, CONNECTION_FACTORY, CONNECTION_FACTORY_SSL_IMPL, CONNECTION_INITIAL_CONTEXT_FACTORY, CONNECTION_SECURITY_AUTHENTICATION, CONNECTION_SSL_SECURITY_PROTOCOL, DEFAULT_PAGE_SIZE, GROUP_DESCRIPTION_KEY, GROUP_DN_ADDITION, GROUP_NAME_KEY, GROUP_OBJECTCLASS_KEY, GROUP_USERNAMES_KEY, LDAP_BASEDN_KEY, LDAP_OBJECTCLASS, LDAP_PASSWORD_KEY, LDAP_SECURE_KEY, LDAP_URL_KEY, LDAP_USERDN_KEY, PRINCIPAL_NO_VALID_PASSWORD, ROLE_DESCRIPTION_KEY, ROLE_DN_ADDITION, ROLE_NAME_KEY, ROLE_OBJECTCLASS_KEY, ROLE_USERNAMES_KEY, UNABLE_TO_CONNECT, USER_DN_ADDITION, USER_EMAIL_KEY, USER_FIRSTNAME_KEY, USER_GROUP_KEY, USER_LASTNAME_KEY, USER_OBJECTCLASS_KEY, USER_PASSWORD_KEY, USER_USERNAME_KEY
 
Fields inherited from interface com.atlassian.crowd.integration.directory.RemoteDirectory
DIRECTORY_TYPE
 
Constructor Summary
AppleOpenDirectory()
           
 
Method Summary
 RemotePrincipal addPrincipal(RemotePrincipal principal)
          Adds a principal to the directory store.
protected  String buildEntityDN(LdapContext connection, String objectClass, String dnAddition, String nameKey, String name)
          Builds the entity DN for a given object type.
 String getDirectoryType()
          Returns the DIRECTORY_TYPE name of the implementation.
protected  byte[] getPassword(List pubilcCredentials)
          Converts password into a format the directory server password format.
protected  boolean isMemeber(LdapContext connection, String objectClass, String dnAddition, String nameKey, String membersKey, String group, String principal)
          Checks if a principal is a member of a LDAP container object.
protected  Set processMembers(LdapContext connection, Attributes attributes)
          Processes the members of an LDAP container object.
 void updatePrincipalCredential(String name, PasswordCredential credential)
          Updates the password credential for a principal.
 
Methods inherited from class com.atlassian.crowd.integration.directory.connector.LDAPDirectory
addContainerEntity, addGroup, addMemberToContainerEntity, addPrincipalGeneric, addPrincipalToGroup, addPrincipalToRole, addRole, authenticate, buildBaseDN, buildSearch, buildSearchObject, connect, disconnect, findGroupByName, findGroupMemberships, findPrincipalByName, findRoleByName, findRoleMemberships, getAttribute, getAttributes, getConfigurationDetails, getID, getImplementations, getSingleAttribute, isGroupMember, isRoleMember, isSecureSSL, parseControlResponse, populateAttribute, populateAttributes, populateGroup, populatePrincipal, populateRole, removeGroup, removeMemberFromContainerEntity, removePrincipal, removePrincipalFromGroup, removePrincipalFromRole, removeRole, searchGroups, searchPrincipals, searchRoles, setAttribute, setAttribute, setAttributes, setID, testConnection, updateGroup, updatePrincipal, updateRole
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
The name of the server: Apple OSX Open Directory Server.

See Also:
Constant Field Values

DISTINGUISHED_NAME

protected static String DISTINGUISHED_NAME
The distrinbuished name attribute: cn.


pagingResultsControl

protected boolean pagingResultsControl
This server does not support paging directory results.

Constructor Detail

AppleOpenDirectory

public AppleOpenDirectory()
Method Detail

getPassword

protected byte[] getPassword(List pubilcCredentials)
                      throws InvalidCredentialException
Converts password into a format the directory server password format.

Parameters:
pubilcCredentials - Credentials to convert.
Returns:
The directory server password format.
Throws:
InvalidCredentialException - Unable to process the credentials.

getDirectoryType

public String getDirectoryType()
Description copied from interface: RemoteDirectory
Returns the DIRECTORY_TYPE name of the implementation.

Returns:
The name of the implementation.

addPrincipal

public RemotePrincipal addPrincipal(RemotePrincipal principal)
                             throws InvalidPrincipalException,
                                    RemoteException,
                                    InvalidCredentialException
Description copied from interface: RemoteDirectory
Adds a principal to the directory store.

Parameters:
principal - The principal to add.
Returns:
The principal with any updated attributes.
Throws:
InvalidPrincipalException - The supplied principal is invalid.
RemoteException - An unknown remote exception occured.
InvalidCredentialException - The supplied credential(s) are invalid.

updatePrincipalCredential

public void updatePrincipalCredential(String name,
                                      PasswordCredential credential)
                               throws RemoteException,
                                      ObjectNotFoundException,
                                      InvalidCredentialException
Description copied from interface: RemoteDirectory
Updates the password credential for a principal.

Parameters:
name - The name of the principal.
credential - The new credential.
Throws:
RemoteException - An unknown remote exception occured.
ObjectNotFoundException - The principal does not exist.
InvalidCredentialException - The supplied credential is invalid.

buildEntityDN

protected String buildEntityDN(LdapContext connection,
                               String objectClass,
                               String dnAddition,
                               String nameKey,
                               String name)
                        throws NamingException,
                               ObjectNotFoundException
Description copied from class: LDAPDirectory
Builds the entity DN for a given object type.

Overrides:
buildEntityDN in class LDAPDirectory
Parameters:
connection - LDAP connection.
objectClass - LDAP object type.
dnAddition - Any DN addition that might be necessary to the base DN.
nameKey - Restriction attribute, ie name.
name - Restriction value, ie johndoe.
Returns:
The entity DN.
Throws:
NamingException - An LDAP name exception occured.
ObjectNotFoundException - Entity does not exist.

processMembers

protected Set processMembers(LdapContext connection,
                             Attributes attributes)
                      throws NamingException
Description copied from class: LDAPDirectory
Processes the members of an LDAP container object.

Overrides:
processMembers in class LDAPDirectory
Parameters:
connection - LDAP connection.
attributes - LDAP attributes.
Returns:
The populates principals.
Throws:
NamingException - An LDAP name exception occured.

isMemeber

protected boolean isMemeber(LdapContext connection,
                            String objectClass,
                            String dnAddition,
                            String nameKey,
                            String membersKey,
                            String group,
                            String principal)
                     throws NamingException
Description copied from class: LDAPDirectory
Checks if a principal is a member of a LDAP container object.

Overrides:
isMemeber in class LDAPDirectory
Parameters:
connection - LDAP connection.
objectClass - LDAP object class.
dnAddition - Any DN addition that might be necessary to the base DN.
nameKey - LDAP object class name key.
membersKey - LDAP object class members key.
group - LDAP container name.
principal - LDAP member name.
Returns:
true if and only if the princpial is a member, otherwise false.
Throws:
NamingException - An LDAP name exception occured.


Copyright © 2006 Atlassian Software Systems. All Rights Reserved.