Class BaseDirectoryDescriptor

java.lang.Object
org.nuxeo.ecm.directory.BaseDirectoryDescriptor
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
CoreDirectoryDescriptor, LDAPDirectoryDescriptor, MemoryDirectoryDescriptor, MongoDBDirectoryDescriptor, MultiDirectoryDescriptor, SQLDirectoryDescriptor

public class BaseDirectoryDescriptor extends Object implements Cloneable
Basic directory descriptor, containing the basic fields used by all directories.
Since:
8.2
  • Field Details

    • AUTO_INCREMENT_ID_FIELD_DEFAULT

      public static final boolean AUTO_INCREMENT_ID_FIELD_DEFAULT
      See Also:
    • CACHE_TIMEOUT_DEFAULT

      public static final int CACHE_TIMEOUT_DEFAULT
      See Also:
    • CACHE_MAX_SIZE_DEFAULT

      public static final int CACHE_MAX_SIZE_DEFAULT
      See Also:
    • READ_ONLY_DEFAULT

      public static final boolean READ_ONLY_DEFAULT
      See Also:
    • SUBSTRING_MATCH_TYPE_DEFAULT

      public static final BaseDirectoryDescriptor.SubstringMatchType SUBSTRING_MATCH_TYPE_DEFAULT
    • DEFAULT_DATA_FILE_CHARACTER_SEPARATOR

      public static final char DEFAULT_DATA_FILE_CHARACTER_SEPARATOR
      See Also:
    • CREATE_TABLE_POLICY_NEVER

      public static final String CREATE_TABLE_POLICY_NEVER
      Doesn't create or modify the table in any way.
      See Also:
    • CREATE_TABLE_POLICY_ALWAYS

      public static final String CREATE_TABLE_POLICY_ALWAYS
      Always recreates the table from scratch and loads the CSV data.
      See Also:
    • CREATE_TABLE_POLICY_ON_MISSING_COLUMNS

      public static final String CREATE_TABLE_POLICY_ON_MISSING_COLUMNS
      If the table doesn't exist then creates it and loads the CSV data. If the table already exists, only adds missing columns (with null values).
      See Also:
    • CREATE_TABLE_POLICY_DEFAULT

      public static final String CREATE_TABLE_POLICY_DEFAULT
      See Also:
    • CREATE_TABLE_POLICIES

      public static final List<String> CREATE_TABLE_POLICIES
    • DATA_LOADING_POLICY_LEGACY

      public static final String DATA_LOADING_POLICY_LEGACY
      Load the CSV file if the table has just been created (behavior before introducing data loading feature).
      Since:
      11.1
      See Also:
    • DATA_LOADING_POLICY_NEVER_LOAD

      public static final String DATA_LOADING_POLICY_NEVER_LOAD
      Doesn't load the CSV data.
      Since:
      11.1
      See Also:
    • DATA_LOADING_POLICY_SKIP_DUPLICATE

      public static final String DATA_LOADING_POLICY_SKIP_DUPLICATE
      Duplicate lines in data load from CSV are ignored.
      Since:
      11.1
      See Also:
    • DATA_LOADING_POLICY_REJECT_DUPLICATE

      public static final String DATA_LOADING_POLICY_REJECT_DUPLICATE
      If the data loaded from CSV already exist throw an exception.
      Since:
      11.1
      See Also:
    • DATA_LOADING_POLICY_UPDATE_DUPLICATE

      public static final String DATA_LOADING_POLICY_UPDATE_DUPLICATE
      Load CSV data and update duplicate lines.
      Since:
      11.1
      See Also:
    • DATA_LOADING_POLICIES

      public static final List<String> DATA_LOADING_POLICIES
      Policy used to deal with duplicates when loading data to a directory.
      Since:
      11.1
    • name

      public String name
    • remove

      public boolean remove
    • template

      public boolean template
    • extendz

      public String extendz
    • parentDirectory

      public String parentDirectory
    • schemaName

      public String schemaName
    • idField

      public String idField
    • autoincrementIdField

      public Boolean autoincrementIdField
    • tableName

      public String tableName
    • readOnly

      public Boolean readOnly
    • passwordField

      public String passwordField
    • passwordHashAlgorithm

      public String passwordHashAlgorithm
    • permissions

      public PermissionDescriptor[] permissions
    • cacheTimeout

      public Integer cacheTimeout
    • cacheMaxSize

      public Integer cacheMaxSize
    • cacheEntryName

      public String cacheEntryName
    • cacheEntryWithoutReferencesName

      public String cacheEntryWithoutReferencesName
    • negativeCaching

      public Boolean negativeCaching
    • substringMatchType

      public String substringMatchType
    • computeMultiTenantId

      protected boolean computeMultiTenantId
    • types

      public String[] types
      Since:
      8.4
    • dataFileName

      public String dataFileName
    • dataFileCharacterSeparator

      public String dataFileCharacterSeparator
    • createTablePolicy

      public String createTablePolicy
    • dataLoadingPolicy

      public String dataLoadingPolicy
      Since:
      11.1
  • Constructor Details

    • BaseDirectoryDescriptor

      public BaseDirectoryDescriptor()
  • Method Details

    • isAutoincrementIdField

      public boolean isAutoincrementIdField()
    • setAutoincrementIdField

      public void setAutoincrementIdField(boolean autoincrementIdField)
    • getDataFileName

      public String getDataFileName()
    • getDataFileCharacterSeparator

      public char getDataFileCharacterSeparator()
    • getCreateTablePolicy

      public String getCreateTablePolicy()
    • getDataLoadingPolicy

      public String getDataLoadingPolicy()
      Returns the dataLoadingPolicy; default is DATA_LOADING_POLICY_NEVER_LOAD.
      Since:
      11.1
    • checkDataLoadingPolicy

      protected static void checkDataLoadingPolicy(String dataLoadingPolicy)
    • isReadOnly

      public boolean isReadOnly()
    • setReadOnly

      public void setReadOnly(boolean readOnly)
    • getCacheTimeout

      public int getCacheTimeout()
    • getCacheMaxSize

      public int getCacheMaxSize()
    • getSubstringMatchType

      public BaseDirectoryDescriptor.SubstringMatchType getSubstringMatchType()
    • clone

      public BaseDirectoryDescriptor clone()
      Sub-classes MUST OVERRIDE and use a more specific return type.

      Usually it's bad to use clone(), and a copy-constructor is preferred, but here we want the copy method to be inheritable so clone() is appropriate.

      Overrides:
      clone in class Object
    • merge

      public void merge(BaseDirectoryDescriptor other)
    • newDirectory

      public Directory newDirectory()
      Creates a new Directory instance from this BaseDirectoryDescriptor.
    • getDeleteConstraints

      public List<DirectoryDeleteConstraint> getDeleteConstraints()
      Since:
      8.4
    • getReferences

      public ReferenceDescriptor[] getReferences()
      Since:
      9.2
    • getInverseReferences

      public InverseReferenceDescriptor[] getInverseReferences()
      Since:
      9.2
    • isComputeMultiTenantId

      public boolean isComputeMultiTenantId()
      Returns true if a multi tenant id should be computed for this directory, if the directory has support for multi tenancy, false otherwise.
      Since:
      10.1