public abstract class AbstractDirectory extends Object implements Directory
Modifier and Type | Field and Description |
---|---|
protected DirectoryCache |
cache |
protected DirectoryFieldMapper |
fieldMapper |
String |
name |
protected Map<String,List<Reference>> |
references |
protected com.codahale.metrics.MetricRegistry |
registry |
protected com.codahale.metrics.Counter |
sessionCount |
protected com.codahale.metrics.Counter |
sessionMaxCount |
Modifier | Constructor and Description |
---|---|
protected |
AbstractDirectory(String name) |
Modifier and Type | Method and Description |
---|---|
void |
addReference(Reference reference) |
void |
addReferences(Reference[] refs) |
void |
addSession(Session session) |
DirectoryCache |
getCache()
Gets the cache instance of the directory
|
DirectoryFieldMapper |
getFieldMapper() |
Reference |
getReference(String referenceFieldName)
Deprecated.
|
Collection<Reference> |
getReferences()
Lookup all References defined on the directory.
|
List<Reference> |
getReferences(String referenceFieldName)
Lookup the References by field name.
|
void |
invalidateCaches()
Invalidate my cache and the caches of linked directories by references.
|
void |
invalidateDirectoryCache()
Invalidates the cache instance of the directory
|
boolean |
isMultiTenant()
Returns
true if this directory is a multi tenant directory, false otherwise. |
boolean |
isReference(String referenceFieldName) |
void |
orderEntries(List<DocumentModel> entries,
Map<String,String> orderBy)
Helper method to order entries.
|
void |
removeSession(Session session) |
void |
shutdown()
Shuts down the directory.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIdField, getName, getParentDirectory, getPasswordField, getSchema, getSession
protected DirectoryFieldMapper fieldMapper
protected final Map<String,List<Reference>> references
protected final DirectoryCache cache
protected final com.codahale.metrics.MetricRegistry registry
protected final com.codahale.metrics.Counter sessionCount
protected final com.codahale.metrics.Counter sessionMaxCount
protected AbstractDirectory(String name)
public void invalidateCaches() throws DirectoryException
DirectoryException
public DirectoryFieldMapper getFieldMapper()
@Deprecated public Reference getReference(String referenceFieldName)
Directory
getReference
in interface Directory
public List<Reference> getReferences(String referenceFieldName)
Directory
getReferences
in interface Directory
public boolean isReference(String referenceFieldName)
public void addReference(Reference reference)
public void addReferences(Reference[] refs)
public Collection<Reference> getReferences()
Directory
getReferences
in interface Directory
public void orderEntries(List<DocumentModel> entries, Map<String,String> orderBy) throws DirectoryException
entries
- the list of entries.orderBy
- an ordered map of field name -> "asc" or "desc".DirectoryException
public DirectoryCache getCache()
Directory
public void removeSession(Session session)
public void addSession(Session session)
public void invalidateDirectoryCache() throws DirectoryException
Directory
invalidateDirectoryCache
in interface Directory
DirectoryException
public boolean isMultiTenant()
Directory
true
if this directory is a multi tenant directory, false
otherwise.isMultiTenant
in interface Directory
Copyright © 2015 Nuxeo SA. All rights reserved.