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 Object


Field Summary
protected  String descriptionAttribute
           
protected  long directoryId
           
protected  GroupType groupType
           
protected  org.slf4j.Logger logger
           
protected  String nameAttribute
           
protected  String objectClassAttribute
           
protected  String objectClassValue
           
 
Constructor Summary
LDAPGroupAttributesMapper(long directoryId, GroupType groupType, LDAPPropertiesMapper ldapPropertiesMapper)
           
 
Method Summary
protected  boolean getGroupActiveFromAttribute(Attributes directoryAttributes)
           
protected  String getGroupDescriptionFromAttribute(Attributes directoryAttributes)
           
protected  String getGroupNameFromAttributes(Attributes directoryAttributes)
           
 Attributes mapAttributesFromGroup(Group group)
          Creates an LDAP Attributes object containing the information in the Group object.
 Object mapFromAttributes(Attributes attributes)
          Maps an LDAP object to the Crowd Group object type.
 GroupTemplateWithAttributes mapGroupFromAttributes(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.slf4j.Logger logger

directoryId

protected final long directoryId

groupType

protected final GroupType groupType

objectClassAttribute

protected final String objectClassAttribute

objectClassValue

protected final String objectClassValue

nameAttribute

protected final String nameAttribute

descriptionAttribute

protected final String descriptionAttribute
Constructor Detail

LDAPGroupAttributesMapper

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

mapFromAttributes

public Object mapFromAttributes(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 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(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 String getGroupDescriptionFromAttribute(Attributes directoryAttributes)

getGroupActiveFromAttribute

protected boolean getGroupActiveFromAttribute(Attributes directoryAttributes)

getGroupNameFromAttributes

protected String getGroupNameFromAttributes(Attributes directoryAttributes)
                                     throws org.springframework.ldap.NamingException
Throws:
org.springframework.ldap.NamingException


Copyright © 2012 Atlassian. All Rights Reserved.