com.atlassian.crowd.directory.ldap.mapper.entity
Class LDAPGroupAttributesMapper

java.lang.Object
  extended by com.atlassian.crowd.directory.ldap.mapper.entity.LDAPGroupAttributesMapper

public class LDAPGroupAttributesMapper
extends java.lang.Object


Field Summary
protected  java.lang.String descriptionAttribute
           
protected  long directoryId
           
protected  GroupType groupType
           
protected  org.apache.log4j.Logger logger
           
protected  java.lang.String nameAttribute
           
protected  java.lang.String objectClassAttribute
           
protected  java.lang.String objectClassValue
           
 
Constructor Summary
LDAPGroupAttributesMapper(long directoryId, GroupType groupType, LDAPPropertiesMapper ldapPropertiesMapper)
           
 
Method Summary
protected  boolean getGroupActiveFromAttribute(javax.naming.directory.Attributes directoryAttributes)
           
protected  java.lang.String getGroupDescriptionFromAttribute(javax.naming.directory.Attributes directoryAttributes)
           
protected  java.lang.String getGroupNameFromAttributes(javax.naming.directory.Attributes directoryAttributes)
           
 javax.naming.directory.Attributes mapAttributesFromGroup(Group group)
          Creates an LDAP Attributes object containing the information in the Group object.
 java.lang.Object mapFromAttributes(javax.naming.directory.Attributes attributes)
          Maps an LDAP object to the Crowd Group object type.
 GroupTemplateWithAttributes mapGroupFromAttributes(javax.naming.directory.Attributes directoryAttributes)
          Creates a Group object containing the information in the Attributes object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.log4j.Logger logger

directoryId

protected final long directoryId

groupType

protected final GroupType groupType

objectClassAttribute

protected final java.lang.String objectClassAttribute

objectClassValue

protected final java.lang.String objectClassValue

nameAttribute

protected final java.lang.String nameAttribute

descriptionAttribute

protected final java.lang.String descriptionAttribute
Constructor Detail

LDAPGroupAttributesMapper

public LDAPGroupAttributesMapper(long directoryId,
                                 GroupType groupType,
                                 LDAPPropertiesMapper ldapPropertiesMapper)
Method Detail

mapFromAttributes

public java.lang.Object mapFromAttributes(javax.naming.directory.Attributes attributes)
                                   throws org.springframework.ldap.NamingException
Maps an LDAP object to the Crowd Group object type. Implementation of AttributesMapper from Spring LDAP framework.

Parameters:
attributes - The principal from the LDAP server to map into a {Group} object.
Returns:
The populated {Group}.
Throws:
org.springframework.ldap.NamingException - A mapping exception occured.
See Also:
AttributesMapper.mapFromAttributes(javax.naming.directory.Attributes)

mapAttributesFromGroup

public javax.naming.directory.Attributes mapAttributesFromGroup(Group group)
                                                         throws org.springframework.ldap.NamingException
Creates an LDAP Attributes object containing the information in the Group object.

Parameters:
group - The object to take the values from
Returns:
A populated directory-specific Attributes object.
Throws:
org.springframework.ldap.NamingException

mapGroupFromAttributes

public GroupTemplateWithAttributes mapGroupFromAttributes(javax.naming.directory.Attributes directoryAttributes)
                                                   throws org.springframework.ldap.NamingException
Creates a Group object containing the information in the Attributes object.

Parameters:
directoryAttributes - The directory-specific {Attributes} object to take the values from
Returns:
A populated {Group} object.
Throws:
org.springframework.ldap.NamingException

getGroupDescriptionFromAttribute

protected java.lang.String getGroupDescriptionFromAttribute(javax.naming.directory.Attributes directoryAttributes)

getGroupActiveFromAttribute

protected boolean getGroupActiveFromAttribute(javax.naming.directory.Attributes directoryAttributes)

getGroupNameFromAttributes

protected java.lang.String getGroupNameFromAttributes(javax.naming.directory.Attributes directoryAttributes)
                                               throws org.springframework.ldap.NamingException
Throws:
org.springframework.ldap.NamingException


Copyright © 2010 Atlassian. All Rights Reserved.