[exo-jcr-commits] exo-jcr SVN: r2095 - in core/trunk: docs and 8 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Mar 22 09:34:07 EDT 2010


Author: tolusha
Date: 2010-03-22 09:34:06 -0400 (Mon, 22 Mar 2010)
New Revision: 2095

Added:
   core/trunk/docs/
   core/trunk/docs/pom.xml
   core/trunk/docs/reference/
   core/trunk/docs/reference/en/
   core/trunk/docs/reference/en/build.cmd
   core/trunk/docs/reference/en/pom.xml
   core/trunk/docs/reference/en/src/
   core/trunk/docs/reference/en/src/main/
   core/trunk/docs/reference/en/src/main/docbook/
   core/trunk/docs/reference/en/src/main/docbook/en-US/
   core/trunk/docs/reference/en/src/main/docbook/en-US/master.xml
   core/trunk/docs/reference/en/src/main/docbook/en-US/modules/
   core/trunk/docs/reference/en/src/main/docbook/en-US/modules/services.xml
   core/trunk/docs/reference/en/src/main/docbook/en-US/modules/services/
   core/trunk/docs/reference/en/src/main/docbook/en-US/modules/services/db-creator-service.xml
   core/trunk/docs/reference/en/src/main/resources/
   core/trunk/docs/reference/pom.xml
Log:
EXOJCR-573: add DBCreator docbook

Added: core/trunk/docs/pom.xml
===================================================================
--- core/trunk/docs/pom.xml	                        (rev 0)
+++ core/trunk/docs/pom.xml	2010-03-22 13:34:06 UTC (rev 2095)
@@ -0,0 +1,38 @@
+<!--
+
+    Copyright (C) 2009 eXo Platform SAS.
+    
+    This is free software; you can redistribute it and/or modify it
+    under the terms of the GNU Lesser General Public License as
+    published by the Free Software Foundation; either version 2.1 of
+    the License, or (at your option) any later version.
+    
+    This software is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+    Lesser General Public License for more details.
+    
+    You should have received a copy of the GNU Lesser General Public
+    License along with this software; if not, write to the Free
+    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+    02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <parent>
+      <groupId>org.exoplatform.core</groupId>
+      <artifactId>core-parent</artifactId>
+      <version>2.3.1-GA-SNAPSHOT</version>
+   </parent>
+
+   <modelVersion>4.0.0</modelVersion>
+   <artifactId>docs</artifactId>
+
+   <name>Core project documentation</name>
+   <packaging>pom</packaging>
+
+   <modules>
+      <module>reference</module>
+   </modules>
+</project>

Added: core/trunk/docs/reference/en/build.cmd
===================================================================
--- core/trunk/docs/reference/en/build.cmd	                        (rev 0)
+++ core/trunk/docs/reference/en/build.cmd	2010-03-22 13:34:06 UTC (rev 2095)
@@ -0,0 +1 @@
+ at start mvn clean install jdocbook:resources jdocbook:generate
\ No newline at end of file

Added: core/trunk/docs/reference/en/pom.xml
===================================================================
--- core/trunk/docs/reference/en/pom.xml	                        (rev 0)
+++ core/trunk/docs/reference/en/pom.xml	2010-03-22 13:34:06 UTC (rev 2095)
@@ -0,0 +1,128 @@
+<!--
+
+    Copyright (C) 2009 eXo Platform SAS.
+    
+    This is free software; you can redistribute it and/or modify it
+    under the terms of the GNU Lesser General Public License as
+    published by the Free Software Foundation; either version 2.1 of
+    the License, or (at your option) any later version.
+    
+    This software is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+    Lesser General Public License for more details.
+    
+    You should have received a copy of the GNU Lesser General Public
+    License along with this software; if not, write to the Free
+    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+    02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <parent>
+      <groupId>org.exoplatform.core</groupId>
+      <artifactId>reference-docs</artifactId>
+      <version>2.3.1-GA-SNAPSHOT</version>
+   </parent>
+
+   <modelVersion>4.0.0</modelVersion>
+   <artifactId>reference-docs-${translation}</artifactId>
+
+   <name>Core reference documentation (${translation})</name>
+   <packaging>jdocbook</packaging>
+
+   <properties>
+      <translation>en</translation>
+      <enforcer.skip>true</enforcer.skip>
+   </properties>
+
+   <build>
+      <finalName>${project.parent.artifactId}_${translation}-${version}</finalName>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-dependency-plugin</artifactId>
+         </plugin>
+         <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>xml-maven-plugin</artifactId>
+            <!-- version>1.0-beta-2</version -->
+         </plugin>
+
+         <plugin>
+            <groupId>org.jboss.maven.plugins</groupId>
+            <artifactId>maven-jdocbook-plugin</artifactId>
+            <version>2.1.1</version>
+            <extensions>true</extensions>
+            <dependencies>
+               <dependency>
+                  <groupId>org.exoplatform.doc</groupId>
+                  <artifactId>exo-docbook-xslt</artifactId>
+                  <version>${org.exoplatform.doc-style.version}</version>
+               </dependency>
+               <dependency>
+                  <groupId>org.exoplatform.doc</groupId>
+                  <artifactId>exo-jdocbook-style</artifactId>
+                  <version>${org.exoplatform.doc-style.version}</version>
+                  <type>jdocbook-style</type>
+               </dependency>
+               <!-- dependency>
+                  <groupId>xalan</groupId>
+                  <artifactId>xalan</artifactId>
+                  <version>2.7.1</version>
+               </dependency --> 
+               <!-- dependency> 
+                  <groupId>net.sf.saxon</groupId>
+                  <artifactId>saxon</artifactId>
+                  <version>9.1.0.8</version>
+               </dependency --> 
+            </dependencies>
+            <configuration>
+               <sourceDocumentName>master.xml</sourceDocumentName>
+
+               <!--sourceDocumentName>modules/lock-manager-config.xml</sourceDocumentName-->
+               <imageResource>
+                  <directory>${pom.basedir}/src/main/resources</directory>
+                  <includes>
+                     <include>images/**/*</include>
+                  </includes>
+               </imageResource>              
+
+               <formats>
+                  <format>
+                     <formatName>html</formatName>
+                     <stylesheetResource>classpath:/xslt/org/exojcr/xhtml.xsl</stylesheetResource>
+                     <finalName>index.html</finalName>
+                  </format>
+                  <format>
+                     <formatName>html_single</formatName>
+                     <stylesheetResource>classpath:/xslt/org/exojcr/xhtml-single.xsl</stylesheetResource>
+                     <finalName>index.html</finalName>
+                  </format>
+                  <!-- format>
+                     <formatName>pdf</formatName>
+                     <stylesheetResource>classpath://xslt/org/exojcr/pdf.xsl</stylesheetResource>
+                     <finalName>${pom.name}.pdf</finalName>
+                  </format -->
+                  <!-- format>
+                     <formatName>eclipse</formatName>
+                     <stylesheetResource>classpath:/xslt/org/exojcr/eclipse.xsl</stylesheetResource>
+                     <finalName>index.html</finalName>
+                  </format -->
+               </formats>
+               
+               <options>
+                  <xincludeSupported>true</xincludeSupported>
+                  <xmlTransformerType>saxon</xmlTransformerType>
+                  <!-- needed for uri-resolvers; can be ommitted if using 'current' uri scheme -->
+                  <!--     could also locate the docbook dependency and inspect its version... -->
+                  <docbookVersion>1.74.0</docbookVersion>
+               </options>
+
+            </configuration>
+         </plugin>
+      </plugins>
+   </build>
+
+</project>

Added: core/trunk/docs/reference/en/src/main/docbook/en-US/master.xml
===================================================================
--- core/trunk/docs/reference/en/src/main/docbook/en-US/master.xml	                        (rev 0)
+++ core/trunk/docs/reference/en/src/main/docbook/en-US/master.xml	2010-03-22 13:34:06 UTC (rev 2095)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) 2009 eXo Platform SAS.
+    
+    This is free software; you can redistribute it and/or modify it
+    under the terms of the GNU Lesser General Public License as
+    published by the Free Software Foundation; either version 2.1 of
+    the License, or (at your option) any later version.
+    
+    This software is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+    Lesser General Public License for more details.
+    
+    You should have received a copy of the GNU Lesser General Public
+    License along with this software; if not, write to the Free
+    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+    02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<book lang="en">
+  <bookinfo>
+    <title>Core Reference Manual</title>
+
+    <subtitle>Core</subtitle>
+
+    <copyright>
+      <year>2009, 2010</year>
+      <holder>eXoPlatform</holder>
+    </copyright>
+  </bookinfo>
+
+  <toc></toc>
+
+  <xi:include href="modules/services.xml"
+              xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+</book>

Added: core/trunk/docs/reference/en/src/main/docbook/en-US/modules/services/db-creator-service.xml
===================================================================
--- core/trunk/docs/reference/en/src/main/docbook/en-US/modules/services/db-creator-service.xml	                        (rev 0)
+++ core/trunk/docs/reference/en/src/main/docbook/en-US/modules/services/db-creator-service.xml	2010-03-22 13:34:06 UTC (rev 2095)
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter>
+  <?dbhtml filename="ch-db-creator-service.html"?>
+
+  <title>Database Creator</title>
+
+  <section>
+    <title>About</title>
+
+    <para>Database Creator is responsible for execution DDL script at runtime.
+    A DDL script may contain templates for database name, user name and
+    password which will be replaced by real values at execution time.</para>
+
+    <para>Supports 3 templates:</para>
+
+    <itemizedlist>
+      <listitem>
+        <para>${database} for database name;</para>
+      </listitem>
+
+      <listitem>
+        <para>${username} for user name;</para>
+      </listitem>
+
+      <listitem>
+        <para>${password} for user's password;</para>
+      </listitem>
+    </itemizedlist>
+  </section>
+
+  <section>
+    <title>API</title>
+
+    <para>Service provide method for execute script for new database creation.
+    Database name which are passed as parameter will be substituted in DDL
+    script instead of ${database} template. Returns DBConnectionInfo object
+    (with all neccesary information of new database's connection) or throws
+    DBScriptExecutorException exception if any errors occurs in other
+    case.</para>
+
+    <programlisting>public DBConnectionInfo createDatabase(String dbName) throws DBCreatorException;</programlisting>
+
+    <para>For MSSQL and Sybase servers uses autocommit mode set true for
+    connection. It's due to after execution "create database" command newly
+    created database not available for "use" command and therefore you can't
+    create new user inside database per one script.</para>
+  </section>
+
+  <section>
+    <title>A configuration examples</title>
+
+    <para>Service's configuration.</para>
+
+    <programlisting>&lt;component&gt;
+      &lt;key&gt;org.exoplatform.services.database.creator.DBCreator&lt;/key&gt;
+      &lt;type&gt;org.exoplatform.services.database.creator.DBCreator&lt;/type&gt;
+      &lt;init-params&gt;
+      &lt;properties-param&gt;
+            &lt;name&gt;db-connection&lt;/name&gt;
+            &lt;description&gt;database connection properties&lt;/description&gt;
+            &lt;property name="driverClassName" value="com.mysql.jdbc.Driver" /&gt;
+            &lt;property name="url" value="jdbc:mysql://localhost/" /&gt;
+            &lt;property name="username" value="root" /&gt;
+            &lt;property name="password" value="admin" /&gt;
+         &lt;/properties-param&gt;
+         &lt;properties-param&gt;
+            &lt;name&gt;db-creation&lt;/name&gt;.
+            &lt;description&gt;database creation properties&lt;/description&gt;.
+            &lt;property name="scriptPath" value="script.sql" /&gt;
+            &lt;property name="username" value="testuser" /&gt;
+            &lt;property name="password" value="testpwd" /&gt;
+         &lt;/properties-param&gt;
+      &lt;/init-params&gt;
+   &lt;/component&gt;</programlisting>
+
+    <para>db-connection properties section contains parameters needed for
+    connection to database server</para>
+
+    <para>db-creation properties section contains paramaters for database
+    creation using DDL script:</para>
+
+    <itemizedlist>
+      <listitem>
+        <para>scriptPath: absolute path to DDL script file;</para>
+      </listitem>
+
+      <listitem>
+        <para>username: user name for substitution ${username} template in DDL
+        script;</para>
+      </listitem>
+
+      <listitem>
+        <para>password: user's password for substitution ${password} template
+        in DDL script;</para>
+      </listitem>
+    </itemizedlist>
+
+    <para>Specific db-connection properties section for different
+    databases.</para>
+
+    <para>MySQL:</para>
+
+    <programlisting>&lt;property name="driverClassName" value="com.mysql.jdbc.Driver" /&gt;
+&lt;property name="url" value="jdbc:mysql://localhost/" /&gt;
+&lt;property name="username" value="root" /&gt;
+&lt;property name="password" value="admin" /&gt;</programlisting>
+
+    <para>PostgreSQL:</para>
+
+    <programlisting>&lt;property name="driverClassName" value="org.postgresql.Driver" /&gt;
+&lt;property name="url" value="jdbc:postgresql://localhost/" /&gt;
+&lt;property name="username" value="root" /&gt;
+&lt;property name="password" value="admin" /&gt;</programlisting>
+
+    <para>MSSQL:</para>
+
+    <programlisting>&lt;property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/&gt;
+&lt;property name="url" value="jdbc:sqlserver://localhost:1433;"/&gt;
+&lt;property name="username" value="root"/&gt;
+&lt;property name="password" value="admin"/&gt;</programlisting>
+
+    <para>Sybase:</para>
+
+    <programlisting>&lt;property name="driverClassName" value="com.sybase.jdbc3.jdbc.SybDriver" /&gt;
+&lt;property name="url" value="jdbc:sybase:Tds:localhost:5000/"/&gt;
+&lt;property name="username" value="root"/&gt;
+&lt;property name="password" value="admin"/&gt;</programlisting>
+
+    <para>Oracle:</para>
+
+    <programlisting>&lt;property name="driverClassName" value="oracle.jdbc.OracleDriver" /&gt;
+&lt;property name="url" value="jdbc:oracle:thin:@db2.exoua-int:1521:orclvm" /&gt;
+&lt;property name="username" value="root" /&gt;
+&lt;property name="password" value="admin" /&gt;</programlisting>
+  </section>
+
+  <section>
+    <title>An examples of a DDL script</title>
+
+    <para>MySQL:</para>
+
+    <programlisting>CREATE DATABASE ${database};
+USE ${database};
+CREATE USER '${username}' IDENTIFIED BY '${password}';
+GRANT SELECT,INSERT,UPDATE,DELETE ON ${database}.* TO '${username}';</programlisting>
+
+    <para>PostgreSQL:</para>
+
+    <programlisting>CREATE USER ${username} WITH PASSWORD '${password}';
+CREATE DATABASE ${database} WITH OWNER ${username};</programlisting>
+
+    <para>MSSQL:</para>
+
+    <programlisting>USE MASTER;
+CREATE DATABASE ${database};
+USE ${database};
+CREATE LOGIN ${username} WITH PASSWORD = '${password}';
+CREATE USER ${username} FOR LOGIN ${username};</programlisting>
+
+    <para>Sybase:</para>
+
+    <programlisting>sp_addlogin ${username}, ${password};
+CREATE DATABASE ${database};
+USE ${database};
+sp_adduser ${username};</programlisting>
+
+    <para>Oracle:</para>
+
+    <programlisting>CREATE TABLESPACE "${database}" DATAFILE '/var/oracle_db/orclvm/${database}' SIZE 10M AUTOEXTEND ON NEXT 6M MAXSIZE UNLIMITED LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
+CREATE TEMPORARY TABLESPACE "${database}.TEMP" TEMPFILE '/var/oracle_db/orclvm/${database}.temp' SIZE 5M AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;
+CREATE USER "${username}" PROFILE "DEFAULT" IDENTIFIED BY "${password}" DEFAULT TABLESPACE "${database}" TEMPORARY TABLESPACE "${database}.TEMP" ACCOUNT UNLOCK;
+GRANT CREATE SEQUENCE TO "${username}";
+GRANT CREATE TABLE TO "${username}";
+GRANT CREATE TRIGGER TO "${username}";
+GRANT UNLIMITED TABLESPACE TO "${username}";
+GRANT "CONNECT" TO "${username}";
+GRANT "RESOURCE" TO "${username}";</programlisting>
+  </section>
+</chapter>

Added: core/trunk/docs/reference/en/src/main/docbook/en-US/modules/services.xml
===================================================================
--- core/trunk/docs/reference/en/src/main/docbook/en-US/modules/services.xml	                        (rev 0)
+++ core/trunk/docs/reference/en/src/main/docbook/en-US/modules/services.xml	2010-03-22 13:34:06 UTC (rev 2095)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<part>
+  <?dbhtml filename="part-services.html"?>
+
+  <title>Core</title>
+
+  <xi:include href="services/db-creator-service.xml"
+              xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+</part>

Added: core/trunk/docs/reference/pom.xml
===================================================================
--- core/trunk/docs/reference/pom.xml	                        (rev 0)
+++ core/trunk/docs/reference/pom.xml	2010-03-22 13:34:06 UTC (rev 2095)
@@ -0,0 +1,38 @@
+<!--
+
+    Copyright (C) 2009 eXo Platform SAS.
+    
+    This is free software; you can redistribute it and/or modify it
+    under the terms of the GNU Lesser General Public License as
+    published by the Free Software Foundation; either version 2.1 of
+    the License, or (at your option) any later version.
+    
+    This software is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+    Lesser General Public License for more details.
+    
+    You should have received a copy of the GNU Lesser General Public
+    License along with this software; if not, write to the Free
+    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+    02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+   <parent>
+      <groupId>org.exoplatform.core</groupId>
+      <artifactId>docs</artifactId>
+      <version>2.3.1-GA-SNAPSHOT</version>
+   </parent>
+
+   <modelVersion>4.0.0</modelVersion>
+   <artifactId>reference-docs</artifactId>
+
+   <name>Core reference documentation</name>
+   <packaging>pom</packaging>
+
+   <modules>
+      <module>en</module>
+   </modules>
+</project>



More information about the exo-jcr-commits mailing list