com.atlassian.crowd.model.directory
Class Directory

java.lang.Object
  extended by com.atlassian.crowd.integration.model.InternalEntity
      extended by com.atlassian.crowd.model.directory.Directory
All Implemented Interfaces:
AttributeAware, java.io.Serializable

public class Directory
extends InternalEntity
implements AttributeAware

See Also:
Serialized Form

Field Summary
static java.lang.String ATTRIBUTE_KEY_CACHE_CLASS
           
static java.lang.String ATTRIBUTE_KEY_CACHE_MAX_ELEMENTS_IN_MEMORY
           
static java.lang.String ATTRIBUTE_KEY_POLLING_INTERVAL
           
static java.lang.String ATTRIBUTE_KEY_USE_CACHING
           
static java.lang.String ATTRIBUTE_KEY_USE_MONITORING
           
static java.lang.String ATTRIBUTE_KEY_USER_ENCRYPTION_METHOD
           
 
Fields inherited from class com.atlassian.crowd.integration.model.InternalEntity
active, createdDate, id, name, updatedDate
 
Constructor Summary
Directory()
           
Directory(InternalEntityTemplate template)
          Used for importing via XML migration.
Directory(java.lang.String name, DirectoryType type, java.lang.String implementationClass)
           
 
Method Summary
 void addAllowedOperation(OperationType operationType)
           
 boolean equals(java.lang.Object o)
           
 java.util.Set<OperationType> getAllowedOperations()
           
 java.lang.String getAttribute(java.lang.String name)
           
 java.util.Set<java.lang.String> getAttributeNames()
           
 java.util.Map<java.lang.String,java.lang.String> getAttributes()
           
 java.util.List<java.lang.String> getAttributes(java.lang.String name)
           
 java.lang.String getDescription()
           
 java.lang.String getEncryptionType()
           
 RemoteDirectory getImplementation()
          Loads the implementationClass for this directory.
 java.lang.String getImplementationClass()
           
 java.lang.String getLowerImplementationClass()
           
 java.lang.String getLowerName()
           
 RemoteDirectory getRawImplementation()
           
 DirectoryType getType()
           
 java.lang.String getTypeAsString()
           
 boolean hasAttribute(java.lang.String name)
           
 int hashCode()
           
 void removeAttribute(java.lang.String name)
           
 void setActive(boolean active)
           
 void setAllowedOperations(java.util.Set<OperationType> allowedOperations)
           
 void setAttribute(java.lang.String name, java.lang.String value)
           
 void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
           
 void setDescription(java.lang.String description)
           
 void setImplementationClass(java.lang.String implementationClass)
           
 void setName(java.lang.String name)
           
 void setType(DirectoryType type)
           
 java.lang.String toString()
           
 void validate()
           
 
Methods inherited from class com.atlassian.crowd.integration.model.InternalEntity
getCreatedDate, getId, getName, getUpdatedDate, isActive, setCreatedDate, setCreatedDateToNow, setUpdatedDate, setUpdatedDateToNow
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTRIBUTE_KEY_USE_CACHING

public static final java.lang.String ATTRIBUTE_KEY_USE_CACHING
See Also:
Constant Field Values

ATTRIBUTE_KEY_USE_MONITORING

public static final java.lang.String ATTRIBUTE_KEY_USE_MONITORING
See Also:
Constant Field Values

ATTRIBUTE_KEY_CACHE_CLASS

public static final java.lang.String ATTRIBUTE_KEY_CACHE_CLASS
See Also:
Constant Field Values

ATTRIBUTE_KEY_CACHE_MAX_ELEMENTS_IN_MEMORY

public static final java.lang.String ATTRIBUTE_KEY_CACHE_MAX_ELEMENTS_IN_MEMORY
See Also:
Constant Field Values

ATTRIBUTE_KEY_POLLING_INTERVAL

public static final java.lang.String ATTRIBUTE_KEY_POLLING_INTERVAL
See Also:
Constant Field Values

ATTRIBUTE_KEY_USER_ENCRYPTION_METHOD

public static final java.lang.String ATTRIBUTE_KEY_USER_ENCRYPTION_METHOD
See Also:
Constant Field Values
Constructor Detail

Directory

public Directory()

Directory

public Directory(InternalEntityTemplate template)
Used for importing via XML migration.

Parameters:
template - directory template.

Directory

public Directory(java.lang.String name,
                 DirectoryType type,
                 java.lang.String implementationClass)
Method Detail

getImplementation

public RemoteDirectory getImplementation()
                                  throws DirectoryInstantiationException
Loads the implementationClass for this directory.

Returns:
The loaded interface for the RemoteDirectory.
Throws:
DirectoryInstantiationException - If the loading of the RemoteDirectory fails.

getRawImplementation

public RemoteDirectory getRawImplementation()
                                     throws DirectoryInstantiationException
Throws:
DirectoryInstantiationException

getEncryptionType

public java.lang.String getEncryptionType()

getAttributes

public java.util.Map<java.lang.String,java.lang.String> getAttributes()

setAttributes

public void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)

getAllowedOperations

public java.util.Set<OperationType> getAllowedOperations()

addAllowedOperation

public void addAllowedOperation(OperationType operationType)

setAllowedOperations

public void setAllowedOperations(java.util.Set<OperationType> allowedOperations)

getLowerImplementationClass

public java.lang.String getLowerImplementationClass()

getLowerName

public java.lang.String getLowerName()

getDescription

public java.lang.String getDescription()

getType

public DirectoryType getType()

getTypeAsString

public java.lang.String getTypeAsString()

getImplementationClass

public java.lang.String getImplementationClass()

setDescription

public void setDescription(java.lang.String description)

setType

public void setType(DirectoryType type)

setImplementationClass

public void setImplementationClass(java.lang.String implementationClass)

setName

public void setName(java.lang.String name)
Overrides:
setName in class InternalEntity

setActive

public void setActive(boolean active)
Overrides:
setActive in class InternalEntity

getAttributes

public java.util.List<java.lang.String> getAttributes(java.lang.String name)
Specified by:
getAttributes in interface AttributeAware
Parameters:
name - attribute name.
Returns:
a collection of the only attribtue value or null if the directory does not have the attribute.

getAttribute

public java.lang.String getAttribute(java.lang.String name)
Specified by:
getAttribute in interface AttributeAware
Parameters:
name - attribute name.
Returns:
single attribute value or null if the attribute with the given name does not exist. If multiple attribute values exist, any one could be returned.

getAttributeNames

public java.util.Set<java.lang.String> getAttributeNames()
Specified by:
getAttributeNames in interface AttributeAware
Returns:
set of attribute names.

hasAttribute

public boolean hasAttribute(java.lang.String name)
Specified by:
hasAttribute in interface AttributeAware
Parameters:
name - attribute name.
Returns:
true if an only if the user has an attribute with the supplied name and has one or more values.

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)

removeAttribute

public void removeAttribute(java.lang.String name)

validate

public void validate()

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in class InternalEntity

hashCode

public int hashCode()
Specified by:
hashCode in class InternalEntity

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.