Nuxeo Enterprise Platform 5.1

org.nuxeo.ecm.directory
Class AbstractDirectory

java.lang.Object
  extended by org.nuxeo.ecm.directory.AbstractDirectory
All Implemented Interfaces:
Directory
Direct Known Subclasses:
LDAPDirectory, MultiDirectory, SQLDirectory

public abstract class AbstractDirectory
extends Object
implements Directory


Nested Class Summary
static class AbstractDirectory.EntryComparator
          DocumentModel comparator.
 
Field Summary
protected  DirectoryCache cache
           
protected  DirectoryFieldMapper fieldMapper
           
static String ORDER_ASC
           
protected  Map<String,Reference> references
           
 
Constructor Summary
AbstractDirectory()
           
 
Method Summary
 void addReference(Reference reference)
           
 void addReferences(Reference[] references)
           
 DirectoryCache getCache()
          Gets the cache instance of the directory
 DirectoryFieldMapper getFieldMapper()
           
 Reference getReference(String referenceFieldName)
          Lookup a Reference by field name.
 Collection<Reference> getReferences()
          Lookup all References defined on the directory.
 void invalidateCaches()
          Invalidate my cache and the caches of linked directories by references
 boolean isReference(String referenceFieldName)
           
 void orderEntries(List<DocumentModel> entries, Map<String,String> orderBy)
          Helper method to order entries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuxeo.ecm.directory.Directory
getIdField, getIdGenerator, getName, getParentDirectory, getPasswordField, getSchema, getSession, shutdown
 

Field Detail

fieldMapper

protected DirectoryFieldMapper fieldMapper

references

protected final Map<String,Reference> references

cache

protected final DirectoryCache cache

ORDER_ASC

public static final String ORDER_ASC
See Also:
Constant Field Values
Constructor Detail

AbstractDirectory

public AbstractDirectory()
Method Detail

invalidateCaches

public void invalidateCaches()
                      throws DirectoryException
Invalidate my cache and the caches of linked directories by references

Throws:
ClientException
DirectoryException

getFieldMapper

public DirectoryFieldMapper getFieldMapper()

getReference

public Reference getReference(String referenceFieldName)
Description copied from interface: Directory
Lookup a Reference by field name.

Specified by:
getReference in interface Directory
Returns:
the matching reference implementation or null

isReference

public boolean isReference(String referenceFieldName)

addReference

public void addReference(Reference reference)
                  throws ClientException
Throws:
ClientException

addReferences

public void addReferences(Reference[] references)
                   throws ClientException
Throws:
ClientException

getReferences

public Collection<Reference> getReferences()
Description copied from interface: Directory
Lookup all References defined on the directory.

Specified by:
getReferences in interface Directory
Returns:
all registered references

orderEntries

public void orderEntries(List<DocumentModel> entries,
                         Map<String,String> orderBy)
                  throws DirectoryException
Helper method to order entries.

Parameters:
entries - the list of entries.
orderBy - an ordered map of field name -> "asc" or "desc".
Throws:
DirectoryException

getCache

public DirectoryCache getCache()
Description copied from interface: Directory
Gets the cache instance of the directory

Specified by:
getCache in interface Directory
Returns:
the cache of the directory

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.