public abstract class AbstractDirectory extends Object implements Directory
Modifier and Type | Field and Description |
---|---|
protected DirectoryCache |
cache |
BaseDirectoryDescriptor |
descriptor |
protected DirectoryFieldMapper |
fieldMapper |
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(BaseDirectoryDescriptor descriptor) |
Modifier and Type | Method and Description |
---|---|
void |
addReference(Reference reference) |
void |
addReferences(Reference[] refs) |
void |
addSession(Session session) |
protected boolean |
doSanityChecks() |
DirectoryCache |
getCache()
Gets the cache instance of the directory
|
abstract BaseDirectoryDescriptor |
getDescriptor()
To be implemented with a more specific return type.
|
List<DirectoryDeleteConstraint> |
getDirectoryDeleteConstraints() |
DirectoryFieldMapper |
getFieldMapper() |
String |
getIdField()
Gets the id field of the schema for this directory.
|
String |
getName()
Gets the unique name of the directory, used for registering.
|
String |
getParentDirectory()
Gets the name of the parent directory.
|
String |
getPasswordField()
Gets the password field of the schema for this directory.
|
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.
|
String |
getSchema()
Gets the schema name used by this directory.
|
List<String> |
getTypes()
since @8.4
|
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 |
isReadOnly()
Checks if this directory is read-only.
|
boolean |
isReference(String referenceFieldName) |
void |
orderEntries(List<DocumentModel> entries,
Map<String,String> orderBy)
Helper method to order entries.
|
void |
removeSession(Session session) |
void |
setReadOnly(boolean readOnly) |
void |
shutdown()
Shuts down the directory.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSession
public final BaseDirectoryDescriptor descriptor
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(BaseDirectoryDescriptor descriptor)
protected boolean doSanityChecks()
public abstract BaseDirectoryDescriptor getDescriptor()
public String getName()
Directory
public String getSchema()
Directory
public String getParentDirectory()
Directory
getParentDirectory
in interface Directory
public String getIdField()
Directory
getIdField
in interface Directory
public String getPasswordField()
Directory
getPasswordField
in interface Directory
public boolean isReadOnly()
Directory
isReadOnly
in interface Directory
public void setReadOnly(boolean readOnly)
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
public void shutdown()
Directory
public List<DirectoryDeleteConstraint> getDirectoryDeleteConstraints()
getDirectoryDeleteConstraints
in interface Directory
Copyright © 2016 Nuxeo SA. All rights reserved.