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  | 
static String | 
TENANT_ID_FIELD  | 
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()  | 
void | 
addReference(Reference reference)  | 
protected void | 
addReferences()  | 
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 
 | 
void | 
initialize()
INTERNAL, DO NOT CALL. 
 | 
void | 
initializeInverseReferences()
INTERNAL, DO NOT CALL. 
 | 
void | 
initializeReferences()
INTERNAL, DO NOT CALL. 
 | 
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)  | 
protected void | 
loadData()  | 
static Map<String,String> | 
makeOrderBy(OrderByList orders)
Helper to create an old-style ordering map. 
 | 
protected Reference | 
newReference(ReferenceDescriptor desc)  | 
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 static final String TENANT_ID_FIELD
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 Map<String,Field> schemaFieldMap
protected Class<? extends Reference> referenceClass
protected AbstractDirectory(BaseDirectoryDescriptor descriptor, Class<? extends Reference> referenceClass)
protected boolean doSanityChecks()
public void initialize()
Directoryinitialize in interface Directoryprotected void loadData()
public void initializeReferences()
DirectoryinitializeReferences in interface Directorypublic void initializeInverseReferences()
DirectoryinitializeInverseReferences in interface Directorypublic 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()
DirectoryinvalidateCaches in interface Directorypublic 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)
protected void addReferences()
protected Reference newReference(ReferenceDescriptor desc)
protected void addInverseReferences()
public Collection<Reference> getReferences()
DirectorygetReferences in interface Directorypublic void orderEntries(List<DocumentModel> entries, Map<String,String> orderBy)
entries - the list of entries.orderBy - an ordered map of field name -> "asc" or "desc".public static Map<String,String> makeOrderBy(OrderByList orders)
public DirectoryCache getCache()
Directorypublic void removeSession(Session session)
public void addSession(Session session)
public void invalidateDirectoryCache()
DirectoryinvalidateDirectoryCache in interface Directorypublic 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 © 2019 Nuxeo. All rights reserved.