public abstract class AbstractDirectory extends Object implements Directory
| Modifier and Type | Field and Description |
|---|---|
protected DirectoryCache |
cache |
BaseDirectoryDescriptor |
descriptor |
protected DirectoryFieldMapper |
fieldMapper |
protected Class<? extends Reference> |
referenceClass |
protected Map<String,List<Reference>> |
references |
protected com.codahale.metrics.MetricRegistry |
registry |
protected Map<String,Field> |
schemaFieldMap |
protected com.codahale.metrics.Counter |
sessionCount |
protected com.codahale.metrics.Counter |
sessionMaxCount |
protected List<String> |
types |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDirectory(BaseDirectoryDescriptor descriptor,
Class<? extends Reference> referenceClass) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addInverseReferences(InverseReferenceDescriptor[] references) |
void |
addReference(Reference reference) |
void |
addReferences(Reference[] refs) |
protected void |
addReferences(ReferenceDescriptor[] references) |
void |
addSession(Session session) |
protected boolean |
doSanityChecks() |
protected void |
fallbackOnDefaultCache() |
DirectoryCache |
getCache()
Gets the cache instance of the directory
|
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.
|
Map<String,Field> |
getSchemaFieldMap()
Get schema field map
|
List<String> |
getTypes()
since @8.4
|
protected void |
initSchemaFieldMap() |
void |
invalidateCaches()
Invalidate caches
|
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, waitgetDescriptor, getSessionpublic 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 Map<String,Field> schemaFieldMap
protected Class<? extends Reference> referenceClass
protected AbstractDirectory(BaseDirectoryDescriptor descriptor, Class<? extends Reference> referenceClass)
protected boolean doSanityChecks()
public String getName()
Directorypublic String getSchema()
Directorypublic String getParentDirectory()
DirectorygetParentDirectory in interface Directorypublic String getIdField()
DirectorygetIdField in interface Directorypublic String getPasswordField()
DirectorygetPasswordField in interface Directorypublic boolean isReadOnly()
DirectoryisReadOnly in interface Directorypublic void setReadOnly(boolean readOnly)
public void invalidateCaches() throws DirectoryException
DirectoryinvalidateCaches in interface DirectoryDirectoryExceptionpublic DirectoryFieldMapper getFieldMapper()
@Deprecated public Reference getReference(String referenceFieldName)
DirectorygetReference in interface Directorypublic List<Reference> getReferences(String referenceFieldName)
DirectorygetReferences in interface Directorypublic boolean isReference(String referenceFieldName)
public void addReference(Reference reference)
public void addReferences(Reference[] refs)
protected void addInverseReferences(InverseReferenceDescriptor[] references)
protected void addReferences(ReferenceDescriptor[] references)
public Collection<Reference> getReferences()
DirectorygetReferences in interface Directorypublic 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".DirectoryExceptionpublic DirectoryCache getCache()
Directorypublic void removeSession(Session session)
public void addSession(Session session)
public void invalidateDirectoryCache() throws DirectoryException
DirectoryinvalidateDirectoryCache in interface DirectoryDirectoryExceptionpublic boolean isMultiTenant()
Directorytrue if this directory is a multi tenant directory, false otherwise.isMultiTenant in interface Directorypublic void shutdown()
Directorypublic List<DirectoryDeleteConstraint> getDirectoryDeleteConstraints()
getDirectoryDeleteConstraints in interface Directoryprotected void initSchemaFieldMap()
public Map<String,Field> getSchemaFieldMap()
DirectorygetSchemaFieldMap in interface Directoryprotected void fallbackOnDefaultCache()
Copyright © 2018 Nuxeo. All rights reserved.