Nuxeo 5

Nuxeo 5 Component
org.nuxeo.ecm.directory.sql.SQLDirectoryFactory

Individual Documentation Coverage

done proportion
50.0 %


SQL-based implementation for NXDirectory



Author: missing

Version: missing

Location: nuxeo-services/nuxeo-platform-directory-sql/src/main/resources/OSGI-INF/SQLDirectoryFactory.xml

Require

Required by

Implementation


Extension Points:

directories


This extension point can be used to register new SQL-based
directories. The extension can contain any number of directories
declarations of the form:

        <directory name="userDirectory">
          <schema>vocabulary</schema>
          <dataSource>java:/nxsqldirectory</dataSource>
          <table>t</table>
          <dialect>org.hibernate.dialect.HSQLDialect</dialect>
          <idField>username</idField>
          <autoincrementIdField>false</autoincrementIdField>
          <createTablePolicy>on_missing_columns</createTablePolicy>
          <dataFile>setup-hsqldb.csv</dataFile>
          <querySizeLimit>1000</querySizeLimit>
          <init-dependencies>
            <dependency>dir1</dependency>
            <dependency>dir2</dependency>
          </init-dependencies>
          <references>
            <tableReference dataFile="user2group.csv" directory="groupDirectory" field="groups" schema="user2group" sourceColumn="userId" table="user2group" targetColumn="groupId" />
          </references>
        </directory>


Here is the description for each field:



  • schema - the name of the schema to be used for the directory
    entries.


  • dataSource - the dataSource name, as registered in the
    application server.


  • table - The name of the sql table where the directory data
    will be stored.


  • dialect - Optional hibernate dialect class name; if missing,
    autodetection will be performed.


  • idField - the id field designs the primary key in the table,
    used for retrieving entries by id.


  • autoincrementIdField - if this is set true, the SQLDirectory
    will fill the id field using a generated unique number,
    otherwise the client has to supply the id.


  • dataFile - csv file from which to populate the table; the
    first line must contain the column names.


  • createTablePolicy - one of "never", "always" or
    "on_missing_columns" if this is set to "never", the table will
    never be created; if set to "always", the table will be
    created each time the application is started; if set to
    "on_missing_columns", the table will be created only if the
    schema declares some fields that are not present in the sql
    table.


  • querySizeLimit - the maximum number of results that the
    queries on this directory should return; if there are more
    results than this, an exception will be raised.


  • init-dependencies - a list of directories that should be
    initialized before this one


The references tag is used to define relations between
directories. (TODO: describe the references types.)



Is a contribution to:


Has contribution from:

Last generation: 14:21:24 CEST 11/06/2009