]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-4232: Consolidating Nuxeo document type "boiler plate" settings/config files...
authorRichard Millet <richard.millet@berkeley.edu>
Mon, 1 Aug 2011 20:51:28 +0000 (20:51 +0000)
committerRichard Millet <richard.millet@berkeley.edu>
Mon, 1 Aug 2011 20:51:28 +0000 (20:51 +0000)
3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources/META-INF/MANIFEST.MF [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources/OSGI-INF/core-types-contrib.xml [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources/OSGI-INF/ecm-types-contrib.xml [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources/OSGI-INF/layouts-contrib.xml [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources/OSGI-INF/life-cycle-contrib.xml [new file with mode: 0644]
build.properties
services/collectionobject/3rdparty/nuxeo-platform-collectionobject-lifesci/pom.xml
services/collectionobject/3rdparty/nuxeo-platform-collectionobject/pom.xml
services/collectionobject/3rdparty/nuxeo-platform-collectionobject/src/main/resources/OSGI-INF/layouts-contrib.xml
services/collectionobject/3rdparty/pom.xml

diff --git a/3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources/META-INF/MANIFEST.MF b/3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..8fa6e55
--- /dev/null
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0 \r
+Bundle-ManifestVersion: 1 \r
+Bundle-Name: org.collectionspace.${ServiceName}.${TenantLabel}\r
+Bundle-SymbolicName: org.collectionspace.${ServiceName}.${TenantLabel};singleton:=true \r
+Bundle-Version: 1.0.0\r
+Bundle-Localization: plugin\r
+Bundle-Vendor: Nuxeo \r
+Require-Bundle: org.nuxeo.runtime, \r
+ org.nuxeo.ecm.core.api,\r
+ org.nuxeo.ecm.core,\r
+ org.nuxeo.ecm.webapp.core,\r
+ org.collectionspace.collectionspace_core,\r
+ org.collectionspace.${ServiceName}\r
+Provide-Package: org.collectionspace.${ServiceName}.${TenantLabel}\r
+Nuxeo-Component: OSGI-INF/core-types-contrib.xml,\r
+ OSGI-INF/life-cycle-contrib.xml,\r
+ OSGI-INF/ecm-types-contrib.xml,\r
+ OSGI-INF/layouts-contrib.xml\r
diff --git a/3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources/OSGI-INF/core-types-contrib.xml b/3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources/OSGI-INF/core-types-contrib.xml
new file mode 100644 (file)
index 0000000..3c8e366
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<component name="org.collectionspace.${ServiceName}.${TenantLabel}.coreTypes">
+       <extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
+               <schema name="${CustomSchemaName}" prefix="${CustomSchemaName}" src="schemas/${CustomSchemaName}.xsd"/>
+       </extension>
+       <extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
+               <doctype name="${NuxeoDocTypeName}${TenantPrefix}${TenantId}" extends="${NuxeoDocTypeName}">
+                       <schema name="common"/>
+                       <schema name="dublincore"/>
+                       <schema name="collectionspace_core"/>
+                       <schema name="${CommonSchemaName}"/>
+                       <schema name="${CustomSchemaName}"/>
+               </doctype>
+       </extension>
+       </component>
diff --git a/3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources/OSGI-INF/ecm-types-contrib.xml b/3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources/OSGI-INF/ecm-types-contrib.xml
new file mode 100644 (file)
index 0000000..aa0ce29
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<component name="org.collectionspace.${ServiceName}.${TenantLabel}.ecm.types">
+  <extension target="org.nuxeo.ecm.platform.types.TypeService" point="types">
+    <type id="${NuxeoDocTypeName}${TenantPrefix}${TenantId}" coretype="${NuxeoDocTypeName}${TenantPrefix}${TenantId}">
+      <label>org.collectionspace.${NuxeoDocTypeName}${TenantPrefix}${TenantId}</label>
+      <!--icon>/icons/file.gif</icon-->
+      <default-view>view_documents</default-view>
+
+      <layouts mode="any">
+        <layout>heading</layout>
+        <layout>collectionspace_core</layout>
+        <layout>${CommonSchemaName}</layout>
+               <layout>${CustomSchemaName}</layout>
+      </layouts>
+    </type>
+
+    <type id="Folder" coretype="Folder">
+      <subtypes>
+        <type>"${NuxeoDocTypeName}${TenantPrefix}${TenantId}"</type>
+      </subtypes>
+    </type>
+    
+    <type id="Workspace" coretype="Workspace">
+      <subtypes>
+        <type>"${NuxeoDocTypeName}${TenantPrefix}${TenantId}"</type>
+      </subtypes>
+    </type>
+  </extension>
+</component>
diff --git a/3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources/OSGI-INF/layouts-contrib.xml b/3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources/OSGI-INF/layouts-contrib.xml
new file mode 100644 (file)
index 0000000..f6bd8a7
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+
+<component name="org.collectionspace.${CustomSchemaName}.layouts.webapp">
+
+  <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
+    point="layouts">
+
+    <layout name="${CustomSchemaName}">
+       <!-- Insert layout settings for the custom schema here. -->
+       <!--
+      <templates>
+        <template mode="any">/layouts/layout_default_template.xhtml</template>
+      </templates>
+      <rows>
+        <row><widget>exampleField</widget></row>
+      </rows>
+
+      <widget name="exampleField" type="text">
+        <labels>
+          <label mode="any">exampleField</label>
+        </labels>
+        <translated>true</translated>
+        <fields>
+          <field schema="${CustomSchemaName}">exampleField</field>
+        </fields>
+        <properties widgetMode="edit">
+          <property name="styleClass">dataInputText</property>
+        </properties>
+      </widget>
+      -->
+    </layout>
+  </extension>
+</component>
diff --git a/3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources/OSGI-INF/life-cycle-contrib.xml b/3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources/OSGI-INF/life-cycle-contrib.xml
new file mode 100644 (file)
index 0000000..a03781b
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<component name="org.collectionspace.${ServiceName}.${TenantLabel}.ecm.platform.LifeCycleManagerExtensions">
+
+  <extension target="org.nuxeo.ecm.core.lifecycle.LifeCycleService" point="types">
+    <types>
+      <type name="${NuxeoDocTypeName}${TenantPrefix}${TenantId}">default</type>
+    </types>
+  </extension>
+
+</component>
index bfbf236d196416a0b37b376f2482c0405101e8f5..b75e115ef6ac6d9704d6df6d103521c9f590e58e 100644 (file)
@@ -69,29 +69,28 @@ nuxeo.main.config.file=${jboss.bin}/nuxeo.conf
 #database - select one or the other (not both!), and then uncomment the\r
 # appropriate section below the common settings\r
 #db=mysql|postgresql\r
-db=postgresql\r
+db=mysql\r
 #For mysql, uncomment this, and comment out postgres section\r
-#db.port=3306\r
-#db.driver.jar=${jboss.lib.cspace}/mysql-connector-java-5.1.7-bin.jar\r
-#db.jdbc.driver.class=com.mysql.jdbc.Driver\r
-#db.dialect=org.hibernate.dialect.MySQLDialect\r
-#db.typemapping=mySQL\r
-#db.exceptionsorter=org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter\r
-#db.spring.acl.classIdentityQuery=SELECT @@IDENTITY\r
-#db.spring.acl.sidIdentityQuery=SELECT @@IDENTITY\r
+db.port=3306\r
+db.driver.jar=${jboss.lib.cspace}/mysql-connector-java-5.1.7-bin.jar\r
+db.jdbc.driver.class=com.mysql.jdbc.Driver\r
+db.dialect=org.hibernate.dialect.MySQLDialect\r
+db.typemapping=mySQL\r
+db.exceptionsorter=org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter\r
+db.spring.acl.classIdentityQuery=SELECT @@IDENTITY\r
+db.spring.acl.sidIdentityQuery=SELECT @@IDENTITY\r
 \r
 #For postgresql, uncomment this, and comment out mysql section\r
-db.port=5432\r
-db.driver.jar=${jboss.lib.cspace}/postgresql-8.4-702.jdbc4.jar\r
-db.jdbc.driver.class=org.postgresql.Driver\r
-db.dialect=org.hibernate.dialect.PostgreSQLDialect\r
-db.typemapping=PostgreSQL 8.0\r
+#db.port=5432\r
+#db.driver.jar=${jboss.lib.cspace}/postgresql-8.4-702.jdbc4.jar\r
+#db.jdbc.driver.class=org.postgresql.Driver\r
+#db.dialect=org.hibernate.dialect.PostgreSQLDialect\r
+#db.typemapping=PostgreSQL 8.0\r
 # Should be org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter\r
 # but current JBoss does not seem to include it...\r
-db.exceptionsorter= \r
-db.spring.acl.classIdentityQuery=select currval(pg_get_serial_sequence('acl_class', 'id'))\r
-db.spring.acl.sidIdentityQuery=select currval(pg_get_serial_sequence('acl_sid', 'id'))\r
-\r
+#db.exceptionsorter= \r
+#db.spring.acl.classIdentityQuery=select currval(pg_get_serial_sequence('acl_class', 'id'))\r
+#db.spring.acl.sidIdentityQuery=select currval(pg_get_serial_sequence('acl_sid', 'id'))\r
 \r
 #database common settings\r
 db.script.dir=${jboss.server.cspace}/cspace/services/db/${db}\r
index fae212afcc4cb7e994130f68e4a626573522a935..cbf226cd8baf93edff28dc016f471eeff549d9b3 100644 (file)
         CollectionObject Nuxeo document type for Tenant ID = "2"
     </description>
 
+       <properties>
+               <CustomSchemaName>collectionobjects_naturalhistory</CustomSchemaName>
+               <TenantId>2</TenantId>
+               <TenantLabel>lifesci</TenantLabel>
+       </properties>
+       
     <build>
+               <resources>
+                 <resource>
+                       <directory>../../../../3rdparty/nuxeo/nuxeo-doctype/src/main/resources</directory>
+                       <filtering>true</filtering>
+                 </resource>
+                 <resource>
+                       <directory>../../../../3rdparty/nuxeo/nuxeo-doctype-custom/src/main/resources</directory>
+                       <filtering>true</filtering>
+                 </resource>
+                 <resource>
+                       <directory>src/main/resources</directory>
+                       <filtering>true</filtering>
+                 </resource>
+               </resources>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
                 <configuration>
                     <archive>
-                        <manifestFile> src/main/resources/META-INF/MANIFEST.MF </manifestFile>
+                        <manifestFile>target/classes/META-INF/MANIFEST.MF</manifestFile>
                         <manifestEntries>
                             <Bundle-Version>${eclipseVersion}</Bundle-Version>
                             <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
index 36c527efb02142ba6e799484032ac09f4b862c8d..c61477036bf3ecb51e620d7239e570e9ab084eff 100644 (file)
     <description>
         CollectionObject Common Nuxeo document type
     </description>
-
-       <properties>
-               <ServiceName>collectionobject</ServiceName>
-               <NuxeoDocTypeName>CollectionObject</NuxeoDocTypeName>
-               <CommonSchemaName>collectionobjects_common</CommonSchemaName>
-       </properties>
     
     <build>
                <resources>
index c53e7d2d2a42d12fc36b6abf6d077a4208bcf55a..752774a609846a59989fadb7b81831d0d7ef4726 100644 (file)
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
-<component name="org.collectionspace.collectionobject.layouts.webapp">
+<component name="org.collectionspace.${ServiceName}.layouts.webapp">
 
   <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
     point="layouts">
 
-    <layout name="collectionobjects_common">
+    <layout name="${CommonSchemaName}">
       <templates>
         <template mode="any">/layouts/layout_default_template.xhtml</template>
       </templates>
@@ -41,7 +41,7 @@
         </labels>
         <translated>true</translated>
         <fields>
-          <field schema="collectionobjects_common">objectNumber</field>
+          <field schema="${CommonSchemaName}">objectNumber</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
@@ -54,7 +54,7 @@
         </labels>
         <translated>true</translated>
         <fields>
-          <field schema="collectionobjects_common">otherNumber</field>
+          <field schema="${CommonSchemaName}">otherNumber</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
@@ -67,7 +67,7 @@
         </labels>
         <translated>true</translated>
         <fields>
-          <field schema="collectionobjects_common">otherNumberType</field>
+          <field schema="${CommonSchemaName}">otherNumberType</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
@@ -80,7 +80,7 @@
         </labels>
         <translated>true</translated>
         <fields>
-          <field schema="collectionobjects_common">briefDescription</field>
+          <field schema="${CommonSchemaName}">briefDescription</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
@@ -93,7 +93,7 @@
         </labels>
         <translated>true</translated>
         <fields>
-          <field schema="collectionobjects_common">comments</field>
+          <field schema="${CommonSchemaName}">comments</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
         </labels>
         <translated>true</translated>
         <fields>
-          <field schema="collectionobjects_common">distinguishingFeatures</field>
+          <field schema="${CommonSchemaName}">distinguishingFeatures</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
         </labels>
         <translated>true</translated>
         <fields>
-          <field schema="collectionobjects_common">objectName</field>
+          <field schema="${CommonSchemaName}">objectName</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
         </labels>
         <translated>true</translated>
         <fields>
-          <field schema="collectionobjects_common">responsibleDepartment</field>
+          <field schema="${CommonSchemaName}">responsibleDepartment</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
         </labels>
         <translated>true</translated>
         <fields>
-          <field schema="collectionobjects_common">title</field>
+          <field schema="${CommonSchemaName}">title</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
index 2fbeedb63d355bdd5454c1bd30b376e09af1208a..edabb6d3093ec6980d4cb43afaa769e201c5f08a 100644 (file)
         3rd party build for collectionobject service\r
     </description>\r
 \r
+       <properties>\r
+               <ServiceName>collectionobject</ServiceName>\r
+               <NuxeoDocTypeName>CollectionObject</NuxeoDocTypeName>   \r
+               <CommonSchemaName>collectionobjects_common</CommonSchemaName>\r
+               <TenantPrefix>Tenant</TenantPrefix>\r
+       </properties>\r
+       \r
     <modules>\r
        <module>nuxeo-platform-collectionobject</module>\r
         <module>nuxeo-platform-collectionobject-lifesci</module>\r