root/org.nuxeo.ecm.platform/trunk/nuxeo-platform-directory-sql/src/main/resources/OSGI-INF/SQLDirectoryFactory.xml

Revision 24104, 3.6 kB (checked in by lgodard, 2 years ago)

- cosmit nxpointdoc

  • Property svn:eol-style set to native
Line 
1 <?xml version="1.0"?>
2
3 <component name="org.nuxeo.ecm.directory.sql.SQLDirectoryFactory">
4   <implementation
5     class="org.nuxeo.ecm.directory.sql.SQLDirectoryFactory"/>
6   <require>org.nuxeo.ecm.directory.DirectoryServiceImpl</require>
7   <documentation>
8     SQL-based implementation for NXDirectory
9   </documentation>
10
11
12   <extension target="org.nuxeo.ecm.directory.DirectoryServiceImpl"
13     point="factoryDescriptor">
14     <factoryDescriptor
15       component="org.nuxeo.ecm.directory.sql.SQLDirectoryFactory"/>
16   </extension>
17
18   <extension-point name="directories">
19     <documentation>
20       This extension point can be used to register new SQL-based
21       directories. The extension can contain any number of directories
22       declarations of the form:
23
24       <code>
25         <directory name="userDirectory">
26           <schema>vocabulary</schema>
27           <dataSource>java:/nxsqldirectory</dataSource>
28           <table>t</table>
29           <dialect>org.hibernate.dialect.HSQLDialect</dialect>
30           <idField>username</idField>
31           <autoincrementIdField>false</autoincrementIdField>
32           <createTablePolicy>on_missing_columns</createTablePolicy>
33           <dataFile>setup-hsqldb.csv</dataFile>
34           <querySizeLimit>1000</querySizeLimit>
35           <init-dependencies>
36             <dependency>dir1</dependency>
37             <dependency>dir2</dependency>
38           </init-dependencies>
39           <references>
40             <tableReference field="groups" directory="groupDirectory"
41               table="user2group" sourceColumn="userId"
42               targetColumn="groupId" schema="user2group"
43               dataFile="user2group.csv" />
44           </references>
45
46         </directory>
47       </code>
48       Here is the description for each field:
49       <ul>
50         <li>schema - the name of the schema to be used for the directory
51           entries.
52         </li>
53         <li>dataSource - the dataSource name, as registered in the
54           application server.
55         </li>
56         <li>table - The name of the sql table where the directory data
57           will be stored.
58         </li>
59         <li>dialect - Optional hibernate dialect class name; if missing,
60           autodetection will be performed.
61         </li>
62         <li>
63           idField - the id field designs the primary key in the table,
64           used for retrieving entries by id.
65         </li>
66         <li>autoincrementIdField - if this is set true, the SQLDirectory
67           will fill the id field using a generated unique number,
68           otherwise the client has to supply the id.
69         </li>
70         <li>dataFile - csv file from which to populate the table; the
71           first line must contain the column names.
72         </li>
73         <li>createTablePolicy - one of "never", "always" or
74           "on_missing_columns" if this is set to "never", the table will
75           never be created; if set to "always", the table will be
76           created each time the application is started; if set to
77           "on_missing_columns", the table will be created only if the
78           schema declares some fields that are not present in the sql
79           table.
80         </li>
81         <li>querySizeLimit - the maximum number of results that the
82           queries on this directory should return; if there are more
83           results than this, an exception will be raised.
84         </li>
85         <li>init-dependencies - a list of directories that should be
86           initialized before this one
87         </li>
88       </ul>
89       The references tag is used to define relations between
90       directories. (TODO: describe the references types.)
91     </documentation>
92     <object class="org.nuxeo.ecm.directory.sql.SQLDirectoryDescriptor"/>
93   </extension-point>
94
95 </component>
Note: See TracBrowser for help on using the browser.