+3rdparty/nuxeo/nuxeo-platform-listener/.project
+3rdparty/nuxeo/nuxeo-platform-listener/.settings/
+services/JaxRsServiceProvider/.settings/.jsdtscope
+*org.eclipse.wst*
dev-master.xml
.metadata/
services/collectionobject/sample/sample/.classpath
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Thu Oct 15 12:20:09 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Thu Oct 15 12:20:09 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Thu Oct 15 12:20:09 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Thu Oct 15 12:20:09 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
</parent>\r
\r
<modelVersion>4.0.0</modelVersion>\r
- <groupId>org.collectionspace.services</groupId>\r
<artifactId>org.collectionspace.services.3rdparty.nuxeo.collectionspace_core</artifactId>\r
<name>Nuxeo CollectionSpace core extension</name>\r
<description> Nuxeo Enterprise Platform: CS extensions </description>\r
<plugin>\r
<groupId>org.apache.maven.plugins</groupId>\r
<artifactId>maven-jar-plugin</artifactId>\r
- <version>2.2</version>\r
<configuration>\r
<archive>\r
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>\r
+++ /dev/null
-#Wed Jan 19 22:49:05 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:06 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
--- /dev/null
+<?xml version="1.0"?>
+<component name="config:lifesci-domain-repository">
+ <extension target="org.nuxeo.ecm.core.repository.RepositoryService"
+ point="repository">
+ <repository name="lifesci-domain"
+ factory="org.nuxeo.ecm.core.storage.sql.ra.PoolingRepositoryFactory">
+ <repository name="lifesci-domain">
+ <clustering enabled="false" delay="1000" />
+ <binaryStore path="" />
+ <!-- The transactional datasource for Nuxeo -->
+ <xa-datasource>@XA_DATASOURCE@</xa-datasource>
+ <property name="URL">jdbc:postgresql://localhost:5432/lifesci-domain</property>
+ <property name="ServerName">@DB_SERVER_HOSTNAME@</property>
+ <property name="DatabaseName">lifesci-domain</property>
+ <property name="User">@NUXEO_USER@</property>
+ <property name="Password">@NUXEO_PW@</property>
+
+ <schema>
+ <field type="largetext">imd:user_comment</field> <!-- Needed for large image metadata (image_metadata) that gets inserted
+ here. -->
+ <field type="largetext">note</field>
+ <field type="largetext">webp:content</field>
+ <field type="largetext">webc:welcomeText</field>
+ <field type="largetext">comment:comment</field>
+ <field type="largetext">post</field>
+ <field type="largetext">mail:mail</field>
+
+ <!-- Text fields that may possibly not require largetext -->
+ <!-- designation and might need further review are marked as follows: -->
+ <!-- * -->
+
+ <!-- =========================================================== -->
+ <!-- Acquisition -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">acquisitionFundingSourceProvisos</field>
+ <field type="largetext">acquisitions_common:acquisitionNote</field>
+ <field type="largetext">acquisitions_common:acquisitionProvisos</field>
+ <field type="largetext">acquisitions_common:acquisitionReason</field>
+ <field type="largetext">acquisitions_common:creditLine</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Blob -->
+ <!-- =========================================================== -->
+
+ <!-- No largetext fields identified to date -->
+
+
+ <!-- =========================================================== -->
+ <!-- CollectionObject / Cataloging -->
+ <!-- =========================================================== -->
+
+ <!-- Object Identification Information -->
+ <!-- ================================= -->
+
+ <!-- FIXME: Change this to otherNumberValue if and when the field name
+ itself is so changed. -->
+ <field type="largetext">numberValue</field> <!-- * -->
+
+ <!-- FIXME: multivalued field - need to verify schema and field name -->
+ <field type="largetext">collectionobjects_common:briefDescriptions
+ </field>
+
+ <!-- FIXME: multivalued field - need to verify schema and field name -->
+ <field type="largetext">collectionobjects_common:comments</field>
+
+ <field type="largetext">collectionobjects_common:distinguishingFeatures
+ </field>
+
+ <field type="largetext">objectNameNote</field>
+
+ <field type="largetext">title</field>
+ <field type="largetext">titleTranslation</field>
+
+ <!-- Object Description Information -->
+ <!-- ============================== -->
+
+ <field type="largetext">collectionobjects_common:ageQualifier</field>
+ <field type="largetext">collectionobjects_common:color</field>
+ <field type="largetext">collectionobjects_common:contentDescription
+ </field>
+ <field type="largetext">collectionobjects_common:contentNote</field>
+ <field type="largetext">collectionobjects_common:contentObject</field>
+ <field type="largetext">collectionobjects_common:copyNumber</field> <!-- * -->
+ <field type="largetext">collectionobjects_common:editionNumber</field> <!-- * -->
+
+ <!-- FIXME: Will become group repeatable in a post-1.3 release -->
+ <!-- Remove the schema name(s) from the value(s) below when this occurs. -->
+ <field type="largetext">collectionobjects_common:inscriptionContent
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentInterpretation
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentTranslation
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentTransliteration
+ </field>
+
+ <!-- FIXME: Will become group repeatable in a post-1.3 release -->
+ <!-- Remove the schema name(s) from the value(s) below when this occurs. -->
+ <field type="largetext">collectionobjects_common:inscriptionDescriptionInterpretation
+ </field>
+
+ <field type="largetext">materialComponentNote</field>
+ <field type="largetext">materialName</field> <!-- * -->
+
+ <!-- FIXME: multivalued field - need to verify schema and field name -->
+ <field type="largetext">collectionobjects_common:physicalDescription
+ </field>
+
+ <field type="largetext">objectComponentInformation</field>
+
+ <!-- Object Production Information -->
+ <!-- ============================= -->
+
+ <field type="largetext">collectionobjects_common:objectProductionNote
+ </field>
+
+ <!-- FIXME: multivalued field - need to verify schema and field name -->
+ <field type="largetext">collectionobjects_common:objectProductionReason
+ </field>
+
+ <!-- Object History and Association Information -->
+ <!-- ========================================== -->
+
+ <field type="largetext">assocActivityNote</field>
+ <field type="largetext">assocConceptNote</field>
+ <field type="largetext">assocCulturalContextNote</field>
+ <field type="largetext">assocDateNote</field>
+
+ <!-- FIXME: Will become group repeatable in a post-1.3 release. -->
+ <!-- Remove the schema name(s) from the value(s) below when this occurs. -->
+ <field type="largetext">collectionobjects_common:assocEventName</field> <!-- * -->
+ <field type="largetext">collectionobjects_common:assocEventNote</field>
+ <field type="largetext">collectionobjects_common:assocEventType</field> <!-- * -->
+
+ <field type="largetext">assocObject</field>
+ <field type="largetext">assocOrganizationNote</field>
+ <field type="largetext">assocPeopleNote</field>
+ <field type="largetext">assocPersonNote</field>
+ <field type="largetext">assocPlaceNote</field>
+
+ <field type="largetext">collectionobjects_common:objectHistoryNote
+ </field>
+ <field type="largetext">collectionobjects_common:ownershipExchangeNote
+ </field>
+ <field type="largetext">usageNote</field>
+
+ <!-- Object Owner's Contribution Information -->
+ <!-- ======================================= -->
+
+ <field type="largetext">collectionobjects_common:ownersPersonalExperience
+ </field>
+ <field type="largetext">collectionobjects_common:ownersPersonalResponse
+ </field>
+
+ <!-- FIXME: multivalued field - need to verify schema and field name -->
+ <field type="largetext">collectionobjects_common:ownersReference</field>
+
+ <field type="largetext">collectionobjects_common:ownersContributionNote
+ </field>
+
+ <!-- Object Viewer's Contribution Information -->
+ <!-- ======================================== -->
+
+ <field type="largetext">collectionobjects_common:viewersRole</field>
+ <field type="largetext">collectionobjects_common:viewersPersonalExperience
+ </field>
+ <field type="largetext">collectionobjects_common:viewersPersonalResponse
+ </field>
+
+ <!-- FIXME: multivalued field - need to verify schema and field name -->
+ <field type="largetext">collectionobjects_common:viewersReference</field>
+
+ <field type="largetext">collectionobjects_common:viewersContributionNote
+ </field>
+
+ <!-- Reference Information -->
+ <!-- ===================== -->
+
+ <field type="largetext">collectionobjects_common:catalogNumber</field> <!-- * -->
+
+ <!-- Object Collection Information -->
+ <!-- ============================= -->
+
+ <field type="largetext">collectionobjects_common:fieldCollectionNote
+ </field>
+ <field type="largetext">collectionobjects_common:fieldCollectionNumber
+ </field> <!-- * -->
+
+ <!-- Additional non-text fields configured as 'largetext' to avoid the
+ following error when Nuxeo is configured to use MySQL: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException.
+ message: Row size too large. The maximum row size for the used table type,
+ not counting BLOBs, is 65535. Some of the fields below may be repeatable
+ or in repeatable groups, and the schema and field names below might thus
+ require verification to match actual values. -->
+
+ <field type="largetext">collectionobjects_common:objectNumber</field>
+ <field type="largetext">collectionobjects_common:numberOfObjects</field>
+ <field type="largetext">collectionobjects_common:collection</field>
+ <field type="largetext">collectionobjects_common:recordStatus</field>
+ <field type="largetext">collectionobjects_common:age</field>
+ <field type="largetext">collectionobjects_common:ageQualifier</field>
+ <field type="largetext">collectionobjects_common:ageUnit</field>
+
+ <field type="largetext">collectionobjects_common:contentDate</field>
+ <field type="largetext">collectionobjects_common:contentLanguages</field>
+ <field type="largetext">collectionobjects_common:contentOrganizations
+ </field>
+
+ <field type="largetext">collectionobjects_common:dimensionSummary</field>
+
+ <!-- FIXME: The set of dimensions-related fields below may be removed -->
+ <!-- altogether when it is confirmed that the App/UI layers are using -->
+ <!-- a repeatable dimensions group. -->
+ <field type="largetext">collectionobjects_common:dimension</field>
+ <field type="largetext">collectionobjects_common:dimensionMeasuredPart
+ </field>
+ <field type="largetext">collectionobjects_common:dimensionMeasurementUnit
+ </field>
+ <field type="largetext">collectionobjects_common:dimensionValue</field>
+ <field type="largetext">collectionobjects_common:dimensionValueDate
+ </field>
+ <field type="largetext">collectionobjects_common:dimensionValueQualifier
+ </field>
+
+ <field type="largetext">collectionobjects_common:editionNumber</field>
+
+ <field type="largetext">collectionobjects_common:inscriptionContentInscriber
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentDate
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentLanguage
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentMethod
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentPosition
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentScript
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentType
+ </field>
+
+ <field type="largetext">collectionobjects_common:inscriptionDescription
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionDescriptionInscriber
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionDescriptionDate
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionDescriptionMethod
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionDescriptionPosition
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionDescriptionType
+ </field>
+
+ <field type="largetext">collectionobjects_common:objectStatus</field>
+ <field type="largetext">collectionobjects_common:phase</field>
+ <field type="largetext">collectionobjects_common:sex</field>
+ <field type="largetext">collectionobjects_common:ownershipAccess</field>
+ <field type="largetext">collectionobjects_common:ownershipCategory
+ </field>
+ <field type="largetext">collectionobjects_common:ownershipDates</field>
+ <field type="largetext">collectionobjects_common:ownershipExchangeMethod
+ </field>
+ <field type="largetext">collectionobjects_common:ownershipExchangePriceCurrency
+ </field>
+ <field type="largetext">collectionobjects_common:ownershipExchangePriceValue
+ </field>
+ <field type="largetext">collectionobjects_common:ownershipPlace</field>
+ <field type="largetext">collectionobjects_common:fieldCollectionNumber
+ </field>
+ <field type="largetext">collectionobjects_common:fieldCollectionMethod
+ </field>
+ <field type="largetext">collectionobjects_common:fieldCollectionPlace
+ </field>
+ <field type="largetext">collectionobjects_common:fieldCollectionDate
+ </field>
+
+ <!-- FIXME: This sample set of date field can be removed when Cataloging -->
+ <!-- records are using structured date fields, or earlier when it is
+ confirmed that -->
+ <!-- the App/UI layers are not using this vestigial part of the Cataloging
+ schema. -->
+ <field type="largetext">collectionobjects_common:dateAssociation</field>
+ <field type="largetext">collectionobjects_common:dateEarliestSingle
+ </field>
+ <field type="largetext">collectionobjects_common:dateEarliestSingleCertainty
+ </field>
+ <field type="largetext">collectionobjects_common:dateEarliestSingleQualifier
+ </field>
+ <field type="largetext">collectionobjects_common:dateLatest</field>
+ <field type="largetext">collectionobjects_common:dateLatestCertainty
+ </field>
+ <field type="largetext">collectionobjects_common:dateLatestQualifier
+ </field>
+ <field type="largetext">collectionobjects_common:datePeriod</field>
+ <field type="largetext">collectionobjects_common:dateText</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Contact -->
+ <!-- =========================================================== -->
+ <field type="largetext">contacts_common:addressPlace</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Group -->
+ <!-- =========================================================== -->
+ <field type="largetext">groups_common:scopeNote</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Intake -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">intakes_common:entryNote</field>
+ <field type="largetext">intakes_common:packingNote</field>
+ <field type="largetext">intakes_common:fieldCollectionNote</field>
+ <field type="largetext">intakes_common:insuranceNote</field>
+ <field type="largetext">intakes_common:conditionCheckNote</field>
+ <field type="largetext">currentLocationNote</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Loan In -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">loansin_common:loanInConditions</field>
+ <field type="largetext">loansin_common:loanInNote</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Loan Out -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">loansout_common:specialConditionsOfLoan</field>
+ <field type="largetext">loansout_common:loanOutNote</field>
+ <field type="largetext">loansout_common:loanPurpose</field>
+ <field type="largetext">loanedObjectStatusNote</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Movement / Location and Movement Control -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">movements_common:currentLocationNote</field>
+ <field type="largetext">movements_common:movementNote</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Media / Media Handling -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">media_common:copyrightStatement</field>
+ <field type="largetext">media_common:description</field>
+ <field type="largetext">media_common:title</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Note -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">notes_common:content</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Object Exit -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">objectexit_common:exitNote</field>
+ <field type="largetext">objectexit_common:packingNote</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Organization -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">shortName</field>
+ <field type="largetext">longName</field>
+ <field type="largetext">nameAdditions</field>
+ <field type="largetext">historyNote</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Person -->
+ <!-- =========================================================== -->
+ <field type="largetext">persons_common:bioNote</field>
+ <field type="largetext">persons_common:nameNote</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Relation -->
+ <!-- =========================================================== -->
+
+ <!-- No largetext fields identified to date -->
+
+
+ <!-- =========================================================== -->
+ <!-- Storage Location / Location -->
+ <!-- =========================================================== -->
+ <field type="largetext">locations_common:name</field>
+ <!-- conditionNote will be made part of a repeatable group of fields
+ in a future release -->
+ <field type="largetext">locations_common:conditionNote</field>
+ <field type="largetext">locations_common:securityNote</field>
+ <field type="largetext">locations_common:accessNote</field>
+
+ </schema>
+ </repository>
+ </repository>
+ </extension>
+
+ <extension target="org.nuxeo.ecm.core.api.repository.RepositoryManager"
+ point="repositories">
+ <documentation>The lifesci-domain repository</documentation>
+ <repository name="lifesci-domain" label="Default Repository" />
+ </extension>
+</component>
--- /dev/null
+<?xml version="1.0"?>
+<component name="config:lifesci-domain-repository">
+ <extension target="org.nuxeo.ecm.core.repository.RepositoryService"
+ point="repository">
+ <repository name="lifesci-domain"
+ factory="org.nuxeo.ecm.core.storage.sql.ra.PoolingRepositoryFactory">
+ <repository name="lifesci-domain">
+ <clustering enabled="false" delay="1000" />
+ <binaryStore path="" />
+ <!-- The transactional datasource for Nuxeo -->
+ <xa-datasource>org.postgresql.xa.PGXADataSource</xa-datasource>
+ <property name="URL">jdbc:postgresql://localhost:5432/lifesci-domain</property>
+ <property name="ServerName">localhost</property>
+ <property name="DatabaseName">lifesci-domain</property>
+ <property name="User">nuxeo</property>
+ <property name="Password">nuxpw</property>
+
+ <schema>
+ <field type="largetext">imd:user_comment</field> <!-- Needed for large image metadata (image_metadata) that gets inserted
+ here. -->
+ <field type="largetext">note</field>
+ <field type="largetext">webp:content</field>
+ <field type="largetext">webc:welcomeText</field>
+ <field type="largetext">comment:comment</field>
+ <field type="largetext">post</field>
+ <field type="largetext">mail:mail</field>
+
+ <!-- Text fields that may possibly not require largetext -->
+ <!-- designation and might need further review are marked as follows: -->
+ <!-- * -->
+
+ <!-- =========================================================== -->
+ <!-- Acquisition -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">acquisitionFundingSourceProvisos</field>
+ <field type="largetext">acquisitions_common:acquisitionNote</field>
+ <field type="largetext">acquisitions_common:acquisitionProvisos</field>
+ <field type="largetext">acquisitions_common:acquisitionReason</field>
+ <field type="largetext">acquisitions_common:creditLine</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Blob -->
+ <!-- =========================================================== -->
+
+ <!-- No largetext fields identified to date -->
+
+
+ <!-- =========================================================== -->
+ <!-- CollectionObject / Cataloging -->
+ <!-- =========================================================== -->
+
+ <!-- Object Identification Information -->
+ <!-- ================================= -->
+
+ <!-- FIXME: Change this to otherNumberValue if and when the field name
+ itself is so changed. -->
+ <field type="largetext">numberValue</field> <!-- * -->
+
+ <!-- FIXME: multivalued field - need to verify schema and field name -->
+ <field type="largetext">collectionobjects_common:briefDescriptions
+ </field>
+
+ <!-- FIXME: multivalued field - need to verify schema and field name -->
+ <field type="largetext">collectionobjects_common:comments</field>
+
+ <field type="largetext">collectionobjects_common:distinguishingFeatures
+ </field>
+
+ <field type="largetext">objectNameNote</field>
+
+ <field type="largetext">title</field>
+ <field type="largetext">titleTranslation</field>
+
+ <!-- Object Description Information -->
+ <!-- ============================== -->
+
+ <field type="largetext">collectionobjects_common:ageQualifier</field>
+ <field type="largetext">collectionobjects_common:color</field>
+ <field type="largetext">collectionobjects_common:contentDescription
+ </field>
+ <field type="largetext">collectionobjects_common:contentNote</field>
+ <field type="largetext">collectionobjects_common:contentObject</field>
+ <field type="largetext">collectionobjects_common:copyNumber</field> <!-- * -->
+ <field type="largetext">collectionobjects_common:editionNumber</field> <!-- * -->
+
+ <!-- FIXME: Will become group repeatable in a post-1.3 release -->
+ <!-- Remove the schema name(s) from the value(s) below when this occurs. -->
+ <field type="largetext">collectionobjects_common:inscriptionContent
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentInterpretation
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentTranslation
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentTransliteration
+ </field>
+
+ <!-- FIXME: Will become group repeatable in a post-1.3 release -->
+ <!-- Remove the schema name(s) from the value(s) below when this occurs. -->
+ <field type="largetext">collectionobjects_common:inscriptionDescriptionInterpretation
+ </field>
+
+ <field type="largetext">materialComponentNote</field>
+ <field type="largetext">materialName</field> <!-- * -->
+
+ <!-- FIXME: multivalued field - need to verify schema and field name -->
+ <field type="largetext">collectionobjects_common:physicalDescription
+ </field>
+
+ <field type="largetext">objectComponentInformation</field>
+
+ <!-- Object Production Information -->
+ <!-- ============================= -->
+
+ <field type="largetext">collectionobjects_common:objectProductionNote
+ </field>
+
+ <!-- FIXME: multivalued field - need to verify schema and field name -->
+ <field type="largetext">collectionobjects_common:objectProductionReason
+ </field>
+
+ <!-- Object History and Association Information -->
+ <!-- ========================================== -->
+
+ <field type="largetext">assocActivityNote</field>
+ <field type="largetext">assocConceptNote</field>
+ <field type="largetext">assocCulturalContextNote</field>
+ <field type="largetext">assocDateNote</field>
+
+ <!-- FIXME: Will become group repeatable in a post-1.3 release. -->
+ <!-- Remove the schema name(s) from the value(s) below when this occurs. -->
+ <field type="largetext">collectionobjects_common:assocEventName</field> <!-- * -->
+ <field type="largetext">collectionobjects_common:assocEventNote</field>
+ <field type="largetext">collectionobjects_common:assocEventType</field> <!-- * -->
+
+ <field type="largetext">assocObject</field>
+ <field type="largetext">assocOrganizationNote</field>
+ <field type="largetext">assocPeopleNote</field>
+ <field type="largetext">assocPersonNote</field>
+ <field type="largetext">assocPlaceNote</field>
+
+ <field type="largetext">collectionobjects_common:objectHistoryNote
+ </field>
+ <field type="largetext">collectionobjects_common:ownershipExchangeNote
+ </field>
+ <field type="largetext">usageNote</field>
+
+ <!-- Object Owner's Contribution Information -->
+ <!-- ======================================= -->
+
+ <field type="largetext">collectionobjects_common:ownersPersonalExperience
+ </field>
+ <field type="largetext">collectionobjects_common:ownersPersonalResponse
+ </field>
+
+ <!-- FIXME: multivalued field - need to verify schema and field name -->
+ <field type="largetext">collectionobjects_common:ownersReference</field>
+
+ <field type="largetext">collectionobjects_common:ownersContributionNote
+ </field>
+
+ <!-- Object Viewer's Contribution Information -->
+ <!-- ======================================== -->
+
+ <field type="largetext">collectionobjects_common:viewersRole</field>
+ <field type="largetext">collectionobjects_common:viewersPersonalExperience
+ </field>
+ <field type="largetext">collectionobjects_common:viewersPersonalResponse
+ </field>
+
+ <!-- FIXME: multivalued field - need to verify schema and field name -->
+ <field type="largetext">collectionobjects_common:viewersReference</field>
+
+ <field type="largetext">collectionobjects_common:viewersContributionNote
+ </field>
+
+ <!-- Reference Information -->
+ <!-- ===================== -->
+
+ <field type="largetext">collectionobjects_common:catalogNumber</field> <!-- * -->
+
+ <!-- Object Collection Information -->
+ <!-- ============================= -->
+
+ <field type="largetext">collectionobjects_common:fieldCollectionNote
+ </field>
+ <field type="largetext">collectionobjects_common:fieldCollectionNumber
+ </field> <!-- * -->
+
+ <!-- Additional non-text fields configured as 'largetext' to avoid the
+ following error when Nuxeo is configured to use MySQL: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException.
+ message: Row size too large. The maximum row size for the used table type,
+ not counting BLOBs, is 65535. Some of the fields below may be repeatable
+ or in repeatable groups, and the schema and field names below might thus
+ require verification to match actual values. -->
+
+ <field type="largetext">collectionobjects_common:objectNumber</field>
+ <field type="largetext">collectionobjects_common:numberOfObjects</field>
+ <field type="largetext">collectionobjects_common:collection</field>
+ <field type="largetext">collectionobjects_common:recordStatus</field>
+ <field type="largetext">collectionobjects_common:age</field>
+ <field type="largetext">collectionobjects_common:ageQualifier</field>
+ <field type="largetext">collectionobjects_common:ageUnit</field>
+
+ <field type="largetext">collectionobjects_common:contentDate</field>
+ <field type="largetext">collectionobjects_common:contentLanguages</field>
+ <field type="largetext">collectionobjects_common:contentOrganizations
+ </field>
+
+ <field type="largetext">collectionobjects_common:dimensionSummary</field>
+
+ <!-- FIXME: The set of dimensions-related fields below may be removed -->
+ <!-- altogether when it is confirmed that the App/UI layers are using -->
+ <!-- a repeatable dimensions group. -->
+ <field type="largetext">collectionobjects_common:dimension</field>
+ <field type="largetext">collectionobjects_common:dimensionMeasuredPart
+ </field>
+ <field type="largetext">collectionobjects_common:dimensionMeasurementUnit
+ </field>
+ <field type="largetext">collectionobjects_common:dimensionValue</field>
+ <field type="largetext">collectionobjects_common:dimensionValueDate
+ </field>
+ <field type="largetext">collectionobjects_common:dimensionValueQualifier
+ </field>
+
+ <field type="largetext">collectionobjects_common:editionNumber</field>
+
+ <field type="largetext">collectionobjects_common:inscriptionContentInscriber
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentDate
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentLanguage
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentMethod
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentPosition
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentScript
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionContentType
+ </field>
+
+ <field type="largetext">collectionobjects_common:inscriptionDescription
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionDescriptionInscriber
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionDescriptionDate
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionDescriptionMethod
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionDescriptionPosition
+ </field>
+ <field type="largetext">collectionobjects_common:inscriptionDescriptionType
+ </field>
+
+ <field type="largetext">collectionobjects_common:objectStatus</field>
+ <field type="largetext">collectionobjects_common:phase</field>
+ <field type="largetext">collectionobjects_common:sex</field>
+ <field type="largetext">collectionobjects_common:ownershipAccess</field>
+ <field type="largetext">collectionobjects_common:ownershipCategory
+ </field>
+ <field type="largetext">collectionobjects_common:ownershipDates</field>
+ <field type="largetext">collectionobjects_common:ownershipExchangeMethod
+ </field>
+ <field type="largetext">collectionobjects_common:ownershipExchangePriceCurrency
+ </field>
+ <field type="largetext">collectionobjects_common:ownershipExchangePriceValue
+ </field>
+ <field type="largetext">collectionobjects_common:ownershipPlace</field>
+ <field type="largetext">collectionobjects_common:fieldCollectionNumber
+ </field>
+ <field type="largetext">collectionobjects_common:fieldCollectionMethod
+ </field>
+ <field type="largetext">collectionobjects_common:fieldCollectionPlace
+ </field>
+ <field type="largetext">collectionobjects_common:fieldCollectionDate
+ </field>
+
+ <!-- FIXME: This sample set of date field can be removed when Cataloging -->
+ <!-- records are using structured date fields, or earlier when it is
+ confirmed that -->
+ <!-- the App/UI layers are not using this vestigial part of the Cataloging
+ schema. -->
+ <field type="largetext">collectionobjects_common:dateAssociation</field>
+ <field type="largetext">collectionobjects_common:dateEarliestSingle
+ </field>
+ <field type="largetext">collectionobjects_common:dateEarliestSingleCertainty
+ </field>
+ <field type="largetext">collectionobjects_common:dateEarliestSingleQualifier
+ </field>
+ <field type="largetext">collectionobjects_common:dateLatest</field>
+ <field type="largetext">collectionobjects_common:dateLatestCertainty
+ </field>
+ <field type="largetext">collectionobjects_common:dateLatestQualifier
+ </field>
+ <field type="largetext">collectionobjects_common:datePeriod</field>
+ <field type="largetext">collectionobjects_common:dateText</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Contact -->
+ <!-- =========================================================== -->
+ <field type="largetext">contacts_common:addressPlace</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Group -->
+ <!-- =========================================================== -->
+ <field type="largetext">groups_common:scopeNote</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Intake -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">intakes_common:entryNote</field>
+ <field type="largetext">intakes_common:packingNote</field>
+ <field type="largetext">intakes_common:fieldCollectionNote</field>
+ <field type="largetext">intakes_common:insuranceNote</field>
+ <field type="largetext">intakes_common:conditionCheckNote</field>
+ <field type="largetext">currentLocationNote</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Loan In -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">loansin_common:loanInConditions</field>
+ <field type="largetext">loansin_common:loanInNote</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Loan Out -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">loansout_common:specialConditionsOfLoan</field>
+ <field type="largetext">loansout_common:loanOutNote</field>
+ <field type="largetext">loansout_common:loanPurpose</field>
+ <field type="largetext">loanedObjectStatusNote</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Movement / Location and Movement Control -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">movements_common:currentLocationNote</field>
+ <field type="largetext">movements_common:movementNote</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Media / Media Handling -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">media_common:copyrightStatement</field>
+ <field type="largetext">media_common:description</field>
+ <field type="largetext">media_common:title</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Note -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">notes_common:content</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Object Exit -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">objectexit_common:exitNote</field>
+ <field type="largetext">objectexit_common:packingNote</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Organization -->
+ <!-- =========================================================== -->
+
+ <field type="largetext">shortName</field>
+ <field type="largetext">longName</field>
+ <field type="largetext">nameAdditions</field>
+ <field type="largetext">historyNote</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Person -->
+ <!-- =========================================================== -->
+ <field type="largetext">persons_common:bioNote</field>
+ <field type="largetext">persons_common:nameNote</field>
+
+
+ <!-- =========================================================== -->
+ <!-- Relation -->
+ <!-- =========================================================== -->
+
+ <!-- No largetext fields identified to date -->
+
+
+ <!-- =========================================================== -->
+ <!-- Storage Location / Location -->
+ <!-- =========================================================== -->
+ <field type="largetext">locations_common:name</field>
+ <!-- conditionNote will be made part of a repeatable group of fields
+ in a future release -->
+ <field type="largetext">locations_common:conditionNote</field>
+ <field type="largetext">locations_common:securityNote</field>
+ <field type="largetext">locations_common:accessNote</field>
+
+ </schema>
+ </repository>
+ </repository>
+ </extension>
+
+ <extension target="org.nuxeo.ecm.core.api.repository.RepositoryManager"
+ point="repositories">
+ <documentation>The lifesci-domain repository</documentation>
+ <repository name="lifesci-domain" label="Default Repository" />
+ </extension>
+</component>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.collectionspace.services</groupId>
<artifactId>org.collectionspace.services.3rdparty</artifactId>
<name>services.3rdparty</name>
<packaging>pom</packaging>
<pluginExecutions>\r
<pluginExecution>\r
<pluginExecutionFilter>\r
- <groupId>\r
- org.jvnet.hyperjaxb3\r
- </groupId>\r
- <artifactId>\r
- maven-hyperjaxb3-plugin\r
- </artifactId>\r
- <versionRange>\r
- [0.5.6,)\r
- </versionRange>\r
+ <groupId>org.jvnet.hyperjaxb3</groupId>\r
+ <artifactId>maven-hyperjaxb3-plugin</artifactId>\r
+ <versionRange>[0.5.6,)</versionRange>\r
<goals>\r
<goal>generate</goal>\r
</goals>\r
</pluginExecutionFilter>\r
<action>\r
- <ignore></ignore>\r
+ <execute></execute>\r
</action>\r
</pluginExecution>\r
<pluginExecution>\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:22 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:31 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
# CollectionSpace loggers and default levels - all loggers using the rootLogger if not otherwise specified\r
#\r
log4j.logger.org.collectionspace=DEBUG\r
+log4j.logger.org.collectionspace.services.common.storage.JDBCTools=TRACE\r
#log4j.logger.org.collectionspace.services.common.vocabulary.nuxeo=TRACE\r
\r
#\r
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License. -->
-<Context antiResourceLocking="false" privileged="true"
- path="/cspace-services" docBase="cspace-services">
+<Context antiResourceLocking="false" privileged="true" path="/cspace-services"
+ docBase="cspace-services">
- <!--
+ <!--
Setup the security realm for the CollectionSpace services
-->
- <Realm className="org.apache.catalina.realm.JAASRealm"
- appName="CSpaceJBossDBLoginModule"
- userClassNames="org.collectionspace.authentication.CSpacePrincipal"
- roleClassNames="org.collectionspace.authentication.CSpacePrincipal"/>
-
- <!-- Disable HTTP Session persistence between restart since webengine session objects
- are not serializable -->
- <Manager pathname="" />
+ <Realm className="org.apache.catalina.realm.JAASRealm" appName="CSpaceJBossDBLoginModule"
+ userClassNames="org.collectionspace.authentication.CSpacePrincipal"
+ roleClassNames="org.collectionspace.authentication.CSpacePrincipal"/>
- <!-- define custom loader that is responsible to start nuxeo runtime (it extends the default one) -->
+ <!-- Disable HTTP Session persistence between restart since webengine session objects are not serializable -->
+ <Manager pathname=""/>
- <!-- Disabled since these are specific to the default Nuxeo DM webapp
+ <!-- define custom loader that is responsible to start nuxeo runtime (it extends the default one) -->
+
+ <!-- Disabled since these are specific to the default Nuxeo DM webapp
<Loader className="org.nuxeo.runtime.tomcat.NuxeoWebappLoader"
loaderClass="org.nuxeo.runtime.tomcat.NuxeoWebappClassLoader" />
-
+
<Listener className="org.nuxeo.runtime.tomcat.NuxeoLauncher" home="${catalina.base}/nxserver" />
-->
- <!-- Define Nuxeo's JDBC datasources: the JNDI names will be: java:comp/env/jdbc/DATABASE_NAME.
+ <!-- Define Nuxeo's JDBC datasources: the JNDI names will be: java:comp/env/jdbc/DATABASE_NAME.
For example java:comp/env/jdbc/nxsqldirectory This means you need to update corresponding
JNDI bindings in nuxeo data source definitions in the config directory -->
- <ResourceLink name="jdbc/nxsqldirectory" global="jdbc/nuxeo" type="javax.sql.DataSource" />
- <ResourceLink name="jdbc/nxrelations-default-jena" global="jdbc/nuxeo" type="javax.sql.DataSource" />
- <ResourceLink name="jdbc/comment-relations" global="jdbc/nuxeo" type="javax.sql.DataSource" />
- <ResourceLink name="jdbc/nxaudit-logs" global="jdbc/nuxeo" type="javax.sql.DataSource" />
- <ResourceLink name="jdbc/nxjbpm" global="jdbc/nuxeo" type="javax.sql.DataSource" />
- <ResourceLink name="jdbc/placeful_service_ds" global="jdbc/nuxeo" type="javax.sql.DataSource" />
- <ResourceLink name="jdbc/nxwebwidgets" global="jdbc/nuxeo" type="javax.sql.DataSource" />
- <ResourceLink name="jdbc/nxuidsequencer" global="jdbc/nuxeo" type="javax.sql.DataSource" />
+ <ResourceLink name="jdbc/nxsqldirectory" global="jdbc/nuxeo" type="javax.sql.DataSource"/>
+ <ResourceLink name="jdbc/nxrelations-default-jena" global="jdbc/nuxeo" type="javax.sql.DataSource"/>
+ <ResourceLink name="jdbc/comment-relations" global="jdbc/nuxeo" type="javax.sql.DataSource"/>
+ <ResourceLink name="jdbc/nxaudit-logs" global="jdbc/nuxeo" type="javax.sql.DataSource"/>
+ <ResourceLink name="jdbc/nxjbpm" global="jdbc/nuxeo" type="javax.sql.DataSource"/>
+ <ResourceLink name="jdbc/placeful_service_ds" global="jdbc/nuxeo" type="javax.sql.DataSource"/>
+ <ResourceLink name="jdbc/nxwebwidgets" global="jdbc/nuxeo" type="javax.sql.DataSource"/>
+ <ResourceLink name="jdbc/nxuidsequencer" global="jdbc/nuxeo" type="javax.sql.DataSource"/>
- <Resource name="TransactionManager" auth="Container"
- type="javax.transaction.TransactionManager" factory="org.nuxeo.runtime.jtajca.NuxeoTransactionManagerFactory"
- transactionTimeoutSeconds="300" />
- <Transaction factory="org.nuxeo.runtime.jtajca.NuxeoUserTransactionFactory" />
- <Resource name="NuxeoConnectionManager" auth="Container"
- type="javax.resource.spi.ConnectionManager" factory="org.nuxeo.runtime.jtajca.NuxeoConnectionManagerFactory"
- minPoolSize="0" maxPoolSize="20"
- idleTimeoutMinutes="0" />
+ <Resource name="TransactionManager" auth="Container" type="javax.transaction.TransactionManager"
+ factory="org.nuxeo.runtime.jtajca.NuxeoTransactionManagerFactory"
+ transactionTimeoutSeconds="300"/>
+ <Transaction factory="org.nuxeo.runtime.jtajca.NuxeoUserTransactionFactory"/>
+ <Resource name="NuxeoConnectionManager" auth="Container"
+ type="javax.resource.spi.ConnectionManager"
+ factory="org.nuxeo.runtime.jtajca.NuxeoConnectionManagerFactory" minPoolSize="0"
+ maxPoolSize="20" idleTimeoutMinutes="0"/>
- <Resource auth="Container" name="Mail" type="javax.mail.Session"
- mail.store.protocol="pop3"
- mail.pop3.host="pop3.nosuchhost.nosuchdomain.com"
- mail.pop3.user="nobody"
- mail.transport.protocol="smtp"
- mail.smtp.host="localhost" mail.smtp.port="25"
- mail.smtp.starttls.enable="false"
- mail.smtp.auth="false"
- mail.smtp.user="anonymous"
- password="password" mail.from="noreply@nuxeo.com"
- mail.debug="false" />
+ <Resource auth="Container" name="Mail" type="javax.mail.Session" mail.store.protocol="pop3"
+ mail.pop3.host="pop3.nosuchhost.nosuchdomain.com" mail.pop3.user="nobody"
+ mail.transport.protocol="smtp" mail.smtp.host="localhost" mail.smtp.port="25"
+ mail.smtp.starttls.enable="false" mail.smtp.auth="false" mail.smtp.user="anonymous"
+ password="password" mail.from="noreply@nuxeo.com" mail.debug="false"/>
- <!--
+ <!--
For CollectionSpace services
-->
- <Resource name="jdbc/CspaceDS"
- auth="Container"
- type="javax.sql.DataSource"
- username="${db.user}"
- password="${db.user.password}"
- driverClassName="${db.jdbc.driver.class}"
- url="jdbc:${db}://${db.host}:${db.port}/cspace"
- maxActive="8"
- maxIdle="4"/>
-
- <Resource name="jdbc/NuxeoDS"
- auth="Container"
- type="javax.sql.DataSource"
- username="${db.user}"
- password="${db.user.password}"
- driverClassName="${db.jdbc.driver.class}"
- url="jdbc:${db}://${db.host}:${db.port}/nuxeo"
- maxActive="8"
- maxIdle="4"/>
+ <Resource name="jdbc/CspaceDS" auth="Container" type="javax.sql.DataSource"
+ username="${db.user}" password="${db.user.password}"
+ driverClassName="${db.jdbc.driver.class}"
+ url="jdbc:${db}://${db.host}:${db.port}/cspace"
+ maxActive="8" maxIdle="4"/>
+ <Resource name="jdbc/NuxeoDS" auth="Container" type="javax.sql.DataSource"
+ username="${db.user}" password="${db.user.password}"
+ driverClassName="${db.jdbc.driver.class}"
+ url="jdbc:${db}://${db.host}:${db.port}/${DatabaseName}"
+ maxActive="8" maxIdle="4"/>
</Context>
+++ /dev/null
-#Fri Sep 11 17:00:31 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<name>org.collectionspace.services.account</name>\r
<comment></comment>\r
<projects>\r
- <project>org.collectionspace.services.account.jaxb</project>\r
- <project>org.collectionspace.services.common</project>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Wed Dec 02 09:40:39 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Dec 02 09:40:39 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:28 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Dec 28 10:22:03 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Dec 02 09:40:39 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:28 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:28 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:29 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:29 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:36 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:28 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<name>org.collectionspace.services.authentication</name>\r
<comment></comment>\r
<projects>\r
- <project>org.collectionspace.services.authentication.jaxb</project>\r
- <project>org.collectionspace.services.common</project>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:23 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Jan 04 16:40:34 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:16 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Dec 28 10:22:03 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Jan 04 16:40:34 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Mon Apr 05 14:31:16 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Apr 05 14:31:17 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri May 21 15:18:26 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Apr 05 14:31:17 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Mon Apr 05 14:31:16 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:18 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Apr 05 14:31:16 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Apr 05 14:31:16 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Aug 27 16:35:21 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Aug 27 16:35:21 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Aug 27 16:35:21 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:45 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Aug 27 16:35:21 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Dec 03 15:35:01 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Dec 03 15:35:01 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Dec 03 15:35:01 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Dec 03 15:35:01 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-<projectDescription>\r
- <name>org.collectionspace.services.blob.jaxb</name>\r
- <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>\r
- <projects>\r
- <project>org.collectionspace.services.jaxb</project>\r
- </projects>\r
- <buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- </buildCommand>\r
- </buildSpec>\r
- <natures>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
- </natures>\r
-</projectDescription>
\ No newline at end of file
+++ /dev/null
-#Wed Jan 19 22:49:19 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Dec 03 15:35:01 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:31 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
\r
public void execQuery(String queryString);\r
\r
+ public String getDatasourceName();\r
+ \r
/**\r
* Creates the where clause from keywords.\r
* \r
* \r
* @return the string\r
*/\r
- public String createWhereClauseForPartialMatch(String field, String partialTerm);\r
+ public String createWhereClauseForPartialMatch(String dataSourceName,\r
+ String repositoryName,\r
+ String field,\r
+ String partialTerm);\r
\r
/**\r
* Creates a filtering where clause from docType, for invocables.\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:41 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<?xml version="1.0" encoding="UTF-8"?>\r
<projectDescription>\r
- <name>org.collectionspace.services.collectionobjects.client.samples</name>\r
+ <name>org.collectionspace.services.collectionobject.client.samples</name>\r
<comment></comment>\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Mon Dec 28 10:22:04 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<name>org.collectionspace.services.collectionobject.client.sample</name>\r
<comment></comment>\r
<projects>\r
- <project>org.collectionspace.services.client</project>\r
- <project>org.collectionspace.services.common</project>\r
</projects>\r
<buildSpec>\r
<buildCommand>\r
<arguments>\r
</arguments>\r
</buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildCommand>\r
</buildSpec>\r
<natures>\r
- <nature>org.eclipse.m2e.core.maven2Nature</nature>\r
<nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Mon Dec 28 10:22:04 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri May 21 15:18:26 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:24 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<artifactId>commons-jexl</artifactId>\r
<version>2.0.1</version>\r
</dependency>\r
+ <dependency>\r
+ <groupId>commons-dbcp</groupId>\r
+ <artifactId>commons-dbcp</artifactId>\r
+ <version>1.3-RC1</version>\r
+ <scope>provided</scope>\r
+ </dependency>\r
<dependency>\r
<groupId>commons-codec</groupId>\r
<artifactId>commons-codec</artifactId>\r
<version>1.4</version>\r
</dependency>\r
+ <dependency>\r
+ <groupId>org.apache.tomcat</groupId>\r
+ <artifactId>dbcp</artifactId>\r
+ <version>6.0.33</version>\r
+ <scope>provided</scope>\r
+ </dependency>\r
\r
<!-- javax -->\r
<dependency>\r
<artifactId>nuxeo-core-storage-sql</artifactId>\r
<version>${nuxeo.core.version}</version>\r
</dependency>\r
+ <dependency>\r
+ <groupId>org.nuxeo.ecm.core</groupId>\r
+ <artifactId>nuxeo-core-storage-sql-ra</artifactId>\r
+ <version>${nuxeo.core.version}</version>\r
+ </dependency>\r
<dependency>\r
<groupId>org.nuxeo.ecm.core</groupId>\r
<artifactId>nuxeo-core-io</artifactId>\r
<tenant:tenantBinding id="2" name="lifesci.collectionspace.org" displayName="Life Sciences/Natural History Demo Tenant" version="0.1">
- <tenant:repositoryDomain name="default-domain" storageName="lifesci-domain" repositoryClient="nuxeo-java" />
+ <tenant:repositoryDomain name="default-domain" storageName="lifesci-domain" repositoryName="lifesci-domain" repositoryClient="nuxeo-java" />
<tenant:serviceBindings merge:matcher="id" id="CollectionObjects">
<service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
<!-- begin idgenerator service meta-data -->
<tenant:serviceBindings id="idgenerators" name="idgenerators" type="utility" version="0.1">
<!-- other URI paths through which this service could be accessed -->
+ <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+ <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
+ <service:classname>org.collectionspace.services.common.init.RunSqlScript</service:classname>
+ <service:params>
+ <service:property>
+ <service:key>sqlScriptName</service:key>
+ <service:value>create_id_generators_table.sql</service:value>
+ </service:property>
+ </service:params>
+ </service:initHandler>
</tenant:serviceBindings>
<!-- end idgenerator service meta-data -->
/idgenerators/*/ids
</service:uriPath>
-->
+ <service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
+ <!-- The following initHandler config block is placed here, rather than in the -->
+ <!-- idgenerators service, above, as it appears that we currently can only run -->
+ <!-- one initHandler per service - ADR 2012-12-13 -->
+ <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
+ <service:classname>org.collectionspace.services.common.init.RunSqlScript</service:classname>
+ <service:params>
+ <service:property>
+ <service:key>sqlScriptName</service:key>
+ <service:value>load_id_generators.sql</service:value>
+ </service:property>
+ </service:params>
+ </service:initHandler>
</tenant:serviceBindings>
<!-- end id service meta-data -->
<!-- begin servicegroup service meta-data -->
<!-- Servicegroup is a task service that has no representation in the repo,
- but provides tools like keyword search across many types of services.
- -->
+ but provides tools like keyword search across many types of services.
+ -->
<tenant:serviceBindings id="servicegroups" name="servicegroups" type="utility" version="0.1">
<service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
<service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler</service:documentHandler>
<service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.collectionobject.nuxeo.CollectionObjectDocumentModelHandler</service:documentHandler>
<service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
<service:params>
- <service:SupportsHierarchy>true</service:SupportsHierarchy>
- <service:RefnameDisplayNameField> <!-- The field used as the display name in an object's refname -->
- <service:element>objectNumber</service:element>
- <service:xpath>objectNumber</service:xpath>
- </service:RefnameDisplayNameField>
+ <service:SupportsHierarchy>true</service:SupportsHierarchy>
+ <service:RefnameDisplayNameField> <!-- The field used as the display name in an object's refname -->
+ <service:element>objectNumber</service:element>
+ <service:xpath>objectNumber</service:xpath>
+ </service:RefnameDisplayNameField>
<service:ListResultsFields>
<service:ListResultField>
<service:element>objectNumber</service:element>
</service:part>
</service:object>
</tenant:serviceBindings>
- <!-- end loanout service meta-data -->
+ <!-- end loanout service meta-data -->
- <!-- begin objectexit service meta-data -->
+ <!-- begin objectexit service meta-data -->
<tenant:serviceBindings id="ObjectExit" name="ObjectExit" type="procedure" version="0.1">
<service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
<service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.objectexit.nuxeo.ObjectExitDocumentModelHandler</service:documentHandler>
<types:key>authRef</types:key>
<types:value>movementContact</types:value>
</types:item>
- <!-- Inventory Control Information group -->
+ <!-- Inventory Control Information group -->
<types:item xmlns:types="http://collectionspace.org/services/config/types">
<types:key>authRef</types:key>
<types:value>inventoryContactList|inventoryContact</types:value>
<service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.vocabulary.nuxeo.VocabularyItemDocumentModelHandler</service:documentHandler>
<service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
<service:params>
- <service:SupportsHierarchy>true</service:SupportsHierarchy>
- <service:RefnameDisplayNameField>
+ <service:SupportsHierarchy>true</service:SupportsHierarchy>
+ <service:RefnameDisplayNameField>
<service:ListResultField>
<service:element>order</service:element>
<service:xpath>order</service:xpath>
</service:ListResultField>
- </service:RefnameDisplayNameField>
+ </service:RefnameDisplayNameField>
<service:ListResultsFields>
<!-- Omit the standard AuthorityItem fields (they are handled by the code) -->
<service:ListResultField>
<types:key>authRef</types:key>
<types:value>groups|group</types:value>
</types:item> -->
- <!-- Uncomment when Concept authority/Function (line of business) vocabulary is implemented in Services -->
+ <!-- Uncomment when Concept authority/Function (line of business) vocabulary is implemented in Services -->
<!--
<types:item xmlns:types="http://collectionspace.org/services/config/types">
<types:key>authRef</types:key>
<service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.person.nuxeo.PersonDocumentModelHandler</service:documentHandler>
<service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
<service:params>
- <service:SupportsHierarchy>true</service:SupportsHierarchy>
+ <service:SupportsHierarchy>true</service:SupportsHierarchy>
<service:ListResultsFields>
<!-- Omit the standard AuthorityItem fields (they are handled by the code) -->
<service:ListResultField>
</service:part>
</service:object>
</tenant:serviceBindings>
- <!-- end person service meta-data -->
+ <!-- end person service meta-data -->
- <!-- begin locationauthority service meta-data -->
+ <!-- begin locationauthority service meta-data -->
<tenant:serviceBindings id="Locationauthorities" name="Locationauthorities" type="utility" version="0.1">
<!-- other URI paths through which this service could be accessed -->
<!--
<service:ListResultsFields>
<!-- Omit the standard AuthorityItem fields (they are handled by the code) -->
<!-- Uncomment when bug in returning list result values from complex types,
- currently in the CSPACE-4813 branch (P/NP term work in services), is fixed -->
+ currently in the CSPACE-4813 branch (P/NP term work in services), is fixed -->
<!--
<service:ListResultField>
<service:element>taxonFullName</service:element>
</service:part>
</service:object>
</tenant:serviceBindings>
- <!-- end acquisition service meta-data -->
+ <!-- end acquisition service meta-data -->
- <!-- begin relation service meta-data -->
+ <!-- begin relation service meta-data -->
<tenant:serviceBindings id="Relations" name="Relations" type="utility" version="0.1">
<!-- other URI paths through which this service could be accessed -->
<service:repositoryDomain xmlns:service="http://collectionspace.org/services/config/service">default-domain</service:repositoryDomain>
</service:part>
</service:object>
</tenant:serviceBindings>
- <!-- end note service meta-data -->
+ <!-- end note service meta-data -->
<!-- begin role service meta-data -->
<tenant:serviceBindings id="authorization/roles" name="authorization/roles" type="security" version="0.1">
//\r
if (partialTerm != null && !partialTerm.isEmpty()) {\r
String partialTermMatchField = getPartialTermMatchField(ctx);\r
- String ptClause = QueryManager.createWhereClauseForPartialMatch(\r
- partialTermMatchField, partialTerm);\r
+ String ptClause = QueryManager.createWhereClauseForPartialMatch(ctx, partialTermMatchField,\r
+ partialTerm);\r
docFilter.appendWhereClause(ptClause, IQueryManager.SEARCH_QUALIFIER_AND);\r
} else if (keywords != null && !keywords.isEmpty()) {\r
String whereClause = QueryManager.createWhereClauseFromKeywords(keywords);\r
import java.io.FileInputStream;\r
import java.io.FileNotFoundException;\r
import java.io.InputStream;\r
-import java.sql.Connection;\r
-import java.sql.PreparedStatement;\r
-import java.sql.ResultSet;\r
-import java.sql.SQLException;\r
-import java.sql.Statement;\r
import java.util.*;\r
\r
import javax.naming.NamingException;\r
\r
import org.collectionspace.authentication.AuthN;\r
\r
-import org.collectionspace.services.config.service.InitHandler;\r
import org.collectionspace.services.common.authorization_mgt.AuthorizationCommon;\r
import org.collectionspace.services.common.config.ConfigReader;\r
+import org.collectionspace.services.common.config.ConfigUtils;\r
import org.collectionspace.services.common.config.ServicesConfigReaderImpl;\r
import org.collectionspace.services.common.config.TenantBindingConfigReaderImpl;\r
import org.collectionspace.services.common.init.AddIndices;\r
import org.collectionspace.services.config.service.InitHandler.Params.Field;\r
import org.collectionspace.services.common.init.IInitHandler;\r
-import org.collectionspace.services.common.security.SecurityUtils;\r
import org.collectionspace.services.common.storage.JDBCTools;\r
-import org.collectionspace.services.common.storage.DatabaseProductType;\r
import org.collectionspace.services.config.ClientType;\r
import org.collectionspace.services.config.ServiceConfig;\r
import org.collectionspace.services.config.service.ServiceBindingType;\r
}\r
}\r
\r
- /**\r
- * Create required indexes (aka indices) in database tables not associated\r
- * with any specific tenant.\r
- * \r
- * @throws Exception \r
- */\r
- void createRequiredIndices() throws Exception {\r
- \r
- // Define a set of columns (fields) and their associated\r
- // tables, on which database indexes should always be created\r
- final String COLLECTIONSPACE_CORE_TABLE_NAME = "collectionspace_core";\r
- final String NUXEO_FULLTEXT_TABLE_NAME = "fulltext";\r
- final String NUXEO_HIERARCHY_TABLE_NAME = "hierarchy";\r
- \r
- Map<Integer,List<String>> fieldsToIndex = new HashMap<Integer,List<String>>();\r
- fieldsToIndex.put(1, new ArrayList(Arrays.asList(COLLECTIONSPACE_CORE_TABLE_NAME, "tenantid")));\r
- fieldsToIndex.put(2, new ArrayList(Arrays.asList(COLLECTIONSPACE_CORE_TABLE_NAME, "updatedat")));\r
- fieldsToIndex.put(3, new ArrayList(Arrays.asList(NUXEO_FULLTEXT_TABLE_NAME, "jobid")));\r
- fieldsToIndex.put(4, new ArrayList(Arrays.asList(NUXEO_HIERARCHY_TABLE_NAME, "name")));\r
- \r
- // Invoke existing post-init code to create these indexes,\r
- // sending in the set of values above, in contrast to\r
- // drawing these values from per-tenant configuration.\r
- DataSource dataSource = JDBCTools.getDataSource(JDBCTools.NUXEO_REPOSITORY_NAME);\r
- AddIndices addindices = new AddIndices();\r
- List<Field> fields = new ArrayList<Field>();\r
- for (Map.Entry<Integer,List<String>> entry : fieldsToIndex.entrySet()) {\r
- Field field = new Field();\r
- field.setTable(entry.getValue().get(0)); // Table name from List item 0\r
- field.setCol(entry.getValue().get(1)); // Column name from List item 1\r
- fields.add(field);\r
- }\r
- addindices.onRepositoryInitialized(dataSource, null, fields, null);\r
+ /**\r
+ * Create required indexes (aka indices) in database tables not associated\r
+ * with any specific tenant.\r
+ * \r
+ * We need to loop over each repository/db declared in the tenant bindings.\r
+ * The assumption here is that each repo/db is a Nuxeo repo/DB.\r
+ * \r
+ * @throws Exception\r
+ */\r
+ void createRequiredIndices() throws Exception {\r
+ Hashtable<String, TenantBindingType> tenantBindingTypeMap = tenantBindingConfigReader.getTenantBindings();\r
\r
- }\r
+ //\r
+ //Loop through all tenants in tenant-bindings.xml\r
+ //\r
+ for (TenantBindingType tbt : tenantBindingTypeMap.values()) {\r
+ List<String> repositoryNameList = ConfigUtils.getRepositoryNameList(tbt);\r
+ if (repositoryNameList != null && repositoryNameList.isEmpty() == false) {\r
+ //\r
+ // Loop through each repo/DB defined in a tenant bindings file\r
+ //\r
+ for (String repositoryName : repositoryNameList) {\r
+ // Define a set of columns (fields) and their associated\r
+ // tables, on which database indexes should always be created\r
+ final String COLLECTIONSPACE_CORE_TABLE_NAME = "collectionspace_core";\r
+ final String NUXEO_FULLTEXT_TABLE_NAME = "fulltext";\r
+ final String NUXEO_HIERARCHY_TABLE_NAME = "hierarchy";\r
+ \r
+ Map<Integer, List<String>> fieldsToIndex = new HashMap<Integer, List<String>>();\r
+ fieldsToIndex.put(1, new ArrayList<String>(Arrays.asList(COLLECTIONSPACE_CORE_TABLE_NAME, "tenantid")));\r
+ fieldsToIndex.put(2, new ArrayList<String>(Arrays.asList(COLLECTIONSPACE_CORE_TABLE_NAME, "updatedat")));\r
+ fieldsToIndex.put(3, new ArrayList<String>(Arrays.asList(NUXEO_FULLTEXT_TABLE_NAME, "jobid")));\r
+ fieldsToIndex.put(4, new ArrayList<String>(Arrays.asList(NUXEO_HIERARCHY_TABLE_NAME, "name")));\r
+ \r
+ // Invoke existing post-init code to create these indexes,\r
+ // sending in the set of values above, in contrast to\r
+ // drawing these values from per-tenant configuration.\r
+// DataSource dataSource = JDBCTools.getDataSource(JDBCTools.NUXEO_DATASOURCE_NAME);\r
+ AddIndices addindices = new AddIndices();\r
+ List<Field> fields = new ArrayList<Field>();\r
+ for (Map.Entry<Integer, List<String>> entry : fieldsToIndex.entrySet()) {\r
+ Field field = new Field();\r
+ field.setTable(entry.getValue().get(0)); // Table name from List\r
+ // item 0\r
+ field.setCol(entry.getValue().get(1)); // Column name from List item\r
+ // 1\r
+ fields.add(field);\r
+ }\r
+ addindices.onRepositoryInitialized(JDBCTools.NUXEO_DATASOURCE_NAME, repositoryName, null, fields, null);\r
+ }\r
+ } else {\r
+ String errMsg = "repositoryNameList was empty or null.";\r
+ logger.error(errMsg);\r
+ throw new Exception(errMsg);\r
+ }\r
+ }\r
+ }\r
\r
public void firePostInitHandlers() throws Exception {\r
- DataSource dataSource = JDBCTools.getDataSource(JDBCTools.NUXEO_REPOSITORY_NAME);\r
Hashtable<String, TenantBindingType> tenantBindingTypeMap = tenantBindingConfigReader.getTenantBindings();\r
+ //\r
//Loop through all tenants in tenant-bindings.xml\r
- for (TenantBindingType tbt: tenantBindingTypeMap.values()){\r
- //String name = tbt.getName();\r
- //String id = tbt.getId();\r
- //Loop through all the services in this tenant\r
+ //\r
+ for (TenantBindingType tbt : tenantBindingTypeMap.values()) {\r
+ //\r
+ //Loop through all the services in this tenant\r
+ //\r
List<ServiceBindingType> sbtList = tbt.getServiceBindings();\r
- for (ServiceBindingType sbt: sbtList){\r
+ for (ServiceBindingType sbt: sbtList) {\r
+ String repositoryName = ConfigUtils.getRepositoryName(tbt, sbt.getRepositoryDomain()); // Each service can have a different repo domain\r
//Get the list of InitHandler elements, extract the first one (only one supported right now) and fire it using reflection.\r
List<org.collectionspace.services.config.service.InitHandler> list = sbt.getInitHandler();\r
- if (list!=null && list.size()>0){\r
- org.collectionspace.services.config.service.InitHandler handlerType = list.get(0);\r
+ if (list != null && list.size() > 0) {\r
+ org.collectionspace.services.config.service.InitHandler handlerType = list.get(0); // REM - 12/2012: We might want to think about supporting multiple post-init handlers\r
String initHandlerClassname = handlerType.getClassname();\r
\r
List<org.collectionspace.services.config.service.InitHandler.Params.Field>\r
Object o = instantiate(initHandlerClassname, IInitHandler.class);\r
if (o != null && o instanceof IInitHandler){\r
IInitHandler handler = (IInitHandler)o;\r
- handler.onRepositoryInitialized(dataSource, sbt, fields, props);\r
+ handler.onRepositoryInitialized(JDBCTools.NUXEO_DATASOURCE_NAME, repositoryName, sbt, fields, props);\r
//The InitHandler may be the default one,\r
// or specialized classes which still implement this interface and are registered in tenant-bindings.xml.\r
}\r
// cached in a static hash map of the JDBCTools class. This will speed up lookups as well as protect our\r
// code from JNDI lookup problems -for example, if the JNDI context gets stepped on or corrupted.\r
//\r
- DataSource cspaceDataSource = JDBCTools.getDataSource(JDBCTools.CSPACE_REPOSITORY_NAME);\r
- DataSource nuxeoDataSource = JDBCTools.getDataSource(JDBCTools.NUXEO_REPOSITORY_NAME);\r
+ DataSource cspaceDataSource = JDBCTools.getDataSource(JDBCTools.CSPACE_DATASOURCE_NAME);\r
+ DataSource nuxeoDataSource = JDBCTools.getDataSource(JDBCTools.NUXEO_DATASOURCE_NAME);\r
//\r
// Set our AuthN's datasource to be the cspaceDataSource\r
//\r
}\r
\r
private static Connection getConnection() throws NamingException, SQLException {\r
- return JDBCTools.getConnection(JDBCTools.CSPACE_REPOSITORY_NAME);\r
+ return JDBCTools.getConnection(JDBCTools.CSPACE_DATASOURCE_NAME,\r
+ JDBCTools.DEFAULT_CSPACE_DATABASE_NAME);\r
}\r
\r
/*\r
// and we're not touching that, so we could safely toss the \r
// accounts, users, account-tenants, account-roles, and start over.\r
try {\r
- DatabaseProductType databaseProductType = JDBCTools.getDatabaseProductType();\r
+ DatabaseProductType databaseProductType = JDBCTools.getDatabaseProductType(JDBCTools.CSPACE_DATASOURCE_NAME,\r
+ JDBCTools.DEFAULT_CSPACE_DATABASE_NAME);\r
conn = getConnection();\r
ArrayList<String> existingTenants = compileExistingTenants(conn, tenantInfo);\r
\r
}
String repoDomain = serviceBinding.getRepositoryDomain();
if (repoDomain == null) {
- /* This is excessive - every call to a JPA based service dumps this msg.
- if (logger.isDebugEnabled()) {
- logger.debug("No repository domain configured for " + serviceName
+ if (logger.isTraceEnabled()) {
+ logger.trace("No repository domain configured for " + serviceName
+ " of tenant with id=" + tenantId);
}
- */
return null;
}
String key = this.getTenantQualifiedIdentifier(tenantId, repoDomain.trim());
private TenantBindingType tenantBinding;
/** repository domain used by the service */
private RepositoryDomainType repositoryDomain;
- /** The override document type. */
+ /** The override document type. */
private String overrideDocumentType = null;
/** The val handlers. */
private List<ValidatorHandler<IT, OT>> valHandlers = null;
// TODO Auto-generated method stub
return currentRepositorySession;
}
+
+ @Override
+ public RepositoryDomainType getRepositoryDomain() {
+ return repositoryDomain;
+ }
+
+ @Override
+ public void setRepositoryDomain(RepositoryDomainType repositoryDomain) {
+ this.repositoryDomain = repositoryDomain;
+ }
}
import javax.ws.rs.core.UriInfo;
import org.collectionspace.services.common.ResourceMap;
+import org.collectionspace.services.common.ServiceMain;
+import org.collectionspace.services.common.config.ConfigUtils;
+import org.collectionspace.services.common.config.TenantBindingConfigReaderImpl;
import org.collectionspace.services.common.security.UnauthorizedException;
+import org.collectionspace.services.config.service.ServiceBindingType;
+import org.collectionspace.services.config.tenant.TenantBindingType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
}
}
+ /*
+ * Returns the name of the service's acting repository. Gets this from the tenant and service bindings files
+ */
+ public String getRepositoryName() throws Exception {
+ String result = null;
+
+ TenantBindingConfigReaderImpl tenantBindingConfigReader = ServiceMain.getInstance().getTenantBindingConfigReader();
+ String tenantId = this.getTenantId();
+ TenantBindingType tenantBindingType = tenantBindingConfigReader.getTenantBinding(tenantId);
+ ServiceBindingType serviceBindingType = this.getServiceBinding();
+ String servicesRepoDomainName = serviceBindingType.getRepositoryDomain();
+ if (servicesRepoDomainName != null && servicesRepoDomainName.trim().isEmpty() == false) {
+ result = ConfigUtils.getRepositoryName(tenantBindingType, servicesRepoDomainName);
+ } else {
+ String errMsg = String.format("The '%s' service for tenant ID=%s did not declare a repository domain in its service bindings.",
+ serviceBindingType.getName(), tenantId);
+ throw new Exception(errMsg);
+ }
+
+ return result;
+ }
+
/* (non-Javadoc)
* @see org.collectionspace.services.common.context.AbstractServiceContextImpl#getInput()
*/
import org.collectionspace.services.config.ClientType;
import org.collectionspace.services.config.service.ObjectPartType;
import org.collectionspace.services.config.service.ServiceBindingType;
+import org.collectionspace.services.config.tenant.RepositoryDomainType;
/**
*
*/
public String getRepositoryDomainName();
+ /*
+ * The name of the repository/db for the current context
+ */
+ public String getRepositoryName() throws Exception;
+
/*
* Get's the name/label used to create the storage container (folder or directory name)
*/
public UriInfo getUriInfo();
+ public RepositoryDomainType getRepositoryDomain();
+
+ public void setRepositoryDomain(RepositoryDomainType repositoryDomain);
}
/** See the class javadoc for this class: it shows the syntax supported in the configuration params.\r
*/\r
@Override\r
- public void onRepositoryInitialized(DataSource dataSource,\r
+ public void onRepositoryInitialized(String dataSourceName,\r
+ String repositoryName,\r
ServiceBindingType sbt, \r
List<Field> fields, \r
List<Property> properties) throws Exception {\r
if(Tools.notEmpty(param) && (param.indexOf(',')>-1)){\r
String[] fieldNames = param.split(",");\r
for (String fn: fieldNames){\r
- rows = addOneIndex(dataSource, tableName, fn);\r
+ rows = addOneIndex(dataSourceName, repositoryName, tableName, fn);\r
}\r
} else {\r
- rows = addOneIndex(dataSource, tableName, fieldName);\r
+ rows = addOneIndex(dataSourceName, repositoryName, tableName, fieldName);\r
}\r
}\r
}\r
\r
- private int addOneIndex(DataSource dataSource, String tableName, String columnName){\r
+ private int addOneIndex(String dataSourceName,\r
+ String repositoryName, \r
+ String tableName, \r
+ String columnName) {\r
int rows = 0;\r
String sql = "";\r
String indexName = tableName + INDEX_SEP + columnName + INDEX_SUFFIX;\r
try {\r
- DatabaseProductType databaseProductType = JDBCTools.getDatabaseProductType();\r
- if (indexExists(dataSource, databaseProductType, tableName, columnName, indexName)) {\r
+ DatabaseProductType databaseProductType = JDBCTools.getDatabaseProductType(dataSourceName, repositoryName);\r
+ if (indexExists(dataSourceName, repositoryName, databaseProductType,\r
+ tableName, columnName, indexName)) {\r
logger.trace("Index already exists for column " + columnName\r
+ " in table " + tableName);\r
// FIXME: Can add the option to drop and re-create an index here.\r
//\r
// If this assumption is no longer valid, we might instead\r
// identify the relevant repository from the table name here.\r
- rows = JDBCTools.executeUpdate(dataSource, sql);\r
+ rows = JDBCTools.executeUpdate(dataSourceName, repositoryName, sql);\r
logger.trace("Index added to column ("+columnName+") on table ("+tableName+")");\r
}\r
return rows;\r
}\r
}\r
\r
- private boolean indexExists(DataSource dataSource,\r
+ private boolean indexExists(String dataSourceName,\r
+ String repositoryName,\r
DatabaseProductType databaseProductType,\r
String tableName, \r
String colName, \r
//\r
// If this assumption is no longer valid, we might instead\r
// identify the relevant repository from the table name here.\r
- conn = JDBCTools.getConnection(dataSource);\r
+ conn = JDBCTools.getConnection(dataSourceName, repositoryName);\r
stmt = conn.createStatement();\r
rs = stmt.executeQuery(sql);\r
if (rs.next()) {\r
\r
import java.util.List;\r
\r
-import javax.sql.DataSource;\r
-\r
import org.collectionspace.services.config.service.InitHandler.Params.Field;\r
import org.collectionspace.services.config.service.InitHandler.Params.Property;\r
import org.collectionspace.services.config.service.ServiceBindingType;\r
*/\r
\r
public interface IInitHandler {\r
- public void onRepositoryInitialized(DataSource dataSource,\r
+ public void onRepositoryInitialized(String dataSourceName,\r
+ String repositoryName,\r
ServiceBindingType sbt, \r
List<Field> fields, \r
List<Property> property) throws Exception;\r
\r
import java.util.List;\r
\r
-import javax.sql.DataSource;\r
-\r
/** Concrete class which does nothing, but subclasses may override to do\r
* some action on the event onRepositoryInitialized(), such as sending JDBC\r
* calls to the repository to add indices, etc.\r
* @throws Exception\r
*/\r
@Override\r
- public void onRepositoryInitialized(DataSource dataSource,\r
+ public void onRepositoryInitialized(String dataSourceName,\r
+ String repositoryName,\r
ServiceBindingType sbt, \r
List<Field> fields, \r
List<Property> properties) throws Exception {\r
final Logger logger = LoggerFactory.getLogger(ModifyFieldDatatypes.class);
@Override
- public void onRepositoryInitialized(DataSource dataSource,
+ public void onRepositoryInitialized(String dataSourceName,
+ String repositoryName,
ServiceBindingType sbt,
List<Field> fields,
List<Property> properties) throws Exception {
+ " for repository domain " + sbt.getRepositoryDomain().trim() + "...");
}
try {
- DatabaseProductType databaseProductType = JDBCTools.getDatabaseProductType();
+ DatabaseProductType databaseProductType = JDBCTools.getDatabaseProductType(dataSourceName, repositoryName);
String datatype = "";
for (Field field : fields) {
datatype = getDatatypeFromLogicalType(databaseProductType, field.getType());
// If the field is already of the desired datatype, skip it.
- if (fieldHasDesiredDatatype(dataSource, databaseProductType, field, datatype)) {
+ if (fieldHasDesiredDatatype(dataSourceName, repositoryName, databaseProductType, field, datatype)) {
logger.trace("Field " + field.getTable() + "." + field.getCol()
+ " is already of desired datatype " + datatype);
continue;
//
// If this assumption is no longer valid, we might instead
// identify the relevant repository from the table name here.
- rows = JDBCTools.executeUpdate(dataSource, sql);
+ rows = JDBCTools.executeUpdate(dataSourceName, repositoryName, sql);
}
} catch (Exception e) {
throw e;
return datatype;
}
- private boolean fieldHasDesiredDatatype(DataSource dataSource,
+ private boolean fieldHasDesiredDatatype(String dataSourceName,
+ String repositoryName,
DatabaseProductType databaseProductType,
Field field, String datatype) {
ResultSet rs = null;
try {
- conn = JDBCTools.getConnection(dataSource);
+ conn = JDBCTools.getConnection(dataSourceName, repositoryName);
stmt = conn.createStatement();
+ String databaseName = JDBCTools.getDatabaseName(dataSourceName, repositoryName, conn);
+
if (databaseProductType == DatabaseProductType.MYSQL) {
sql = "SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS "
- + "WHERE TABLE_SCHEMA = '" + JDBCTools.getDatabaseName(conn) + "'"
+ + "WHERE TABLE_SCHEMA = '" + databaseName + "'"
+ " AND TABLE_NAME = '" + getTableName(field) + "'"
+ " AND COLUMN_NAME = '" + field.getCol() + "'";
} else if (databaseProductType == DatabaseProductType.POSTGRESQL) {
sql = "SELECT data_type FROM information_schema.columns "
- + "WHERE table_catalog = '" + JDBCTools.getDatabaseName(conn) + "'"
+ + "WHERE table_catalog = '" + databaseName + "'"
+ " AND table_name = '" + getTableName(field) + "'"
+ " AND column_name = '" + field.getCol() + "'";
}
--- /dev/null
+/**
+ * This document is a part of the source code and related artifacts for
+ * CollectionSpace, an open source collections management system for museums and
+ * related institutions:
+ *
+ * http://www.collectionspace.org http://wiki.collectionspace.org
+ *
+ * Copyright 2009 University of California at Berkeley
+ *
+ * Licensed under the Educational Community License (ECL), Version 2.0. You may
+ * not use this file except in compliance with this License.
+ *
+ * You may obtain a copy of the ECL 2.0 License at
+ *
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+ */
+package org.collectionspace.services.common.init;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.List;
+import org.collectionspace.services.common.api.Tools;
+import org.collectionspace.services.common.storage.JDBCTools;
+import org.collectionspace.services.config.service.InitHandler.Params.Field;
+import org.collectionspace.services.config.service.InitHandler.Params.Property;
+import org.collectionspace.services.config.service.ServiceBindingType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RunSqlScript extends InitHandler implements IInitHandler {
+
+ private final Logger logger = LoggerFactory.getLogger(RunSqlScript.class);
+ private final static String SQL_SCRIPT_NAME_PROPERTY = "sqlScriptName";
+ private final static String DATABASE_RESOURCE_DIRECTORY_NAME = "db";
+ private final static String LINE_SEPARATOR = System.getProperty("line.separator");
+ private final static String CANNOT_PERFORM_TASKS_MESSAGE =
+ "Will not be able to perform tasks within the RunSqlScript init handler.";
+
+ /**
+ * See the class javadoc for this class: it shows the syntax supported in
+ * the configuration params.
+ */
+ @Override
+ public void onRepositoryInitialized(String dataSourceName,
+ String repositoryName,
+ ServiceBindingType sbt,
+ List<Field> fields,
+ List<Property> properties) throws Exception {
+
+ /*
+ if (logger.isInfoEnabled() && sbt != null) {
+ logger.info("Running SQL script in " + sbt.getName()
+ + " for repository domain " + sbt.getRepositoryDomain().trim() + "...");
+ }
+ */
+
+ if (properties == null || properties.isEmpty()) {
+ logger.warn("No properties were provided to the RunSqlScript init handler.");
+ logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);
+ return;
+ }
+
+ String scriptName = getSqlScriptName(properties);
+ if (Tools.isBlank(scriptName)) {
+ logger.warn("Could not get SQL script name.");
+ logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);
+ return;
+ }
+
+ String scriptPath = getSqlScriptPath(dataSourceName, repositoryName, scriptName);
+ if (Tools.isBlank(scriptPath)) {
+ logger.warn("Could not get path to SQL script.");
+ logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);
+ return;
+ }
+
+ String scriptContents = getSqlScriptContents(scriptPath);
+ if (Tools.isBlank(scriptContents)) {
+ logger.warn("Could not get contents of SQL script.");
+ logger.warn(CANNOT_PERFORM_TASKS_MESSAGE);
+ return;
+ }
+
+ runScript(dataSourceName, repositoryName, scriptContents, scriptPath);
+ }
+
+ private String getSqlScriptName(List<Property> properties) {
+ String scriptName = "";
+ for (Property property : properties) {
+ if (property.getKey().equals(SQL_SCRIPT_NAME_PROPERTY)) {
+ scriptName = property.getValue();
+ if (Tools.notBlank(scriptName)) {
+ break;
+ }
+ }
+ }
+ return scriptName;
+ }
+
+ private String getSqlScriptPath(String dataSourceName, String repositoryName, String scriptName) throws Exception {
+ String scriptPath =
+ DATABASE_RESOURCE_DIRECTORY_NAME
+ + "/"
+ + JDBCTools.getDatabaseProductType(dataSourceName, repositoryName)
+ + "/"
+ + scriptName;
+ return scriptPath;
+ }
+
+ private String getSqlScriptContents(String scriptPath) throws Exception {
+ return getStringFromResource(scriptPath);
+ }
+
+ /**
+ * Returns a string representation of a resource available to the current
+ * class.
+ *
+ * @param resourcePath a path to the resource.
+ * @return a string representation of the resource. Returns null if the
+ * resource cannot be read, or if it cannot be successfully represented as a
+ * string.
+ */
+ private String getStringFromResource(String resourcePath) {
+ String str = "";
+ ClassLoader classloader = getClass().getClassLoader();
+ if (classloader == null) {
+ return str;
+ }
+ if (logger.isTraceEnabled()) {
+ URL resourceurl = classloader.getResource(resourcePath);
+ logger.trace("URL=" + resourceurl.toString());
+ }
+ InputStream instream = classloader.getResourceAsStream(resourcePath);
+ if (instream == null) {
+ logger.warn("Could not read resource from path " + resourcePath);
+ return null;
+ }
+ try {
+ str = stringFromInputStream(instream);
+ } catch (IOException ioe) {
+ logger.warn("Could not create string from stream: ", ioe);
+ return null;
+ }
+ return str;
+ }
+
+ /**
+ * Returns a string representation of the contents of an input stream.
+ *
+ * @param instream an input stream.
+ * @return a string representation of the contents of the input stream.
+ * @throws an IOException if an error occurs when reading the input stream.
+ */
+ private String stringFromInputStream(InputStream instream) throws IOException {
+ StringBuilder sb = new StringBuilder("");
+ if (instream == null) {
+ logger.warn("Input stream is null.");
+ return sb.toString();
+ }
+ BufferedReader bufreader = new BufferedReader(new InputStreamReader(instream));
+ String line = "";
+ while ((line = bufreader.readLine()) != null) {
+ sb.append(line);
+ sb.append(LINE_SEPARATOR);
+ }
+ return sb.toString();
+ }
+
+ private void runScript(String dataSourceName, String repositoryName, String scriptContents, String scriptPath) {
+ int rows = 0;
+ try {
+ rows = JDBCTools.executeUpdate(dataSourceName, repositoryName, scriptContents);
+ } catch (Throwable e) {
+ logger.warn("Running SQL script " + scriptPath + " resulted in error: ", e.getMessage());
+ rows = -1;
+ }
+ // FIXME: Verify which row values represent failure; should there always
+ // be one and only one row returned in a successful response from executeUpdate?
+ if (rows < 0) {
+ logger.warn("Running SQL script " + scriptPath + " failed to return expected results.");
+ } else {
+ if (logger.isInfoEnabled()) {
+ logger.info("Successfully ran SQL script: " + scriptPath);
+ }
+ }
+ }
+}
package org.collectionspace.services.common.query;\r
\r
import org.collectionspace.services.client.IQueryManager;\r
+import org.collectionspace.services.common.context.ServiceContext;\r
import org.collectionspace.services.common.query.nuxeo.QueryManagerNuxeoImpl;\r
\r
public class QueryManager {\r
* \r
* @return the string\r
*/\r
- static public String createWhereClauseForPartialMatch(String field, String partialTerm) {\r
- return queryManager.createWhereClauseForPartialMatch(field, partialTerm);\r
+ static public String createWhereClauseForPartialMatch(ServiceContext ctx,\r
+ String field,\r
+ String partialTerm) throws Exception {\r
+ String repositoryName = ctx.getRepositoryName();\r
+ return queryManager.createWhereClauseForPartialMatch(queryManager.getDatasourceName(),\r
+ repositoryName, field, partialTerm);\r
}\r
\r
/**\r
import org.collectionspace.services.nuxeo.client.java.NuxeoConnectorEmbedded;\r
\r
import org.collectionspace.services.client.IQueryManager;\r
-import org.collectionspace.services.common.invocable.Invocable;\r
import org.collectionspace.services.common.invocable.InvocableUtils;\r
import org.collectionspace.services.common.storage.DatabaseProductType;\r
import org.collectionspace.services.common.storage.JDBCTools;\r
private static Pattern kwdSearchProblemChars = Pattern.compile("[\\:\\(\\)\\*\\%\\.]");\r
private static Pattern kwdSearchHyphen = Pattern.compile(" - ");\r
\r
- private static String getLikeForm() {\r
+ private static String getLikeForm(String dataSourceName, String repositoryName) {\r
if (SEARCH_LIKE_FORM == null) {\r
try {\r
- DatabaseProductType type = JDBCTools.getDatabaseProductType();\r
+ DatabaseProductType type = JDBCTools.getDatabaseProductType(dataSourceName, repositoryName);\r
if (type == DatabaseProductType.MYSQL) {\r
SEARCH_LIKE_FORM = IQueryManager.SEARCH_LIKE;\r
} else if (type == DatabaseProductType.POSTGRESQL) {\r
return SEARCH_LIKE_FORM;\r
}\r
\r
+ @Override\r
+ public String getDatasourceName() {\r
+ return JDBCTools.NUXEO_DATASOURCE_NAME;\r
+ }\r
+ \r
// TODO: This is currently just an example fixed query. This should\r
// eventually be\r
// removed or replaced with a more generic method.\r
// Both these require using JDBC, since we cannot get to the fulltext table\r
// in NXQL\r
@Override\r
- public String createWhereClauseForPartialMatch(String field,\r
+ public String createWhereClauseForPartialMatch(String dataSourceName,\r
+ String repositoryName,\r
+ String field,\r
String partialTerm) {\r
String trimmed = (partialTerm == null) ? "" : partialTerm.trim();\r
if (trimmed.isEmpty()) {\r
if (field == null || field.isEmpty()) {\r
throw new RuntimeException("No match field specified.");\r
}\r
- String ptClause = field + getLikeForm() + "'%"\r
+ String ptClause = field + getLikeForm(dataSourceName, repositoryName) + "'%"\r
+ unescapedSingleQuote.matcher(trimmed).replaceAll("\\\\'")\r
+ "%'";\r
return ptClause;\r
import org.collectionspace.services.common.document.DocumentNotFoundException;
import org.collectionspace.services.common.document.DocumentWrapper;
import org.collectionspace.services.common.storage.StorageClient;
+import org.collectionspace.services.config.tenant.RepositoryDomainType;
import org.nuxeo.ecm.core.api.ClientException;
import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.DocumentModelList;
* @return id of newly created domain space
* @throws java.lang.Exception
*/
- public String createDomain(String domainName) throws Exception;
+ public String createDomain(RepositoryDomainType repositoryDomain) throws Exception;
/**
* getDomainSpaceId gets id of the given domain
* @return
* @throws Exception
*/
- public String getDomainId(String domainName) throws Exception;
+ public String getDomainId(RepositoryDomainType repositoryDomain) throws Exception;
/**
* retrieveWorkspaceIds retrieve workspace ids for given domain
* @return Hashtable<workspaceName, workspaceId>
* @throws Exception
*/
- public Hashtable<String, String> retrieveWorkspaceIds(String domainName) throws Exception;
+ public Hashtable<String, String> retrieveWorkspaceIds(RepositoryDomainType repositoryDomain) throws Exception;
/**
* createWorkspace creates a workspace in default repository under given domain
* @return id of newly created workspace
* @throws java.lang.Exception
*/
- public String createWorkspace(String tenantDomain, String workspaceName) throws Exception;
+ public String createWorkspace(RepositoryDomainType repositoryDomain, String workspaceName) throws Exception;
/**
* getWorkspaceId gets an id of given workspace in default repository under given domain
*/\r
package org.collectionspace.services.common.storage;\r
\r
-import org.collectionspace.services.common.ServiceMain;\r
import org.collectionspace.services.common.api.Tools;\r
import org.slf4j.Logger;\r
import org.slf4j.LoggerFactory;\r
import javax.naming.Context;\r
import javax.naming.InitialContext;\r
import javax.naming.NamingException;\r
-import javax.security.auth.login.LoginException;\r
import javax.sql.DataSource;\r
import java.sql.DatabaseMetaData;\r
import java.sql.Connection;\r
-import java.sql.ResultSet;\r
import java.sql.SQLException;\r
import java.sql.Statement;\r
import java.util.HashMap;\r
*/\r
public class JDBCTools {\r
public static HashMap<String, DataSource> cachedDataSources = new HashMap<String, DataSource>();\r
- public static String CSPACE_REPOSITORY_NAME = "CspaceDS";\r
- public static String NUXEO_REPOSITORY_NAME = "NuxeoDS";\r
+ public static String CSPACE_DATASOURCE_NAME = "CspaceDS";\r
+ public static String NUXEO_DATASOURCE_NAME = "NuxeoDS";\r
+ // Default database names\r
+ public static String DEFAULT_CSPACE_DATABASE_NAME = "cspace";\r
+ public static String DEFAULT_NUXEO_REPOSITORY_NAME = "default";\r
+ public static String DEFAULT_NUXEO_DATABASE_NAME = "nuxeo";\r
//\r
// Private constants\r
//\r
- private static String DEFAULT_REPOSITORY_NAME = NUXEO_REPOSITORY_NAME;\r
private static String DBProductName = null;\r
- private static DatabaseProductType DBProductType = DatabaseProductType.UNRECOGNIZED;\r
\r
//todo: make sure this will get instantiated in the right order\r
final static Logger logger = LoggerFactory.getLogger(JDBCTools.class);\r
+ private static final CharSequence URL_DATABASE_NAME = "${DatabaseName}";\r
private static String JDBC_URL_DATABASE_SEPARATOR = "\\/";\r
\r
- public static DataSource getDataSource(String repositoryName) throws NamingException {\r
+ public static DataSource getDataSource(String dataSourceName) throws NamingException {\r
DataSource result = null;\r
\r
//\r
// First, see if we already have this DataSource instance cached\r
//\r
- result = cachedDataSources.get(repositoryName);\r
+ result = cachedDataSources.get(dataSourceName);\r
if (result == null) { \r
InitialContext ctx = new InitialContext();\r
Context envCtx = null;\r
\r
if (logger.isDebugEnabled() == true) {\r
- logger.debug("Looking up DataSource instance in JNDI with name: " + repositoryName);\r
+ logger.debug("Looking up DataSource instance in JNDI with name: " + dataSourceName);\r
}\r
\r
try {\r
envCtx = (Context) ctx.lookup("java:comp/env");\r
- DataSource ds = (DataSource) envCtx.lookup("jdbc/" + repositoryName);\r
+ DataSource ds = (DataSource) envCtx.lookup("jdbc/" + dataSourceName);\r
if (ds == null) {\r
- throw new IllegalArgumentException("DataSource instance not found: " + repositoryName);\r
+ throw new IllegalArgumentException("DataSource instance not found: " + dataSourceName);\r
} else {\r
result = ds;\r
// now cache this DataSource instance for future references\r
- cachedDataSources.put(repositoryName, result);\r
+ cachedDataSources.put(dataSourceName, result);\r
}\r
} finally {\r
if (ctx != null) {\r
try {\r
ctx.close();\r
} catch (Exception e) {\r
- logger.error("Error getting DataSource for: " + repositoryName, e);\r
+ logger.error("Error getting DataSource for: " + dataSourceName, e);\r
}\r
}\r
if (envCtx != null) {\r
try {\r
envCtx.close();\r
} catch (Exception e) {\r
- logger.error("Error getting DataSource for: " + repositoryName, e);\r
+ logger.error("Error getting DataSource for: " + dataSourceName, e);\r
}\r
}\r
}\r
}\r
\r
+ if (result != null) {\r
+// DataSource resultClone = result.\r
+ }\r
+ \r
return result;\r
}\r
\r
- /*\r
- * This is a wrapper around DataSource's getConnectionMethod -mainly exists modularize all connection related code to JDBCTool class.\r
- */\r
- public static Connection getConnection(DataSource dataSource) throws SQLException {\r
- Connection result = null;\r
- result = dataSource.getConnection();\r
- return result;\r
- }\r
-\r
- public static Connection getConnection(String repositoryName) throws NamingException, SQLException {\r
+ public static Connection getConnection(String dataSourceName, String repositoryName) throws NamingException, SQLException {\r
Connection result = null;\r
\r
- if (Tools.isEmpty(repositoryName)) {\r
- repositoryName = getDefaultRepositoryName();\r
- if (logger.isWarnEnabled() == true) {\r
- logger.warn("getConnection() method was called with an empty or null repository name. Using " + repositoryName + " instead.");\r
- }\r
+ if (Tools.isEmpty(dataSourceName) || Tools.isEmpty(repositoryName)) {\r
+ String errMsg = String.format(\r
+ "The getConnection() method was called with an empty or null repository name = '%s' and/or data source name = '%s'.", \r
+ dataSourceName, repositoryName);\r
+ logger.error(errMsg);\r
+ throw new NamingException(errMsg);\r
}\r
+ \r
+ // FIXME: REM - We can rid ourselves of this special case by using the DEFAULT_NUXEO_DATABASE_NAME as the default\r
+ // value for the "repositoryName" attribute in the tenant bindings XSD (XML Schema) definition.\r
+ //\r
+ // *Special Case* - Nuxeo's default repository name is "default" but the database is called "nuxeo"\r
+ //\r
+ if (dataSourceName.equals(JDBCTools.NUXEO_DATASOURCE_NAME) &&\r
+ repositoryName.equals(JDBCTools.DEFAULT_NUXEO_REPOSITORY_NAME)) {\r
+ repositoryName = DEFAULT_NUXEO_DATABASE_NAME;\r
+ }\r
\r
- DataSource ds = getDataSource(repositoryName);\r
- Connection conn = getConnection(ds);\r
- result = conn;\r
- \r
+ /*\r
+ * We synch this block as a workaround to not have separate DataSource instances for\r
+ * each Nuxeo repo/DB. Ideally, we should replace the need for this synch block by\r
+ * registering a separate DataSource for each repo/db at init/start-up time.\r
+ * \r
+ * We need to sync because we're changing the URL of the datasource inorder to get the correct\r
+ * connection. The synch prevents different threads from getting the incorrect connection -i.e., one pointing\r
+ * to the wrong URL.\r
+ */\r
+ Connection conn = null;\r
+ synchronized (JDBCTools.class) {\r
+ org.apache.tomcat.dbcp.dbcp.BasicDataSource dataSource = \r
+ (org.apache.tomcat.dbcp.dbcp.BasicDataSource)getDataSource(dataSourceName);\r
+ // Get the template URL value from the JNDI datasource and substitute the databaseName\r
+ String urlTemplate = dataSource.getUrl();\r
+ String connectionUrl = urlTemplate.replace(URL_DATABASE_NAME, repositoryName);\r
+ dataSource.setUrl(connectionUrl);\r
+ \r
+ try {\r
+ conn = dataSource.getConnection();\r
+ result = conn;\r
+ if (logger.isTraceEnabled() == true && conn != null) {\r
+ logger.trace(String.format("Connection made to repository = '%s' using datasource = '%s'", repositoryName, dataSourceName));\r
+ }\r
+ } finally {\r
+ dataSource.setUrl(urlTemplate); // Reset the data source URL value back to the template value\r
+ }\r
+ }\r
+ \r
return result;\r
}\r
\r
}\r
} */\r
\r
- public static int executeUpdate(DataSource dataSource, String sql) throws Exception {\r
+ public static int executeUpdate(String dataSourceName, String repositoryName, String sql) throws Exception {\r
Connection conn = null;\r
Statement stmt = null;\r
try {\r
- conn = getConnection(dataSource);\r
+ conn = getConnection(dataSourceName, repositoryName);\r
stmt = conn.createStatement();\r
int rows = stmt.executeUpdate(sql);\r
stmt.close();\r
* @return the database product name\r
*/\r
public static String getDatabaseProductName() {\r
- if(DBProductName==null) {\r
+ if (DBProductName == null) {\r
Connection conn = null;\r
try {\r
- conn = getConnection(getDefaultRepositoryName()); //FIXME: REM - getDefaultRepositoryName returns the Nuxeo repo name -we should be using the "cspace" repo name\r
+ conn = getConnection(CSPACE_DATASOURCE_NAME, DEFAULT_CSPACE_DATABASE_NAME);\r
DBProductName = conn.getMetaData().getDatabaseProductName();\r
} catch (Exception e) {\r
+ if (logger.isTraceEnabled() == true) {\r
+ logger.trace(String.format("Could not open a connection. DataSource='%s' DB='%s'.",\r
+ CSPACE_DATASOURCE_NAME, DEFAULT_CSPACE_DATABASE_NAME));\r
+ }\r
} finally {\r
try {\r
if (conn != null) {\r
}\r
}\r
}\r
+ \r
return DBProductName;\r
}\r
\r
* @return an enumerated value identifying the database product type\r
* @throws Exception \r
*/\r
- public static DatabaseProductType getDatabaseProductType() throws Exception {\r
- if(DBProductType == DatabaseProductType.UNRECOGNIZED) {\r
- String productName = getDatabaseProductName();\r
- if (productName.matches("(?i).*mysql.*")) {\r
- DBProductType = DatabaseProductType.MYSQL;\r
- } else if (productName.matches("(?i).*postgresql.*")) {\r
- DBProductType = DatabaseProductType.POSTGRESQL;\r
- } else {\r
- throw new Exception("Unrecognized database system " \r
- + productName);\r
- }\r
- }\r
- return DBProductType;\r
- }\r
-\r
- private static String getDefaultRepositoryName() {\r
- return DEFAULT_REPOSITORY_NAME;\r
+ public static DatabaseProductType getDatabaseProductType(String dataSourceName,\r
+ String repositoryName) throws Exception {\r
+ DatabaseProductType result = DatabaseProductType.UNRECOGNIZED;\r
+ \r
+ String productName = getDatabaseProductName();\r
+ if (productName.matches("(?i).*mysql.*")) {\r
+ result = DatabaseProductType.MYSQL;\r
+ } else if (productName.matches("(?i).*postgresql.*")) {\r
+ result = DatabaseProductType.POSTGRESQL;\r
+ } else {\r
+ throw new Exception("Unrecognized database system " \r
+ + productName);\r
+ }\r
+ \r
+ return result;\r
}\r
\r
/**\r
* @return the catalog name.\r
* @throws SQLException \r
*/\r
- public static String getDatabaseName(Connection conn) throws Exception {\r
- String databaseName = "";\r
- if (conn == null) {\r
- return databaseName;\r
- }\r
- DatabaseMetaData metadata = conn.getMetaData();\r
- String urlStr = metadata.getURL();\r
+ public static String getDatabaseName(String dataSourceName,\r
+ String repositoryName,\r
+ Connection conn) throws Exception {\r
+ String databaseName = null;\r
\r
- // Format of the PostgreSQL JDBC URL:\r
- // http://jdbc.postgresql.org/documentation/80/connect.html\r
- if (getDatabaseProductType() == DatabaseProductType.POSTGRESQL) {\r
- String tokens[] = urlStr.split(JDBC_URL_DATABASE_SEPARATOR);\r
- databaseName = tokens[tokens.length - 1];\r
- // Format of the MySQL JDBC URL:\r
- // http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html\r
- // FIXME: the last token could contain optional parameters, not accounted for here.\r
- } else if (getDatabaseProductType() == DatabaseProductType.MYSQL) {\r
- String tokens[] = urlStr.split(JDBC_URL_DATABASE_SEPARATOR);\r
- databaseName = tokens[tokens.length - 1];\r
+ if (conn != null) {\r
+ DatabaseMetaData metadata = conn.getMetaData();\r
+ String urlStr = metadata.getURL();\r
+ \r
+ // Format of the PostgreSQL JDBC URL:\r
+ // http://jdbc.postgresql.org/documentation/80/connect.html\r
+ if (getDatabaseProductType(dataSourceName, repositoryName) == DatabaseProductType.POSTGRESQL) {\r
+ String tokens[] = urlStr.split(JDBC_URL_DATABASE_SEPARATOR);\r
+ databaseName = tokens[tokens.length - 1];\r
+ // Format of the MySQL JDBC URL:\r
+ // http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html\r
+ // FIXME: the last token could contain optional parameters, not accounted for here.\r
+ } else if (getDatabaseProductType(dataSourceName, repositoryName) == DatabaseProductType.MYSQL) {\r
+ String tokens[] = urlStr.split(JDBC_URL_DATABASE_SEPARATOR);\r
+ databaseName = tokens[tokens.length - 1];\r
+ }\r
}\r
+ \r
return databaseName;\r
}\r
\r
\r
import org.apache.commons.logging.Log;\r
import org.apache.commons.logging.LogFactory;\r
+import org.collectionspace.services.config.tenant.RepositoryDomainType;\r
import org.jboss.remoting.InvokerLocator;\r
import org.nuxeo.common.collections.ListenerList;\r
import org.nuxeo.ecm.core.api.repository.Repository;\r
import org.nuxeo.ecm.core.client.ConnectionListener;\r
import org.nuxeo.ecm.core.client.DefaultLoginHandler;\r
import org.nuxeo.ecm.core.client.LoginHandler;\r
+import org.nuxeo.ecm.core.repository.RepositoryDescriptor;\r
import org.nuxeo.ecm.core.schema.SchemaManager;\r
import org.nuxeo.ecm.core.schema.SchemaManagerImpl;\r
import org.nuxeo.ecm.core.schema.TypeProvider;\r
return getRepositoryManager().getRepository(name);\r
}\r
\r
+ /*\r
+ * Open a Nuxeo repo session using the passed in repoDomain and use the default tx timeout period\r
+ */\r
+ public RepositoryInstance openRepository(RepositoryDomainType repoDomain) throws Exception {\r
+ return openRepository(repoDomain.getRepositoryName(), -1);\r
+ }\r
+ \r
+ /*\r
+ * Open a Nuxeo repo session using the passed in repoDomain and use the default tx timeout period\r
+ */\r
+ public RepositoryInstance openRepository(String repoName) throws Exception {\r
+ return openRepository(repoName, -1);\r
+ } \r
+\r
+ /*\r
+ * Open a Nuxeo repo session using the default repo with the specified (passed in) tx timeout period\r
+ */\r
+ @Deprecated\r
public RepositoryInstance openRepository(int timeoutSeconds) throws Exception {\r
return openRepository(null, timeoutSeconds);\r
}\r
\r
+ /*\r
+ * Open a Nuxeo repo session using the default repo with the default tx timeout period\r
+ */\r
+ @Deprecated\r
public RepositoryInstance openRepository() throws Exception {\r
- return openRepository(-1 /*default timeout period*/);\r
+ return openRepository(null, -1 /*default timeout period*/);\r
}\r
\r
- public RepositoryInstance openRepository(String name, int timeoutSeconds) throws Exception {\r
+ public RepositoryInstance openRepository(String repoName, int timeoutSeconds) throws Exception {\r
+ RepositoryInstance result = null;\r
+ \r
if (timeoutSeconds > 0) {\r
TransactionManager transactionMgr = TransactionHelper.lookupTransactionManager();\r
transactionMgr.setTransactionTimeout(timeoutSeconds);\r
}\r
\r
Repository repository = null;\r
- if (name != null) {\r
- repository = getRepositoryManager().getRepository(name);\r
+ if (repoName != null) {\r
+ repository = getRepositoryManager().getRepository(repoName);\r
} else {\r
- repository = getRepositoryManager().getDefaultRepository();\r
+ repository = getRepositoryManager().getDefaultRepository(); // Add a log info statement here stating that since no repo name was given we'll use the default repo instead\r
}\r
- RepositoryInstance repo = newRepositoryInstance(repository);\r
- String key = repo.getSessionId();\r
- repositoryInstances.put(key, repo);\r
- if (logger.isTraceEnabled()) {\r
- logger.trace("Added a new repository instance to our repo list. Current count is now: "\r
- + repositoryInstances.size());\r
+ \r
+ if (repository != null) {\r
+ result = newRepositoryInstance(repository);\r
+ String key = result.getSessionId();\r
+ repositoryInstances.put(key, result);\r
+ if (logger.isTraceEnabled()) {\r
+ logger.trace("Added a new repository instance to our repo list. Current count is now: "\r
+ + repositoryInstances.size());\r
+ }\r
+ } else {\r
+ String errMsg = String.format("Could not open a session to the Nuxeo repository='%s'", repoName);\r
+ logger.error(errMsg);\r
+ throw new Exception(errMsg);\r
}\r
\r
- return repo;\r
+ return result;\r
}\r
\r
public void releaseRepository(RepositoryInstance repo) throws Exception {\r
if (cl == null) {\r
cl = NuxeoClientEmbedded.class.getClassLoader();\r
}\r
- return new RepositoryInstanceHandler(repository).getProxy();\r
+ return new RepositoryInstanceHandler(repository).getProxy(); // Why a proxy here?\r
}\r
\r
public void addConnectionListener(ConnectionListener listener) {\r
\r
import java.io.File;\r
import java.io.IOException;\r
+import java.util.Collection;\r
import java.util.Hashtable;\r
import java.util.Iterator;\r
\r
+import javax.naming.InitialContext;\r
+import javax.naming.NamingException;\r
import javax.servlet.ServletContext;\r
\r
import org.collectionspace.services.config.RepositoryClientConfigType;\r
+import org.collectionspace.services.config.tenant.RepositoryDomainType;\r
import org.collectionspace.services.nuxeo.util.NuxeoUtils;\r
+import org.nuxeo.ecm.core.NXCore;\r
import org.nuxeo.ecm.core.api.DocumentModel;\r
import org.nuxeo.ecm.core.api.DocumentModelList;\r
import org.nuxeo.ecm.core.api.repository.RepositoryInstance;\r
+import org.nuxeo.ecm.core.model.Repository;\r
import org.nuxeo.osgi.application.FrameworkBootstrap;\r
+import org.nuxeo.ecm.core.repository.RepositoryDescriptor;\r
+import org.nuxeo.ecm.core.repository.RepositoryFactory;\r
+import org.nuxeo.ecm.core.storage.sql.ra.ConnectionFactoryImpl;\r
+import org.nuxeo.ecm.core.storage.sql.ra.ManagedConnectionFactoryImpl;\r
+\r
import org.slf4j.Logger;\r
import org.slf4j.LoggerFactory;\r
\r
}\r
}\r
}\r
+ \r
+ public String getDatabaseName(String repoName) {\r
+ String result = null;\r
+ \r
+ try {\r
+ this.getRepositoryDescriptor(repoName);\r
+ } catch (Exception e1) {\r
+ // TODO Auto-generated catch block\r
+ e1.printStackTrace();\r
+ }\r
+ \r
+ Repository repository = null;\r
+ try {\r
+ repository = this.lookupRepository(repoName);\r
+ } catch (Exception e) {\r
+ // TODO Auto-generated catch block\r
+ e.printStackTrace();\r
+ }\r
+ ConnectionFactoryImpl connectionFactory = (ConnectionFactoryImpl)repository;\r
+ ManagedConnectionFactoryImpl managedConnectionFactory = connectionFactory.getManagedConnectionFactory();\r
+ String serverUrl = managedConnectionFactory.getServerURL();\r
+ \r
+ return result;\r
+ }\r
\r
/**\r
* releaseRepositorySession releases given repository session\r
* @return RepositoryInstance\r
* @throws java.lang.Exception\r
*/\r
- public RepositoryInstance getRepositorySession() throws Exception {\r
- RepositoryInstance repoSession = getClient().openRepository();\r
- if (logger.isDebugEnabled()) {\r
+ public RepositoryInstance getRepositorySession(RepositoryDomainType repoDomain) throws Exception {\r
+ RepositoryInstance repoSession = getClient().openRepository(repoDomain);\r
+ if (logger.isDebugEnabled() && repoSession != null) {\r
logger.debug("getRepositorySession() opened repository session");\r
+ String repoName = repoDomain.getRepositoryName();\r
+ String databaseName = this.getDatabaseName(repoName); // For debugging purposes only\r
}\r
return repoSession;\r
}\r
\r
+ public Repository lookupRepository(String name) throws Exception {\r
+ Repository repo;\r
+ try {\r
+ // needed by glassfish\r
+ repo = (Repository) new InitialContext().lookup("NXRepository/"\r
+ + name);\r
+ } catch (NamingException e) {\r
+ try {\r
+ // needed by jboss\r
+ repo = (Repository) new InitialContext().lookup("java:NXRepository/"\r
+ + name);\r
+ } catch (NamingException ee) {\r
+ repo = (Repository) NXCore.getRepositoryService().getRepositoryManager().getRepository(\r
+ name);\r
+ }\r
+ }\r
+ if (repo == null) {\r
+ throw new IllegalArgumentException("Repository not found: " + name);\r
+ }\r
+ return repo;\r
+ }\r
+ \r
+ public RepositoryDescriptor getRepositoryDescriptor(String name) throws Exception {\r
+ RepositoryDescriptor repo = null;\r
+\r
+ Iterable<RepositoryDescriptor> descriptorsList = NXCore.getRepositoryService().getRepositoryManager().getDescriptors();\r
+ for (RepositoryDescriptor descriptor : descriptorsList) {\r
+ String homeDir = descriptor.getHomeDirectory();\r
+ String config = descriptor.getConfigurationFile();\r
+ RepositoryFactory factor = descriptor.getFactory();\r
+ }\r
+\r
+ return repo;\r
+ }\r
+ \r
/**\r
* getClient get Nuxeo client for accessing Nuxeo services remotely using\r
* Nuxeo Java (EJB) Remote APIS\r
/**\r
* retrieveWorkspaceIds retrieves all workspace ids from default repository\r
* \r
- * @param tenantDomain\r
- * domain representing tenant\r
+ * @param repoDomain\r
+ * a repository domain for a given tenant - see the tenant bindings XML file for details\r
* @return\r
* @throws java.lang.Exception\r
*/\r
- public Hashtable<String, String> retrieveWorkspaceIds(String tenantDomain)\r
+ public Hashtable<String, String> retrieveWorkspaceIds(RepositoryDomainType repoDomain)\r
throws Exception {\r
RepositoryInstance repoSession = null;\r
Hashtable<String, String> workspaceIds = new Hashtable<String, String>();\r
try {\r
- repoSession = getRepositorySession();\r
+ repoSession = getRepositorySession(repoDomain);\r
DocumentModel rootDoc = repoSession.getRootDocument();\r
- DocumentModelList rootChildrenList = repoSession\r
- .getChildren(rootDoc.getRef());\r
+ DocumentModelList rootChildrenList = repoSession.getChildren(rootDoc.getRef());\r
Iterator<DocumentModel> diter = rootChildrenList.iterator();\r
while (diter.hasNext()) {\r
DocumentModel domain = diter.next();\r
- String domainPath = "/" + tenantDomain;\r
+ String domainPath = "/" + repoDomain.getStorageName();\r
if (!domain.getPathAsString().equalsIgnoreCase(domainPath)) {\r
- continue;\r
+ continue; // If it's not our domain folder/directory then skip it\r
}\r
if (logger.isDebugEnabled()) {\r
logger.debug("domain=" + domain.toString());\r
}\r
- DocumentModelList domainChildrenList = repoSession\r
- .getChildren(domain.getRef());\r
+ DocumentModelList domainChildrenList = repoSession.getChildren(domain.getRef());\r
Iterator<DocumentModel> witer = domainChildrenList.iterator();\r
while (witer.hasNext()) {\r
DocumentModel childNode = witer.next();\r
import org.collectionspace.services.common.document.DocumentWrapper;
import org.collectionspace.services.common.document.DocumentWrapperImpl;
import org.collectionspace.services.common.document.TransactionException;
+import org.collectionspace.services.config.tenant.RepositoryDomainType;
import org.nuxeo.common.utils.IdUtils;
import org.nuxeo.ecm.core.api.ClientException;
}
@Override
- public Hashtable<String, String> retrieveWorkspaceIds(String domainName) throws Exception {
- return NuxeoConnectorEmbedded.getInstance().retrieveWorkspaceIds(domainName);
+ public Hashtable<String, String> retrieveWorkspaceIds(RepositoryDomainType repoDomain) throws Exception {
+ return NuxeoConnectorEmbedded.getInstance().retrieveWorkspaceIds(repoDomain);
}
@Override
- public String createDomain(String domainName) throws Exception {
+ public String createDomain(RepositoryDomainType repositoryDomain) throws Exception {
RepositoryInstance repoSession = null;
String domainId = null;
try {
+ //
+ // Open a connection to the domain's repo/db
+ //
+ String repoName = repositoryDomain.getRepositoryName();
+ repoSession = getRepositorySession(repoName); // domainName=storageName=repoName=databaseName
//
// First create the top-level domain directory
//
- repoSession = getRepositorySession(null);
+ String domainName = repositoryDomain.getStorageName();
DocumentRef parentDocRef = new PathRef("/");
DocumentModel parentDoc = repoSession.getDocument(parentDocRef);
DocumentModel domainDoc = repoSession.createDocumentModel(parentDoc.getPathAsString(),
}
} catch (Exception e) {
if (logger.isDebugEnabled()) {
- logger.debug("Could not create tenant domain name=" + domainName + " caught exception ", e);
+ logger.debug("Could not create tenant domain name=" + repositoryDomain.getStorageName() + " caught exception ", e);
}
throw e;
} finally {
}
@Override
- public String getDomainId(String domainName) throws Exception {
+ public String getDomainId(RepositoryDomainType repositoryDomain) throws Exception {
String domainId = null;
RepositoryInstance repoSession = null;
- if (domainName != null && !domainName.isEmpty()) {
+ String repoName = repositoryDomain.getRepositoryName();
+ String domainStorageName = repositoryDomain.getStorageName();
+ if (domainStorageName != null && !domainStorageName.isEmpty()) {
try {
- repoSession = getRepositorySession(null);
- DocumentRef docRef = new PathRef(
- "/" + domainName);
+ repoSession = getRepositorySession(repoName);
+ DocumentRef docRef = new PathRef("/" + domainStorageName);
DocumentModel domain = repoSession.getDocument(docRef);
domainId = domain.getId();
} catch (Exception e) {
if (logger.isTraceEnabled()) {
- logger.trace("Caught exception ", e);
+ logger.trace("Caught exception ", e); // The document doesn't exist, this let's us know we need to create it
}
//there is no way to identify if document does not exist due to
//lack of typed exception for getDocument method
* @see org.collectionspace.services.common.repository.RepositoryClient#createWorkspace(java.lang.String, java.lang.String)
*/
@Override
- public String createWorkspace(String domainName, String workspaceName) throws Exception {
+ public String createWorkspace(RepositoryDomainType repositoryDomain, String workspaceName) throws Exception {
RepositoryInstance repoSession = null;
String workspaceId = null;
try {
- repoSession = getRepositorySession(null);
- DocumentModel parentDoc = getWorkspacesRoot(repoSession, domainName);
+ String repoName = repositoryDomain.getRepositoryName();
+ repoSession = getRepositorySession(repoName);
+ String domainStorageName = repositoryDomain.getStorageName();
+ DocumentModel parentDoc = getWorkspacesRoot(repoSession, domainStorageName);
if (logger.isTraceEnabled()) {
for (String facet : parentDoc.getFacets()) {
- logger.debug("Facet: " + facet);
+ logger.trace("Facet: " + facet);
}
}
* @see org.collectionspace.services.common.repository.RepositoryClient#getWorkspaceId(java.lang.String, java.lang.String)
*/
@Override
+ @Deprecated
public String getWorkspaceId(String tenantDomain, String workspaceName) throws Exception {
String workspaceId = null;
RepositoryInstance repoSession = null;
try {
- repoSession = getRepositorySession(null);
+ repoSession = getRepositorySession((ServiceContext)null);
DocumentRef docRef = new PathRef(
"/" + tenantDomain
+ "/" + NuxeoUtils.Workspaces
return workspaceId;
}
-
+ public RepositoryInstance getRepositorySession(ServiceContext ctx) throws Exception {
+ return getRepositorySession(ctx, ctx.getRepositoryName());
+ }
+
+ public RepositoryInstance getRepositorySession(String repoName) throws Exception {
+ return getRepositorySession(null, repoName);
+ }
+
/**
- * Gets the repository session. - Package access only.
+ * Gets the repository session. - Package access only. If the 'ctx' param is null then the repo name must be non-mull and vice-versa
*
* @return the repository session
* @throws Exception the exception
*/
- public RepositoryInstance getRepositorySession(ServiceContext ctx) throws Exception {
+ public RepositoryInstance getRepositorySession(ServiceContext ctx, String repoName) throws Exception {
RepositoryInstance repoSession = null;
Profiler profiler = new Profiler("getRepositorySession():", 2);
profiler.start();
-
+ //
+ // To get a connection to the Nuxeo repo, we need either a valid ServiceContext instance or a repository name
+ //
if (ctx != null) {
- repoSession = (RepositoryInstance)ctx.getCurrentRepositorySession();
- if (logger.isDebugEnabled() == true) {
- if (repoSession != null) {
- logger.warn("Reusing the current context's repository session.");
- }
- }
- }
-
- // If we couldn't find a repoSession from the service context then we need to create a new one
+ repoName = ctx.getRepositoryName(); // Notice we are overriding the passed in 'repoName' since we have a valid service context passed in to us
+ repoSession = (RepositoryInstance)ctx.getCurrentRepositorySession(); // Look to see if one exists in the context before creating one
+ } else if (repoName == null || repoName.trim().isEmpty()) {
+ String errMsg = String.format("We can't get a connection to the Nuxeo repo because the service context passed in was null and no repository name was passed in either.");
+ logger.error(errMsg);
+ throw new Exception(errMsg);
+ }
+ //
+ // If we couldn't find a repoSession from the service context (or the context was null) then we need to create a new one using
+ // just the repo name
+ //
if (repoSession == null) {
NuxeoClientEmbedded client = NuxeoConnectorEmbedded.getInstance().getClient();
- repoSession = client.openRepository();
+ repoSession = client.openRepository(repoName);
+ } else {
+ if (logger.isDebugEnabled() == true) {
+ logger.warn("Reusing the current context's repository session.");
+ }
}
if (logger.isTraceEnabled()) {
LoginContext loginContext = null;
try {
loginContext = Framework.login();
+ //
+ // Loop through every tenant bindings file
+ //
for (TenantBindingType tenantBinding : tenantBindings.values()) {
setup(tenantBinding);
}
* @param repositoryDomain
* @throws Exception
*/
- synchronized private void createDomain(TenantBindingType tenantBinding,
+ synchronized private String createDomain(TenantBindingType tenantBinding,
RepositoryDomainType repositoryDomain) throws Exception {
- String domainName = repositoryDomain.getName();
+ String result = null;
+
RepositoryClient repositoryClient = getRepositoryClient(repositoryDomain);
- String domainId = repositoryClient.getDomainId(repositoryDomain.getStorageName());
+ String domainStorageName = repositoryDomain.getStorageName();
+ String domainId = repositoryClient.getDomainId(repositoryDomain);
+
if (domainId == null) {
- domainId = repositoryClient.createDomain(repositoryDomain.getStorageName());
+ // If we didn't find it then we need to create it
+ domainId = repositoryClient.createDomain(repositoryDomain);
if (logger.isDebugEnabled()) {
- logger.debug("Created repository domain for " + domainName
+ logger.debug("Created repository domain for " + domainStorageName
+ " id=" + domainId);
}
if (logger.isTraceEnabled()) {
- String checkDomainId = repositoryClient.getDomainId(repositoryDomain.getStorageName());
- logger.trace("Fetched repository domain for " + domainName
+ String checkDomainId = repositoryClient.getDomainId(repositoryDomain);
+ logger.trace("Fetched repository domain for " + domainStorageName
+ " fetchedId=" + checkDomainId);
- // Now try to fetch the workspace
}
} else {
if (logger.isDebugEnabled()) {
- logger.debug("Found repository domain for " + domainName
+ logger.debug("Found repository storage domain for " + domainStorageName
+ " id=" + domainId);
}
}
+
+ result = domainId;
+ return result;
}
/**
//retrieve all workspace ids for a domain
//domain specific table of workspace name and id
Hashtable<String, String> workspaceIds =
- repositoryClient.retrieveWorkspaceIds(repositoryDomain.getStorageName());
+ repositoryClient.retrieveWorkspaceIds(repositoryDomain);
//verify if workspace exists for each service from the tenant binding
for (ServiceBindingType serviceBinding : tenantBinding.getServiceBindings()) {
String serviceName = serviceBinding.getName();
+ " in repository. Creating new workspace ...");
}
workspaceId = repositoryClient.createWorkspace(
- repositoryDomain.getStorageName(),
+ repositoryDomain,
serviceBinding.getName());
if (workspaceId == null) {
if (logger.isWarnEnabled()) {
--- /dev/null
+/*
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+ *
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+ *
+ * Copyright © 2009 Regents of the University of California
+ *
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+ *
+ * You may obtain a copy of the ECL 2.0 License at
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+ */
+
+/*
+ * create_id_generators_table.sql
+ *
+ * Creates the "id_generators" table, used by the ID Service,
+ * and sets the access permissions of that table.
+ *
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ */
+
+-- DROP TABLE IF EXISTS `id_generators`;
+
+CREATE TABLE IF NOT EXISTS `id_generators` (
+ `csid` varchar(80) PRIMARY KEY,
+ `displayname` varchar(80),
+ `description` varchar(500),
+ `priority` smallint(1) DEFAULT 9 NOT NULL,
+ `id_generator_state` varchar(8000) NOT NULL,
+ `last_generated_id` varchar(255),
+ `modified` timestamp NOT NULL
+ default CURRENT_TIMESTAMP
+ on update CURRENT_TIMESTAMP,
+ INDEX `csid_index` (`csid`)
+) ENGINE=InnoDB;
+
+
+SHOW WARNINGS;
--- /dev/null
+/*
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+ *
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+ *
+ * Copyright © 2009 Regents of the University of California
+ *
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+ *
+ * You may obtain a copy of the ECL 2.0 License at
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+ */
+
+/*
+ * load_id_generators_table.sql
+ *
+ * Loads a default set of data into the "id_generators" table,
+ * used by the ID Service.
+ *
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ */
+
+/*
+ * Note: in the priority column, values range from '1' (highest)
+ * to '9' (lowest).
+ */
+
+/*
+ * NOTE: In the id_generator_state column, for numeric sequence parts
+ * whose first generated value should start at the initial value
+ * (such as '1'), enter '-1' for the <currentValue>
+ *
+ * Otherwise, the first generated value will be the next value
+ * in the sequence after the initial value (e.g. '2', if the
+ * initial value is '1').
+ */
+
+-- ACCESSION_LOT_NUMBER
+
+INSERT IGNORE INTO `id_generators`
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('1a67470b-19b1-4ae3-88d4-2a0aa936270e',
+ 'Accession Activity Number',
+ 'Identifies accession activities, in which a lot of
+one or more collection objects is acquired by the institution.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+-- ACCESSION_NUMBER
+
+INSERT IGNORE INTO `id_generators`
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('9dd92952-c384-44dc-a736-95e435c1759c',
+ 'Accession Number',
+ 'Identifies individual collection objects formally
+acquired by the institution. Used for collection objects
+without parts.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+-- ARCHIVES_NUMBER
+
+INSERT IGNORE INTO `id_generators`
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('70586d30-9dca-4a07-a3a2-1976fe898028',
+ 'Archives Number',
+ 'Identifies archives-related accession activities,
+in which a lot of one or more collection objects is formally
+acquired for the archives.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>AR</initialValue>
+ <currentValue>AR</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+-- EVALUATION_NUMBER
+
+INSERT IGNORE INTO `id_generators`
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('d2d80822-25c7-4c7c-a105-fc40cdb0c50f',
+ 'Evaluation Number',
+ 'Identifies evaluation-related intake activities,
+in which a lot of one or more collection objects is formally
+acquired for evaluation.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>EV</initialValue>
+ <currentValue>EV</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+-- INTAKE_NUMBER
+
+INSERT IGNORE INTO `id_generators`
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('8088cfa5-c743-4824-bb4d-fb11b12847f7',
+ 'Intake Number',
+ 'Identifies intake activities, in which a lot of one
+or more collection objects enters the institution.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>IN</initialValue>
+ <currentValue>IN</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+-- INTAKE_OBJECT_NUMBER
+
+INSERT IGNORE INTO `id_generators`
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('a91db555-5c53-4996-9918-6712351397a0',
+ 'Intake Object Number',
+ 'Identifies individual collection objects that enter
+the institution through intake activities, before they are
+either returned to their owner or formally acquired.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>IN</initialValue>
+ <currentValue>IN</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+-- INVENTORY_NUMBER
+
+INSERT IGNORE INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('6d472be6-2534-47f3-a3f1-3f160e7a9303',
+ 'Inventory Number',
+ 'Unambiguously identifies a location associated with an inventory event.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>INV</initialValue>
+ <currentValue>INV</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+-- LIBRARY_NUMBER
+
+INSERT IGNORE INTO `id_generators`
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('80fedaf6-1647-4f30-9f53-a75a3cac2ffd',
+ 'Library Number',
+ 'Identifies library-related accession activities,
+in which a lot of one or more collection objects is
+formally acquired for the library.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>LIB</initialValue>
+ <currentValue>LIB</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+-- LOANS_IN_NUMBER
+
+INSERT IGNORE INTO `id_generators`
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('ed87e7c6-0678-4f42-9d33-f671835586ef',
+ 'Loan In Number',
+ 'Identifies activities in which collection objects are
+received on loan.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>LI</initialValue>
+ <currentValue>LI</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+-- LOANS_OUT_NUMBER
+
+INSERT IGNORE INTO `id_generators`
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('4b984865-f93d-4481-b874-3dba863ec589',
+ 'Loan Out Number',
+ 'Identifies activities in which collection objects are
+loaned out of the institution.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>LO</initialValue>
+ <currentValue>LO</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+-- LOCATION_NUMBER
+
+INSERT IGNORE INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('1fc5e383-0786-4126-9a3c-ec7df4517ee3',
+ 'Location Number',
+ 'Unambiguously identifies a general location, not associated with an
+inventory or movement event.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>LOC</initialValue>
+ <currentValue>LOC</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+-- MEDIA_RESOURCE_IDENTIFICATION_NUMBER
+
+INSERT IGNORE INTO `id_generators`
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('cd91d8b8-f346-4925-a425-93e02bd1c5c9',
+ 'Media Resource Identification Number',
+ 'Unambiguously identifies a media resource within a given context.
+Recommended best practice is to identify the resource by means of a string
+conforming to a formal identification system.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>MR</initialValue>
+ <currentValue>MR</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+-- MOVEMENT_REFERENCE_NUMBER
+
+INSERT IGNORE INTO `id_generators`
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('49ca9d8d-7136-47ff-a70e-4a47b9038b70',
+ 'Movement Reference Number',
+ 'Identifies a movement of a collection object or a group of collection objects.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>MV</initialValue>
+ <currentValue>MV</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+-- OBJECT_EXIT_NUMBER
+
+INSERT IGNORE INTO `id_generators`
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('d4eea707-d473-4367-853a-728fbcd9be17',
+ 'Object Exit Number',
+ 'Identifies an exit from the museum of collection objects, via
+transfer or destruction, and the deaccessioning of those objects
+from the museum\'s collections.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>EX</initialValue>
+ <currentValue>EX</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+-- STUDY_NUMBER
+
+INSERT IGNORE INTO `id_generators`
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('0518132e-dd8c-4773-8fa9-07c9af4444ee',
+ 'Study Number',
+ 'Identifies study-related intake activities,
+in which a lot of one or more collection objects is
+formally acquired for study.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>ST</initialValue>
+ <currentValue>ST</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+-- TRANSFER_OF_TITLE_NUMBER
+
+INSERT IGNORE INTO `id_generators`
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('c597a209-5954-4fa6-bf3f-f83c1a0ad586',
+ 'Transfer of Title Number',
+ 'Identifies the transfer of title for one or more collection objects
+to a receiving institution.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>TT</initialValue>
+ <currentValue>TT</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+-- UUID
+
+/*
+ * Note: these are Type 4 UUIDs, whose generation is based on
+ * random and pseudo-random parts.
+ */
+
+INSERT IGNORE INTO `id_generators`
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ VALUES
+ ('1fa40353-05b8-4ae6-82a6-44a18b4f3c12',
+ 'UUID',
+ 'Universally unique identifiers (UUIDs), which may be
+used for CollectionSpace IDs (CSIDs) and any other relevant
+purposes.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.UUIDGeneratorPart>
+ </org.collectionspace.services.id.UUIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>');
+
+SHOW WARNINGS;
--- /dev/null
+/*
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+ *
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+ *
+ * Copyright © 2009-2012 Regents of the University of California
+ *
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+ *
+ * You may obtain a copy of the ECL 2.0 License at
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+ */
+
+/*
+ * create_id_generators_table.sql
+ *
+ * Creates the "id_generators" table, used by the ID Service,
+ * and sets the access permissions of that table.
+ *
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ */
+
+-- DROP TABLE IF EXISTS id_generators;
+
+-- 'CREATE TABLE ... IF NOT EXISTS' requires PostgreSQL 9.1 or later
+CREATE TABLE IF NOT EXISTS id_generators
+(
+ csid character varying(80) NOT NULL,
+ displayname character varying(80),
+ description character varying(500),
+ priority integer NOT NULL DEFAULT 9,
+ id_generator_state character varying(8000) NOT NULL,
+ last_generated_id character varying(255),
+ modified timestamp without time zone NOT NULL DEFAULT now(),
+ CONSTRAINT id_generators_pkey PRIMARY KEY (csid)
+) WITH (
+ OIDS=FALSE -- See http://www.postgresql.org/docs/8.4/static/sql-createtable.html
+);
+
+CREATE OR REPLACE FUNCTION update_modified_column()
+ RETURNS TRIGGER AS
+ 'BEGIN NEW.modified = now(); RETURN NEW; END;'
+ LANGUAGE 'plpgsql';
+
+CREATE TRIGGER update_customer_modtime BEFORE UPDATE
+ ON id_generators FOR EACH ROW EXECUTE PROCEDURE
+ update_modified_column();
+
--- /dev/null
+/*
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+ *
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+ *
+ * Copyright © 2009-2012 Regents of the University of California
+ *
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+ *
+ * You may obtain a copy of the ECL 2.0 License at
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+ */
+
+/*
+ * load_id_generators_table.sql
+ *
+ * Loads a default set of data into the "id_generators" table,
+ * used by the ID Service.
+ *
+ * $LastChangedRevision$
+ * $LastChangedDate$
+ */
+
+/*
+ * Note: in the priority column, values range from '1' (highest)
+ * to '9' (lowest).
+ */
+
+/*
+ * NOTE: In the id_generator_state column, for numeric sequence parts
+ * whose first generated value should start at the initial value
+ * (such as '1'), enter '-1' for the <currentValue>
+ *
+ * Otherwise, the first generated value will be the next value
+ * in the sequence after the initial value (e.g. '2', if the
+ * initial value is '1').
+ */
+
+-- ACCESSION_LOT_NUMBER
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ '1a67470b-19b1-4ae3-88d4-2a0aa936270e',
+ 'Accession Activity Number',
+ 'Identifies accession activities, in which a lot of
+one or more collection objects is acquired by the institution.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE '1a67470b-19b1-4ae3-88d4-2a0aa936270e' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
+
+-- ACCESSION_NUMBER
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ '9dd92952-c384-44dc-a736-95e435c1759c',
+ 'Accession Number',
+ 'Identifies individual collection objects formally
+acquired by the institution. Used for collection objects
+without parts.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE '9dd92952-c384-44dc-a736-95e435c1759c' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
+
+-- ARCHIVES_NUMBER
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ '70586d30-9dca-4a07-a3a2-1976fe898028',
+ 'Archives Number',
+ 'Identifies archives-related accession activities,
+in which a lot of one or more collection objects is formally
+acquired for the archives.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>AR</initialValue>
+ <currentValue>AR</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE '70586d30-9dca-4a07-a3a2-1976fe898028' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
+
+-- EVALUATION_NUMBER
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ 'd2d80822-25c7-4c7c-a105-fc40cdb0c50f',
+ 'Evaluation Number',
+ 'Identifies evaluation-related intake activities,
+in which a lot of one or more collection objects is formally
+acquired for evaluation.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>EV</initialValue>
+ <currentValue>EV</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE 'd2d80822-25c7-4c7c-a105-fc40cdb0c50f' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
+
+-- INTAKE_NUMBER
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ '8088cfa5-c743-4824-bb4d-fb11b12847f7',
+ 'Intake Number',
+ 'Identifies intake activities, in which a lot of one
+or more collection objects enters the institution.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>IN</initialValue>
+ <currentValue>IN</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE '8088cfa5-c743-4824-bb4d-fb11b12847f7' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
+
+-- INTAKE_OBJECT_NUMBER
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ 'a91db555-5c53-4996-9918-6712351397a0',
+ 'Intake Object Number',
+ 'Identifies individual collection objects that enter
+the institution through intake activities, before they are
+either returned to their owner or formally acquired.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>IN</initialValue>
+ <currentValue>IN</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE 'a91db555-5c53-4996-9918-6712351397a0' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
+
+-- INVENTORY_NUMBER
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ '6d472be6-2534-47f3-a3f1-3f160e7a9303',
+ 'Inventory Number',
+ 'Unambiguously identifies a location associated with an inventory event.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>INV</initialValue>
+ <currentValue>INV</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE '6d472be6-2534-47f3-a3f1-3f160e7a9303' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
+
+-- LIBRARY_NUMBER
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ '80fedaf6-1647-4f30-9f53-a75a3cac2ffd',
+ 'Library Number',
+ 'Identifies library-related accession activities,
+in which a lot of one or more collection objects is
+formally acquired for the library.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>LIB</initialValue>
+ <currentValue>LIB</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE '80fedaf6-1647-4f30-9f53-a75a3cac2ffd' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
+
+-- LOANS_IN_NUMBER
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ 'ed87e7c6-0678-4f42-9d33-f671835586ef',
+ 'Loan In Number',
+ 'Identifies activities in which collection objects are
+received on loan.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>LI</initialValue>
+ <currentValue>LI</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE 'ed87e7c6-0678-4f42-9d33-f671835586ef' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
+
+-- LOANS_OUT_NUMBER
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ '4b984865-f93d-4481-b874-3dba863ec589',
+ 'Loan Out Number',
+ 'Identifies activities in which collection objects are
+loaned out of the institution.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>LO</initialValue>
+ <currentValue>LO</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE '4b984865-f93d-4481-b874-3dba863ec589' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
+
+-- LOCATION_NUMBER
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ '1fc5e383-0786-4126-9a3c-ec7df4517ee3',
+ 'Location Number',
+ 'Unambiguously identifies a general location, not associated with an
+inventory or movement event.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>LOC</initialValue>
+ <currentValue>LOC</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE '1fc5e383-0786-4126-9a3c-ec7df4517ee3' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
+
+-- MEDIA_RESOURCE_IDENTIFICATION_NUMBER
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ 'cd91d8b8-f346-4925-a425-93e02bd1c5c9',
+ 'Media Resource Identification Number',
+ 'Unambiguously identifies a media resource within a given context.
+Recommended best practice is to identify the resource by means of a string
+conforming to a formal identification system.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>MR</initialValue>
+ <currentValue>MR</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE 'cd91d8b8-f346-4925-a425-93e02bd1c5c9' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
+
+-- MOVEMENT_REFERENCE_NUMBER
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ '49ca9d8d-7136-47ff-a70e-4a47b9038b70',
+ 'Movement Reference Number',
+ 'Identifies a movement of a collection object or a group of collection objects.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>MV</initialValue>
+ <currentValue>MV</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE '49ca9d8d-7136-47ff-a70e-4a47b9038b70' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
+
+-- OBJECT_EXIT_NUMBER
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ 'd4eea707-d473-4367-853a-728fbcd9be17',
+ 'Object Exit Number',
+ 'Identifies an exit from the museum of collection objects, via
+transfer or destruction, and the deaccessioning of those objects
+from the museum''s collections.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>EX</initialValue>
+ <currentValue>EX</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE 'd4eea707-d473-4367-853a-728fbcd9be17' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
+
+-- STUDY_NUMBER
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ '0518132e-dd8c-4773-8fa9-07c9af4444ee',
+ 'Study Number',
+ 'Identifies study-related intake activities,
+in which a lot of one or more collection objects is
+formally acquired for study.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>ST</initialValue>
+ <currentValue>ST</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE '0518132e-dd8c-4773-8fa9-07c9af4444ee' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
+
+-- TRANSFER_OF_TITLE_NUMBER
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ 'c597a209-5954-4fa6-bf3f-f83c1a0ad586',
+ 'Transfer of Title Number',
+ 'Identifies the transfer of title for one or more collection objects
+to a receiving institution.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>TT</initialValue>
+ <currentValue>TT</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.YearIDGeneratorPart>
+ <currentValue></currentValue>
+ </org.collectionspace.services.id.YearIDGeneratorPart>
+ <org.collectionspace.services.id.StringIDGeneratorPart>
+ <initialValue>.</initialValue>
+ <currentValue>.</currentValue>
+ </org.collectionspace.services.id.StringIDGeneratorPart>
+ <org.collectionspace.services.id.NumericIDGeneratorPart>
+ <maxLength>6</maxLength>
+ <initialValue>1</initialValue>
+ <currentValue>-1</currentValue>
+ </org.collectionspace.services.id.NumericIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE 'c597a209-5954-4fa6-bf3f-f83c1a0ad586' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
+
+-- UUID
+
+/*
+ * Note: these are Type 4 UUIDs, whose generation is based on
+ * random and pseudo-random parts.
+ */
+
+INSERT INTO id_generators
+ (csid, displayname, description, priority, last_generated_id, id_generator_state)
+ SELECT
+ '1fa40353-05b8-4ae6-82a6-44a18b4f3c12',
+ 'UUID',
+ 'Universally unique identifiers (UUIDs), which may be
+used for CollectionSpace IDs (CSIDs) and any other relevant
+purposes.',
+ '9',
+ '',
+'<org.collectionspace.services.id.SettableIDGenerator>
+ <parts>
+ <org.collectionspace.services.id.UUIDGeneratorPart>
+ </org.collectionspace.services.id.UUIDGeneratorPart>
+ </parts>
+</org.collectionspace.services.id.SettableIDGenerator>'
+ WHERE '1fa40353-05b8-4ae6-82a6-44a18b4f3c12' NOT IN
+ (
+ SELECT csid
+ FROM id_generators
+ );
--- /dev/null
+package org.collectionspace.services.common.config;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.collectionspace.services.config.tenant.RepositoryDomainType;
+import org.collectionspace.services.config.tenant.TenantBindingType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ConfigUtils {
+ final static Logger logger = LoggerFactory.getLogger(ConfigUtils.class);
+
+ /*
+ * Returns the list of repository/DB names defined by a tenant bindings file
+ */
+ public static List<String> getRepositoryNameList(TenantBindingType tenantBindingType) {
+ List<String> result = null;
+
+ List<RepositoryDomainType> repoDomainList = tenantBindingType.getRepositoryDomain();
+ if (repoDomainList != null && repoDomainList.isEmpty() == false) {
+ result = new ArrayList<String>();
+ for (RepositoryDomainType repoDomain : repoDomainList) {
+ result.add(repoDomain.getRepositoryName());
+ }
+ }
+
+ return result;
+ }
+
+ public static String getRepositoryName(TenantBindingType tenantBindingType, String domainName) {
+ String result = null;
+
+
+ if (domainName != null && domainName.trim().isEmpty() == false) {
+ List<RepositoryDomainType> repoDomainList = tenantBindingType.getRepositoryDomain();
+ if (repoDomainList != null && repoDomainList.isEmpty() == false) {
+ for (RepositoryDomainType repoDomain : repoDomainList) {
+ if (repoDomain.getName().equalsIgnoreCase(domainName)) {
+ result = repoDomain.getRepositoryName();
+ break; // We found a match so exit the loop
+ }
+ }
+ }
+ } else {
+ logger.error(String.format("No domain name was specified on call to getRepositoryName() method."));
+ }
+
+ if (result == null && logger.isTraceEnabled()) {
+ logger.trace(String.format("Could not find the repository name for tenent name='%s' and domain='%s'",
+ tenantBindingType.getName(), domainName));
+ }
+
+ return result;
+ }
+
+}
<xs:sequence/>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="storageName" type="xs:string" use="required"/>
+ <xs:attribute name="repositoryName" type="xs:string" use="optional" default="default"/>
<xs:attribute name="repositoryClient" type="xs:string" use="optional" default="nuxeo-java"/>
</xs:complexType>
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Mon Dec 28 10:22:09 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Mon Dec 28 10:22:09 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Dec 28 10:22:09 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Dec 28 10:22:09 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:48 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Dec 28 10:22:09 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:47 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Dec 03 15:35:01 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Aug 27 16:35:21 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Aug 27 16:35:21 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Aug 27 16:35:21 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:45 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Aug 27 16:35:21 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:22 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:29 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<projectDescription>\r
- <name>org.collectionspace.services.id.3rdparty</name>\r
- <comment></comment>\r
- <projects>\r
- </projects>\r
- <buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- </buildSpec>\r
- <natures>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
- </natures>\r
-</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:29 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<projectDescription>\r
- <name>nuxeo-platform-collectionspace</name>\r
- <comment>Nuxeo Enterprise Platform: CS extensions</comment>\r
- <projects>\r
- </projects>\r
- <buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- </buildSpec>\r
- <natures>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- </natures>\r
-</projectDescription>\r
+++ /dev/null
-#Wed Apr 08 13:24:46 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-version=1\r
+++ /dev/null
-#Mon Aug 16 14:44:03 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.collectionspace.services</groupId>
<artifactId>org.collectionspace.services.id.client</artifactId>
<name>services.id.client</name>
<artifactId>org.collectionspace.services.client</artifactId>
<version>${project.version}</version>
</dependency>
+ <!--
<dependency>
<groupId>org.collectionspace.services</groupId>
<artifactId>org.collectionspace.services.id.service</artifactId>
<scope>test</scope>
<type>jar</type>
</dependency>
+ -->
</dependencies>
<build>
*/
public class IdClient extends AbstractServiceClientImpl<String, String, String, IdProxy> {
+ public static final String SERVICE_NAME = "idgenerators";
+
/* (non-Javadoc)
* @see org.collectionspace.services.client.BaseServiceClient#getServicePathComponent()
*/
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<projectDescription>\r
- <name>org.collectionspace.services.id.jaxb</name>\r
- <comment></comment>\r
- <projects>\r
- </projects>\r
- <buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- </buildSpec>\r
- <natures>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- </natures>\r
-</projectDescription>\r
+++ /dev/null
-#Fri Aug 06 11:17:39 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=false\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:29 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<target name="create_nuxeo_db"
description="create tables(s), indices for id service">
+ <!-- No longer required since we are doing this work at system startup
<sql driver="${db.jdbc.driver.class}"
url="${db.jdbc.nuxeo.url}"
userid="${db.nuxeo.user}"
<pathelement path="${db.driver.jar}"/>
</classpath>
</sql>
+ -->
</target>
<target name="deploy" depends="install"
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.collectionspace.services</groupId>
<artifactId>org.collectionspace.services.id.service</artifactId>
<packaging>jar</packaging>
<name>services.id.service</name>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.collectionspace.services</groupId>
+ <artifactId>org.collectionspace.services.id.client</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
<!-- Cobertura, a tool for identifying the extent of code coverage in test classes
<dependency>
<groupId>org.codehaus.mojo</groupId>
import javax.ws.rs.core.Response.ResponseBuilder;
import javax.ws.rs.core.UriBuilder;
+import org.collectionspace.services.client.PoxPayloadIn;
+import org.collectionspace.services.client.PoxPayloadOut;
+import org.collectionspace.services.common.AbstractCollectionSpaceResourceImpl;
// May at some point instead use
// org.jboss.resteasy.spi.NotFoundException
import org.collectionspace.services.common.XmlTools;
import org.collectionspace.services.common.document.BadRequestException;
import org.collectionspace.services.common.document.DocumentNotFoundException;
+import org.collectionspace.services.common.context.MultipartServiceContextFactory;
+import org.collectionspace.services.common.context.ServiceContext;
+import org.collectionspace.services.common.context.ServiceContextFactory;
+import org.collectionspace.services.client.IdClient;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
// Set the base path component for URLs that access this service.
@Path("/idgenerators")
@Produces(MediaType.TEXT_PLAIN)
-public class IDResource {
+public class IDResource extends AbstractCollectionSpaceResourceImpl<PoxPayloadIn, PoxPayloadOut> {
final Logger logger = LoggerFactory.getLogger(IDResource.class);
final static IDService service = new IDServiceJdbcImpl();
String newId = "";
try {
-
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
// Obtain a new ID from the specified ID generator instance.
- newId = service.createID(csid);
+ newId = service.createID(ctx, csid);
// If the new ID is empty, return an error response.
if (newId == null || newId.trim().isEmpty()) {
ResponseBuilder builder = Response.ok();
Response response = builder.build();
-
+
try {
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
String csid = UUID.randomUUID().toString();
- service.createIDGenerator(csid, xmlPayload);
+ service.createIDGenerator(ctx, csid, xmlPayload);
// Build the URI to be returned in the Location header.
//
Response.created(path.build()).entity("").type(MediaType.TEXT_PLAIN).build();
} catch (Exception e) {
- response =
- Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).type(MediaType.TEXT_PLAIN).build();
+ response = Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
+ e.getMessage()).type(MediaType.TEXT_PLAIN).build();
+ if (logger.isDebugEnabled() == true) {
+ e.printStackTrace();
+ }
}
return response;
String resourceRepresentation = "";
try {
-
- IDGeneratorInstance instance = service.readIDGenerator(csid);
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
+ IDGeneratorInstance instance = service.readIDGenerator(ctx, csid);
Document doc = DocumentHelper.createDocument();
Element root = doc.addElement(ID_GENERATOR_NAME);
String resourceRepresentation = "";
try {
-
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
Map<String, IDGeneratorInstance> generators =
- service.readIDGeneratorsList();
+ service.readIDGeneratorsList(ctx);
// If no ID generator instances were found, return an empty list.
if (generators == null || generators.isEmpty()) {
Response response = builder.build();
try {
- service.deleteIDGenerator(csid);
+ ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext();
+ service.deleteIDGenerator(ctx, csid);
response = Response.ok().entity("").type(MediaType.TEXT_PLAIN).build();
} catch (Exception e) {
response =
return BASE_URL_PATH;
}
}
+
+ @Override
+ public Class<?> getCommonPartClass() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public ServiceContextFactory<PoxPayloadIn, PoxPayloadOut> getServiceContextFactory() {
+ return MultipartServiceContextFactory.get();
+ }
+
+ @Override
+ public String getServiceName() {
+ return IdClient.SERVICE_NAME;
+ }
+
+ @Override
+ protected String getVersionString() {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
import java.util.Map;
+import org.collectionspace.services.client.PoxPayloadIn;
+import org.collectionspace.services.client.PoxPayloadOut;
+import org.collectionspace.services.common.context.ServiceContext;
+
/**
* IDService
*
// Create
// Read single object
// Generates and returns a new ID from the specified ID generator.
- public String createID(String csid) throws Exception;
+ public String createID(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx, String csid) throws Exception;
// Returns the last-generated ID associated with the specified ID generator.
- public String readLastID(String csid)
+ public String readLastID(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx, String csid)
throws Exception;
// Read a list of objects (aka read multiple)
// ----------------------------------------
// Create
// Adds a new ID generator.
- public void createIDGenerator(String csid, String serializedIDGenerator)
- throws Exception;
+ public void createIDGenerator(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx,
+ String csid, String serializedIDGenerator) throws Exception;
// Read single object
- public IDGeneratorInstance readIDGenerator(String csid)
+ public IDGeneratorInstance readIDGenerator(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx, String csid)
throws Exception;
// Read a list of objects (aka read multiple)
// and return a list (map) of those objects and their identifiers.
- public Map<String, IDGeneratorInstance> readIDGeneratorsList()
+ public Map<String, IDGeneratorInstance> readIDGeneratorsList(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx)
throws Exception;
// Update
- public void updateIDGenerator(String csid, String serializedIDGenerator)
- throws Exception;
+ public void updateIDGenerator(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx,
+ String csid,
+ String serializedIDGenerator) throws Exception;
// Delete (possibly not permitted - deactivate instead?)
- public void deleteIDGenerator(String csid)
+ public void deleteIDGenerator(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx, String csid)
throws Exception;
}
package org.collectionspace.services.id;
import java.sql.Connection;
-import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.PreparedStatement;
import javax.naming.NamingException;
import javax.security.auth.login.LoginException;
+
+import org.collectionspace.services.client.PoxPayloadIn;
+import org.collectionspace.services.client.PoxPayloadOut;
+import org.collectionspace.services.common.context.ServiceContext;
import org.collectionspace.services.common.document.BadRequestException;
import org.collectionspace.services.common.document.DocumentNotFoundException;
import org.collectionspace.services.common.storage.JDBCTools;
/**
* Constructor (no-argument).
*/
- public void IDServiceJdbcImpl() {
+ public IDServiceJdbcImpl() {
+ // Empty
}
// -----------------
* @throws IllegalStateException if a storage-related error occurred.
*/
@Override
- public String createID(String csid) throws Exception {
+ public String createID(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx, String csid) throws Exception {
logger.debug("> in createID");
String serializedGenerator = "";
try {
- IDGeneratorInstance generator = readIDGenerator(csid);
+ IDGeneratorInstance generator = readIDGenerator(ctx, csid);
serializedGenerator = generator.getGeneratorState();
// serializedGenerator = readIDGenerator(csid).getGeneratorState();
} catch (DocumentNotFoundException e) {
// Retrieve the last ID associated with this generator
// from persistent storage.
- lastId = readLastID(csid);
+ lastId = readLastID(ctx, csid);
// If there was no last generated ID associated with this generator,
// get a new ID.
}
// Store the 'new' ID as the last-generated ID for this generator.
- updateLastID(csid, newId);
+ updateLastID(ctx, csid, newId);
// Store the new state of this ID generator, reflecting that
// one of its parts may possibly have had its value updated as
// a result of the generation of this 'new' ID.
- updateIDGenerator(csid, generator);
+ updateIDGenerator(ctx, csid, generator);
} catch (DocumentNotFoundException e) {
throw e;
* *
* @throws DocumentNotFoundException if the requested ID generator could not be found.
*/
- public void updateLastID(String csid, String lastId)
- throws IllegalStateException, DocumentNotFoundException, NamingException, SQLException {
+ public void updateLastID(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx, String csid, String lastId)
+ throws IllegalStateException, DocumentNotFoundException, NamingException, SQLException, Exception {
logger.debug("> in updateLastID");
Connection conn = null;
try {
-
- conn = getJdbcConnection();
+ conn = getJdbcConnection(ctx.getRepositoryName());
conn.setAutoCommit(false);
Statement stmt = conn.createStatement();
* @throws IllegalStateException if a storage-related error occurred.
*/
@Override
- public String readLastID(String csid) throws Exception {
+ public String readLastID(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx, String csid) throws Exception {
logger.debug("> in readLastID");
String lastId = null;
Connection conn = null;
try {
-
- conn = getJdbcConnection();
+ String repositoryName = ctx.getRepositoryName();
+ conn = getJdbcConnection(repositoryName);
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(
*
* @throws IllegalStateException if a storage-related error occurred.
*/
- public void createIDGenerator(String csid, SettableIDGenerator generator)
+ private void createIDGenerator(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx, String csid, SettableIDGenerator generator)
throws Exception {
logger.debug("> in createIDGenerator(String, SettableIDGenerator)");
}
try {
- createIDGenerator(csid, serializedGenerator);
+ createIDGenerator(ctx, csid, serializedGenerator);
} catch (IllegalArgumentException e) {
throw e;
} catch (IllegalStateException e) {
* @throws IllegalStateException if a storage-related error occurred.
*/
@Override
- public void createIDGenerator(String csid, String serializedGenerator)
- throws Exception {
+ public void createIDGenerator(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx,
+ String csid, String serializedIDGenerator) throws Exception {
logger.debug("> in createIDGenerator(String, String)");
// @TODO Add checks for authorization to perform this operation.
- if (serializedGenerator == null || serializedGenerator.equals("")) {
+ if (serializedIDGenerator == null || serializedIDGenerator.equals("")) {
throw new BadRequestException(
"Could not understand or parse this representation "
+ "of an ID generator.");
Connection conn = null;
try {
-
- conn = getJdbcConnection();
+ String repositoryName = ctx.getRepositoryName();
+ conn = getJdbcConnection(repositoryName);
Statement stmt = conn.createStatement();
// Test whether this ID generator already exists in the database.
PreparedStatement ps = conn.prepareStatement(SQL_STATEMENT_STRING);
ps.setString(1, csid);
- ps.setString(2, serializedGenerator);
+ ps.setString(2, serializedIDGenerator);
ps.setNull(3, java.sql.Types.VARCHAR);
int rowsUpdated = ps.executeUpdate();
* @throws IllegalStateException if a storage-related error occurred.
*/
@Override
- public IDGeneratorInstance readIDGenerator(String csid) throws Exception {
+ public IDGeneratorInstance readIDGenerator(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx, String csid) throws Exception {
logger.debug("> in readIDGenerator");
Connection conn = null;
try {
-
- conn = getJdbcConnection();
+ conn = getJdbcConnection(ctx.getRepositoryName());
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(
* @throws IllegalStateException if a storage-related error occurred.
*/
@Override
- public Map<String, IDGeneratorInstance> readIDGeneratorsList()
+ public Map<String, IDGeneratorInstance> readIDGeneratorsList(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx)
throws Exception {
logger.debug("> in readIDGeneratorsList");
Connection conn = null;
try {
- conn = getJdbcConnection();
+ conn = getJdbcConnection(ctx.getRepositoryName());
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(
*
* @throws IllegalStateException if a storage-related error occurred.
*/
- public void updateIDGenerator(String csid, SettableIDGenerator generator)
- throws Exception {
+ private void updateIDGenerator(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx,
+ String csid,
+ SettableIDGenerator generator) throws Exception {
logger.debug("> in updateIDGenerator(String, SettableIDGenerator)");
}
try {
- updateIDGenerator(csid, serializedGenerator);
+ updateIDGenerator(ctx, csid, serializedGenerator);
} catch (DocumentNotFoundException e) {
throw e;
} catch (BadRequestException e) {
* @throws IllegalStateException if a storage-related error occurred.
*/
@Override
- public void updateIDGenerator(String csid, String serializedGenerator)
- throws Exception {
+ public void updateIDGenerator(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx,
+ String csid,
+ String serializedIDGenerator) throws Exception {
logger.debug("> in updateIDGenerator(String, String)");
// @TODO: Add checks for authorization to perform this operation.
- if (serializedGenerator == null || serializedGenerator.equals("")) {
+ if (serializedIDGenerator == null || serializedIDGenerator.equals("")) {
throw new BadRequestException(
"Could not understand or parse this representation of an ID generator.");
}
SettableIDGenerator generator;
try {
- generator = IDGeneratorSerializer.deserialize(serializedGenerator);
+ generator = IDGeneratorSerializer.deserialize(serializedIDGenerator);
} catch (IllegalArgumentException e) {
throw e;
}
Connection conn = null;
try {
-
- conn = getJdbcConnection();
+ conn = getJdbcConnection(ctx.getRepositoryName());
conn.setAutoCommit(false);
Statement stmt = conn.createStatement();
+ "WHERE csid = ?";
PreparedStatement ps = conn.prepareStatement(SQL_STATEMENT_STRING);
- ps.setString(1, serializedGenerator);
+ ps.setString(1, serializedIDGenerator);
ps.setString(2, lastId);
ps.setString(3, csid);
* @throws IllegalStateException if a storage-related error occurred.
*/
@Override
- public void deleteIDGenerator(String csid)
+ public void deleteIDGenerator(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx, String csid)
throws Exception {
logger.debug("> in deleteIDGenerator");
Connection conn = null;
try {
-
- conn = getJdbcConnection();
+ conn = getJdbcConnection(ctx.getRepositoryName());
Statement stmt = conn.createStatement();
// Test whether this ID generator already exists in the database.
* @throws LoginException
* @throws SQLException if a storage-related error occurred.
*/
- public Connection getJdbcConnection() throws NamingException, SQLException {
+ public Connection getJdbcConnection(String repositoryName) throws NamingException, SQLException {
logger.debug("> in getJdbcConnection");
Connection conn = null;
try {
- conn = JDBCTools.getConnection(JDBCTools.NUXEO_REPOSITORY_NAME);
+ conn = JDBCTools.getConnection(JDBCTools.NUXEO_DATASOURCE_NAME, repositoryName);
} catch (NamingException e) {
throw e;
} catch (SQLException e) {
* @throws IllegalStateException if an error occurs while checking for the
* existence of the specified table.
*/
- public boolean hasTable(String tablename) throws Exception {
+ private boolean hasTable(ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx, String tablename) throws Exception {
logger.debug("> in hasTable");
Connection conn = null;
try {
-
- conn = getJdbcConnection();
+ conn = getJdbcConnection(ctx.getRepositoryName());
// Retrieve a list of tables in the current database.
final String CATALOG_NAME = null;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.collectionspace.services.client.test;
+package org.collectionspace.services.id;
import java.util.ArrayList;
import java.util.List;
import org.collectionspace.services.client.CollectionSpaceClient;
import org.collectionspace.services.client.IdClient;
+import org.collectionspace.services.client.test.AbstractServiceTestImpl;
+import org.collectionspace.services.client.test.BaseServiceTest;
+import org.collectionspace.services.client.test.ServiceRequestType;
import org.collectionspace.services.common.document.BadRequestException;
import org.collectionspace.services.common.document.DocumentNotFoundException;
import org.collectionspace.services.id.IDGeneratorSerializer;
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Aug 27 16:35:21 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Aug 27 16:35:21 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:45 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Aug 27 16:35:21 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:41 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:22 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Mon Apr 05 14:31:19 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Mon Apr 05 14:31:19 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Apr 05 14:31:19 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Apr 05 14:31:19 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:43 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Apr 05 14:31:19 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Tue Apr 27 21:36:39 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Tue Apr 27 21:36:39 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Tue Apr 27 21:36:39 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Tue Apr 27 21:36:39 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:43 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Tue Apr 27 21:36:39 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<?xml version="1.0" encoding="UTF-8"?>\r
<projectDescription>\r
- <name>org.collectionspace.services.person</name>\r
+ <name>org.collectionspace.services.location</name>\r
<comment></comment>\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:29 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<?xml version="1.0" encoding="UTF-8"?>\r
<projectDescription>\r
- <name>org.collectionspace.services.person.3rdparty</name>\r
+ <name>org.collectionspace.services.location.3rdparty</name>\r
<comment></comment>\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Tue Oct 06 13:25:17 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Jan 04 16:40:35 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:45 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Jan 04 16:40:35 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Dec 03 15:35:01 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Dec 03 15:35:01 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Dec 03 15:35:01 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Dec 03 15:35:02 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:44 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Dec 03 15:35:01 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Tue Apr 27 21:36:39 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Tue Apr 27 21:36:39 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Tue Apr 27 21:36:39 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Tue Apr 27 21:36:39 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:46 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Tue Apr 27 21:36:39 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Mon Dec 28 10:22:09 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Mon Dec 28 10:22:09 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Dec 28 10:22:09 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Dec 28 10:22:09 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:31 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Dec 28 10:22:09 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Aug 27 16:35:21 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Aug 27 16:35:21 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Aug 27 16:35:21 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:45 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Aug 27 16:35:21 PDT 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:29 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Tue Oct 06 13:25:17 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Jan 04 16:40:35 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:38 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<?xml version="1.0" encoding="UTF-8"?>\r
<projectDescription>\r
- <name>org.collectionspace.services.organization.samples</name>\r
+ <name>org.collectionspace.services.organization.client.samples</name>\r
<comment></comment>\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Mon Nov 23 11:53:50 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<name>org.collectionspace.services.organization.client.sample</name>\r
<comment></comment>\r
<projects>\r
- <project>org.collectionspace.services.client</project>\r
</projects>\r
<buildSpec>\r
<buildCommand>\r
<arguments>\r
</arguments>\r
</buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildCommand>\r
</buildSpec>\r
<natures>\r
- <nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
<nature>org.eclipse.jdt.core.javanature</nature>\r
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Wed Sep 16 16:14:17 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Jan 11 15:27:33 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:29 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Tue Oct 06 13:25:17 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Jan 04 16:40:35 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:39 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<?xml version="1.0" encoding="UTF-8"?>\r
<projectDescription>\r
- <name>org.collectionspace.services.person.samples</name>\r
+ <name>org.collectionspace.services.person.client.samples</name>\r
<comment></comment>\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Mon Nov 23 11:53:50 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<name>org.collectionspace.services.person.client.sample</name>\r
<comment></comment>\r
<projects>\r
- <project>org.collectionspace.services.client</project>\r
- <project>org.collectionspace.services.common</project>\r
</projects>\r
<buildSpec>\r
<buildCommand>\r
<arguments>\r
</arguments>\r
</buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildCommand>\r
</buildSpec>\r
<natures>\r
- <nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
<nature>org.eclipse.jdt.core.javanature</nature>\r
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Thu Jan 07 14:30:38 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<name>person.client.sample</name>\r
\r
<dependencies>\r
+ <!-- \r
<dependency>\r
<groupId>org.collectionspace.services</groupId>\r
<artifactId>org.collectionspace.services.person.jaxb</artifactId>\r
<groupId>org.collectionspace.services</groupId>\r
<artifactId>org.collectionspace.services.person.client</artifactId>\r
</dependency>\r
+ -->\r
</dependencies>\r
\r
<repositories>\r
+++ /dev/null
-#Mon Jan 04 16:40:35 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:28 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:28 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<name>org.collectionspace.services.relation</name>\r
<comment></comment>\r
<projects>\r
- <project>org.collectionspace.services.jaxb</project>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:24 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:27 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:27 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:24 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:47 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
@Produces("application/xml")
//@Produces("application/xml;charset=UTF-8")
public class ReportResource extends ResourceBase {
- private static String REPOSITORY_NAME = JDBCTools.NUXEO_REPOSITORY_NAME;
+ private static String REPOSITORY_NAME = JDBCTools.NUXEO_DATASOURCE_NAME;
private static String REPORTS_FOLDER = "reports";
private static String CSID_LIST_SEPARATOR = ",";
final Logger logger = LoggerFactory.getLogger(ReportResource.class);
import org.collectionspace.services.jaxb.InvocableJAXBSchema;
import org.collectionspace.services.nuxeo.client.java.DocHandlerBase;
import org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl;
+import org.jfree.util.Log;
import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.model.PropertyException;
import org.nuxeo.ecm.core.api.repository.RepositoryInstance;
*/
public class ReportDocumentModelHandler extends DocHandlerBase<ReportsCommon> {
private final Logger logger = LoggerFactory.getLogger(ReportDocumentModelHandler.class);
- private static String REPOSITORY_NAME = JDBCTools.NUXEO_REPOSITORY_NAME;
private static String REPORTS_FOLDER = "reports";
private static String CSID_LIST_SEPARATOR = ",";
}
private Connection getConnection() throws NamingException, SQLException {
- return JDBCTools.getConnection(REPOSITORY_NAME);
+ Connection result = null;
+
+ ServiceContext ctx = this.getServiceContext();
+ try {
+ String repositoryName = ctx.getRepositoryName();
+ if (repositoryName != null && repositoryName.trim().isEmpty() == false) {
+ result = JDBCTools.getConnection(JDBCTools.NUXEO_DATASOURCE_NAME, repositoryName);
+ }
+ } catch (Exception e) {
+ Log.error(e);
+ throw new NamingException();
+ }
+
+ return result;
}
}
/** See the class javadoc for this class: it shows the syntax supported in the configuration params.\r
*/\r
@Override\r
- public void onRepositoryInitialized(DataSource dataSource,\r
+ public void onRepositoryInitialized(String dataSourceName,\r
+ String repositoryName,\r
ServiceBindingType sbt, \r
List<Field> fields, \r
- List<Property> properties) throws Exception {\r
+ List<Property> propertyList) throws Exception {\r
//Check for existing privileges, and if not there, grant them\r
- for(Property prop:properties) {\r
+ for(Property prop : propertyList) {\r
if(READ_ROLE_NAME_KEY.equals(prop.getKey())) {\r
String value = prop.getValue();\r
if(Tools.notEmpty(value) && !readerRoleName.equals(value)){\r
Statement stmt = null;\r
String sql = "";\r
try {\r
- DatabaseProductType databaseProductType = JDBCTools.getDatabaseProductType();\r
+ DatabaseProductType databaseProductType = JDBCTools.getDatabaseProductType(dataSourceName, repositoryName);\r
if (databaseProductType == DatabaseProductType.MYSQL) {\r
// Nothing to do: MYSQL already does wildcard grants in init_db.sql\r
} else if(databaseProductType != DatabaseProductType.POSTGRESQL) {\r
throw new Exception("Unrecognized database system " + databaseProductType);\r
} else {\r
+ //\r
+ // FIXME: REM 12/11/2012 - The local 'stmt' is alway null? An exception will always get thrown inside\r
+ // this clause\r
+ //\r
sql = "REVOKE SELECT ON ALL TABLES IN SCHEMA public FROM "+readerRoleName;\r
stmt.execute(sql);\r
sql = "GRANT SELECT ON ALL TABLES IN SCHEMA public TO "+readerRoleName;\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<projectDescription>\r
- <name>org.collectionspace.services.sdk</name>\r
- <comment></comment>\r
- <projects>\r
- </projects>\r
- <buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- </buildSpec>\r
- <natures>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
- </natures>\r
-</projectDescription>\r
+++ /dev/null
-#Mon Jan 04 16:40:40 PST 2010\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<projectDescription>\r
- <name>org.collectionspace.services.client.sample</name>\r
- <comment></comment>\r
- <projects>\r
- <project>org.collectionspace.services.client</project>\r
- <project>org.collectionspace.services.collectionobject.client</project>\r
- <project>org.collectionspace.services.collectionobject.jaxb</project>\r
- <project>org.collectionspace.services.common</project>\r
- </projects>\r
- <buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- </buildSpec>\r
- <natures>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- </natures>\r
-</projectDescription>\r
+++ /dev/null
-#Wed Sep 16 16:14:17 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Mon Dec 28 10:22:12 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Mon Dec 28 10:22:12 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:29 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Tue Oct 06 13:25:17 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:30 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Wed Jan 19 22:49:37 PST 2011\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<?xml version="1.0" encoding="UTF-8"?>\r
<projectDescription>\r
- <name>org.collectionspace.services.vocabulary.samples</name>\r
+ <name>org.collectionspace.services.vocabulary.client.samples</name>\r
<comment></comment>\r
<projects>\r
</projects>\r
<buildSpec>\r
- <buildCommand>\r
- <name>org.eclipse.jdt.core.javabuilder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildSpec>\r
<natures>\r
<nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.eclipse.jdt.core.javanature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Mon Nov 23 11:53:50 PST 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
<arguments>\r
</arguments>\r
</buildCommand>\r
- <buildCommand>\r
- <name>org.maven.ide.eclipse.maven2Builder</name>\r
- <arguments>\r
- </arguments>\r
- </buildCommand>\r
<buildCommand>\r
<name>org.eclipse.m2e.core.maven2Builder</name>\r
<arguments>\r
</buildCommand>\r
</buildSpec>\r
<natures>\r
- <nature>org.eclipse.m2e.core.maven2Nature</nature>\r
- <nature>org.maven.ide.eclipse.maven2Nature</nature>\r
<nature>org.eclipse.jdt.core.javanature</nature>\r
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>\r
</natures>\r
</projectDescription>\r
+++ /dev/null
-#Wed Sep 16 16:14:17 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r
+++ /dev/null
-#Fri Sep 11 17:00:29 PDT 2009\r
-activeProfiles=\r
-eclipse.preferences.version=1\r
-fullBuildGoals=process-test-resources\r
-includeModules=false\r
-resolveWorkspaceProjects=true\r
-resourceFilterGoals=process-resources resources\:testResources\r
-skipCompilerPlugin=true\r
-version=1\r