From: Richard Millet Date: Fri, 14 Dec 2012 17:56:07 +0000 (-0800) Subject: CSPACE-4979: Merge of multi-repo work with master branch. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=11d95c48c25e94c080f080da00cc1528447ace1c;p=tmp%2Fjakarta-migration.git CSPACE-4979: Merge of multi-repo work with master branch. --- diff --git a/.gitignore b/.gitignore index 013f41ab2..6224def26 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +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 diff --git a/.project b/.project index aee48444d..5cd13a441 100644 --- a/.project +++ b/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/.settings/org.maven.ide.eclipse.prefs b/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 36a715a07..000000000 --- a/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Thu Oct 15 12:20:09 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/3rdparty/.project b/3rdparty/.project index 7abb84ea5..85949a7f9 100644 --- a/3rdparty/.project +++ b/3rdparty/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/3rdparty/.settings/org.maven.ide.eclipse.prefs b/3rdparty/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 36a715a07..000000000 --- a/3rdparty/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Thu Oct 15 12:20:09 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/3rdparty/nuxeo/.project b/3rdparty/nuxeo/.project index b620a1410..8fb749d17 100644 --- a/3rdparty/nuxeo/.project +++ b/3rdparty/nuxeo/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/3rdparty/nuxeo/.settings/org.maven.ide.eclipse.prefs b/3rdparty/nuxeo/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 36a715a07..000000000 --- a/3rdparty/nuxeo/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Thu Oct 15 12:20:09 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/3rdparty/nuxeo/nuxeo-platform-collectionspace/.settings/org.maven.ide.eclipse.prefs b/3rdparty/nuxeo/nuxeo-platform-collectionspace/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 36a715a07..000000000 --- a/3rdparty/nuxeo/nuxeo-platform-collectionspace/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Thu Oct 15 12:20:09 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/3rdparty/nuxeo/nuxeo-platform-collectionspace/pom.xml b/3rdparty/nuxeo/nuxeo-platform-collectionspace/pom.xml index 330262695..27645948b 100644 --- a/3rdparty/nuxeo/nuxeo-platform-collectionspace/pom.xml +++ b/3rdparty/nuxeo/nuxeo-platform-collectionspace/pom.xml @@ -9,7 +9,6 @@ 4.0.0 - org.collectionspace.services org.collectionspace.services.3rdparty.nuxeo.collectionspace_core Nuxeo CollectionSpace core extension Nuxeo Enterprise Platform: CS extensions @@ -19,7 +18,6 @@ org.apache.maven.plugins maven-jar-plugin - 2.2 src/main/resources/META-INF/MANIFEST.MF diff --git a/3rdparty/nuxeo/nuxeo-platform-quote-api/.settings/org.maven.ide.eclipse.prefs b/3rdparty/nuxeo/nuxeo-platform-quote-api/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index dd98a84d9..000000000 --- a/3rdparty/nuxeo/nuxeo-platform-quote-api/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Wed Jan 19 22:49:05 PST 2011 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/3rdparty/nuxeo/nuxeo-platform-quote/.settings/org.maven.ide.eclipse.prefs b/3rdparty/nuxeo/nuxeo-platform-quote/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 440c8ac69..000000000 --- a/3rdparty/nuxeo/nuxeo-platform-quote/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Wed Jan 19 22:49:06 PST 2011 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/3rdparty/nuxeo/nuxeo-server/5.5-HF07/config/lifesci-domain-repo-config.xml b/3rdparty/nuxeo/nuxeo-server/5.5-HF07/config/lifesci-domain-repo-config.xml new file mode 100644 index 000000000..279075a40 --- /dev/null +++ b/3rdparty/nuxeo/nuxeo-server/5.5-HF07/config/lifesci-domain-repo-config.xml @@ -0,0 +1,419 @@ + + + + + + + + + @XA_DATASOURCE@ + jdbc:postgresql://localhost:5432/lifesci-domain + @DB_SERVER_HOSTNAME@ + lifesci-domain + @NUXEO_USER@ + @NUXEO_PW@ + + + imd:user_comment + note + webp:content + webc:welcomeText + comment:comment + post + mail:mail + + + + + + + + + + acquisitionFundingSourceProvisos + acquisitions_common:acquisitionNote + acquisitions_common:acquisitionProvisos + acquisitions_common:acquisitionReason + acquisitions_common:creditLine + + + + + + + + + + + + + + + + + + numberValue + + + collectionobjects_common:briefDescriptions + + + + collectionobjects_common:comments + + collectionobjects_common:distinguishingFeatures + + + objectNameNote + + title + titleTranslation + + + + + collectionobjects_common:ageQualifier + collectionobjects_common:color + collectionobjects_common:contentDescription + + collectionobjects_common:contentNote + collectionobjects_common:contentObject + collectionobjects_common:copyNumber + collectionobjects_common:editionNumber + + + + collectionobjects_common:inscriptionContent + + collectionobjects_common:inscriptionContentInterpretation + + collectionobjects_common:inscriptionContentTranslation + + collectionobjects_common:inscriptionContentTransliteration + + + + + collectionobjects_common:inscriptionDescriptionInterpretation + + + materialComponentNote + materialName + + + collectionobjects_common:physicalDescription + + + objectComponentInformation + + + + + collectionobjects_common:objectProductionNote + + + + collectionobjects_common:objectProductionReason + + + + + + assocActivityNote + assocConceptNote + assocCulturalContextNote + assocDateNote + + + + collectionobjects_common:assocEventName + collectionobjects_common:assocEventNote + collectionobjects_common:assocEventType + + assocObject + assocOrganizationNote + assocPeopleNote + assocPersonNote + assocPlaceNote + + collectionobjects_common:objectHistoryNote + + collectionobjects_common:ownershipExchangeNote + + usageNote + + + + + collectionobjects_common:ownersPersonalExperience + + collectionobjects_common:ownersPersonalResponse + + + + collectionobjects_common:ownersReference + + collectionobjects_common:ownersContributionNote + + + + + + collectionobjects_common:viewersRole + collectionobjects_common:viewersPersonalExperience + + collectionobjects_common:viewersPersonalResponse + + + + collectionobjects_common:viewersReference + + collectionobjects_common:viewersContributionNote + + + + + + collectionobjects_common:catalogNumber + + + + + collectionobjects_common:fieldCollectionNote + + collectionobjects_common:fieldCollectionNumber + + + + + collectionobjects_common:objectNumber + collectionobjects_common:numberOfObjects + collectionobjects_common:collection + collectionobjects_common:recordStatus + collectionobjects_common:age + collectionobjects_common:ageQualifier + collectionobjects_common:ageUnit + + collectionobjects_common:contentDate + collectionobjects_common:contentLanguages + collectionobjects_common:contentOrganizations + + + collectionobjects_common:dimensionSummary + + + + + collectionobjects_common:dimension + collectionobjects_common:dimensionMeasuredPart + + collectionobjects_common:dimensionMeasurementUnit + + collectionobjects_common:dimensionValue + collectionobjects_common:dimensionValueDate + + collectionobjects_common:dimensionValueQualifier + + + collectionobjects_common:editionNumber + + collectionobjects_common:inscriptionContentInscriber + + collectionobjects_common:inscriptionContentDate + + collectionobjects_common:inscriptionContentLanguage + + collectionobjects_common:inscriptionContentMethod + + collectionobjects_common:inscriptionContentPosition + + collectionobjects_common:inscriptionContentScript + + collectionobjects_common:inscriptionContentType + + + collectionobjects_common:inscriptionDescription + + collectionobjects_common:inscriptionDescriptionInscriber + + collectionobjects_common:inscriptionDescriptionDate + + collectionobjects_common:inscriptionDescriptionMethod + + collectionobjects_common:inscriptionDescriptionPosition + + collectionobjects_common:inscriptionDescriptionType + + + collectionobjects_common:objectStatus + collectionobjects_common:phase + collectionobjects_common:sex + collectionobjects_common:ownershipAccess + collectionobjects_common:ownershipCategory + + collectionobjects_common:ownershipDates + collectionobjects_common:ownershipExchangeMethod + + collectionobjects_common:ownershipExchangePriceCurrency + + collectionobjects_common:ownershipExchangePriceValue + + collectionobjects_common:ownershipPlace + collectionobjects_common:fieldCollectionNumber + + collectionobjects_common:fieldCollectionMethod + + collectionobjects_common:fieldCollectionPlace + + collectionobjects_common:fieldCollectionDate + + + + + + collectionobjects_common:dateAssociation + collectionobjects_common:dateEarliestSingle + + collectionobjects_common:dateEarliestSingleCertainty + + collectionobjects_common:dateEarliestSingleQualifier + + collectionobjects_common:dateLatest + collectionobjects_common:dateLatestCertainty + + collectionobjects_common:dateLatestQualifier + + collectionobjects_common:datePeriod + collectionobjects_common:dateText + + + + + + contacts_common:addressPlace + + + + + + groups_common:scopeNote + + + + + + + intakes_common:entryNote + intakes_common:packingNote + intakes_common:fieldCollectionNote + intakes_common:insuranceNote + intakes_common:conditionCheckNote + currentLocationNote + + + + + + + loansin_common:loanInConditions + loansin_common:loanInNote + + + + + + + loansout_common:specialConditionsOfLoan + loansout_common:loanOutNote + loansout_common:loanPurpose + loanedObjectStatusNote + + + + + + + movements_common:currentLocationNote + movements_common:movementNote + + + + + + + media_common:copyrightStatement + media_common:description + media_common:title + + + + + + + notes_common:content + + + + + + + objectexit_common:exitNote + objectexit_common:packingNote + + + + + + + shortName + longName + nameAdditions + historyNote + + + + + + persons_common:bioNote + persons_common:nameNote + + + + + + + + + + + + + locations_common:name + + locations_common:conditionNote + locations_common:securityNote + locations_common:accessNote + + + + + + + + The lifesci-domain repository + + + diff --git a/3rdparty/nuxeo/nuxeo-server/5.5/config/lifesci-domain-repo-config.xml b/3rdparty/nuxeo/nuxeo-server/5.5/config/lifesci-domain-repo-config.xml new file mode 100644 index 000000000..8a98a0556 --- /dev/null +++ b/3rdparty/nuxeo/nuxeo-server/5.5/config/lifesci-domain-repo-config.xml @@ -0,0 +1,419 @@ + + + + + + + + + org.postgresql.xa.PGXADataSource + jdbc:postgresql://localhost:5432/lifesci-domain + localhost + lifesci-domain + nuxeo + nuxpw + + + imd:user_comment + note + webp:content + webc:welcomeText + comment:comment + post + mail:mail + + + + + + + + + + acquisitionFundingSourceProvisos + acquisitions_common:acquisitionNote + acquisitions_common:acquisitionProvisos + acquisitions_common:acquisitionReason + acquisitions_common:creditLine + + + + + + + + + + + + + + + + + + numberValue + + + collectionobjects_common:briefDescriptions + + + + collectionobjects_common:comments + + collectionobjects_common:distinguishingFeatures + + + objectNameNote + + title + titleTranslation + + + + + collectionobjects_common:ageQualifier + collectionobjects_common:color + collectionobjects_common:contentDescription + + collectionobjects_common:contentNote + collectionobjects_common:contentObject + collectionobjects_common:copyNumber + collectionobjects_common:editionNumber + + + + collectionobjects_common:inscriptionContent + + collectionobjects_common:inscriptionContentInterpretation + + collectionobjects_common:inscriptionContentTranslation + + collectionobjects_common:inscriptionContentTransliteration + + + + + collectionobjects_common:inscriptionDescriptionInterpretation + + + materialComponentNote + materialName + + + collectionobjects_common:physicalDescription + + + objectComponentInformation + + + + + collectionobjects_common:objectProductionNote + + + + collectionobjects_common:objectProductionReason + + + + + + assocActivityNote + assocConceptNote + assocCulturalContextNote + assocDateNote + + + + collectionobjects_common:assocEventName + collectionobjects_common:assocEventNote + collectionobjects_common:assocEventType + + assocObject + assocOrganizationNote + assocPeopleNote + assocPersonNote + assocPlaceNote + + collectionobjects_common:objectHistoryNote + + collectionobjects_common:ownershipExchangeNote + + usageNote + + + + + collectionobjects_common:ownersPersonalExperience + + collectionobjects_common:ownersPersonalResponse + + + + collectionobjects_common:ownersReference + + collectionobjects_common:ownersContributionNote + + + + + + collectionobjects_common:viewersRole + collectionobjects_common:viewersPersonalExperience + + collectionobjects_common:viewersPersonalResponse + + + + collectionobjects_common:viewersReference + + collectionobjects_common:viewersContributionNote + + + + + + collectionobjects_common:catalogNumber + + + + + collectionobjects_common:fieldCollectionNote + + collectionobjects_common:fieldCollectionNumber + + + + + collectionobjects_common:objectNumber + collectionobjects_common:numberOfObjects + collectionobjects_common:collection + collectionobjects_common:recordStatus + collectionobjects_common:age + collectionobjects_common:ageQualifier + collectionobjects_common:ageUnit + + collectionobjects_common:contentDate + collectionobjects_common:contentLanguages + collectionobjects_common:contentOrganizations + + + collectionobjects_common:dimensionSummary + + + + + collectionobjects_common:dimension + collectionobjects_common:dimensionMeasuredPart + + collectionobjects_common:dimensionMeasurementUnit + + collectionobjects_common:dimensionValue + collectionobjects_common:dimensionValueDate + + collectionobjects_common:dimensionValueQualifier + + + collectionobjects_common:editionNumber + + collectionobjects_common:inscriptionContentInscriber + + collectionobjects_common:inscriptionContentDate + + collectionobjects_common:inscriptionContentLanguage + + collectionobjects_common:inscriptionContentMethod + + collectionobjects_common:inscriptionContentPosition + + collectionobjects_common:inscriptionContentScript + + collectionobjects_common:inscriptionContentType + + + collectionobjects_common:inscriptionDescription + + collectionobjects_common:inscriptionDescriptionInscriber + + collectionobjects_common:inscriptionDescriptionDate + + collectionobjects_common:inscriptionDescriptionMethod + + collectionobjects_common:inscriptionDescriptionPosition + + collectionobjects_common:inscriptionDescriptionType + + + collectionobjects_common:objectStatus + collectionobjects_common:phase + collectionobjects_common:sex + collectionobjects_common:ownershipAccess + collectionobjects_common:ownershipCategory + + collectionobjects_common:ownershipDates + collectionobjects_common:ownershipExchangeMethod + + collectionobjects_common:ownershipExchangePriceCurrency + + collectionobjects_common:ownershipExchangePriceValue + + collectionobjects_common:ownershipPlace + collectionobjects_common:fieldCollectionNumber + + collectionobjects_common:fieldCollectionMethod + + collectionobjects_common:fieldCollectionPlace + + collectionobjects_common:fieldCollectionDate + + + + + + collectionobjects_common:dateAssociation + collectionobjects_common:dateEarliestSingle + + collectionobjects_common:dateEarliestSingleCertainty + + collectionobjects_common:dateEarliestSingleQualifier + + collectionobjects_common:dateLatest + collectionobjects_common:dateLatestCertainty + + collectionobjects_common:dateLatestQualifier + + collectionobjects_common:datePeriod + collectionobjects_common:dateText + + + + + + contacts_common:addressPlace + + + + + + groups_common:scopeNote + + + + + + + intakes_common:entryNote + intakes_common:packingNote + intakes_common:fieldCollectionNote + intakes_common:insuranceNote + intakes_common:conditionCheckNote + currentLocationNote + + + + + + + loansin_common:loanInConditions + loansin_common:loanInNote + + + + + + + loansout_common:specialConditionsOfLoan + loansout_common:loanOutNote + loansout_common:loanPurpose + loanedObjectStatusNote + + + + + + + movements_common:currentLocationNote + movements_common:movementNote + + + + + + + media_common:copyrightStatement + media_common:description + media_common:title + + + + + + + notes_common:content + + + + + + + objectexit_common:exitNote + objectexit_common:packingNote + + + + + + + shortName + longName + nameAdditions + historyNote + + + + + + persons_common:bioNote + persons_common:nameNote + + + + + + + + + + + + + locations_common:name + + locations_common:conditionNote + locations_common:securityNote + locations_common:accessNote + + + + + + + + The lifesci-domain repository + + + diff --git a/3rdparty/pom.xml b/3rdparty/pom.xml index 5449ea2e1..91b378c44 100644 --- a/3rdparty/pom.xml +++ b/3rdparty/pom.xml @@ -7,7 +7,6 @@ 4.0.0 - org.collectionspace.services org.collectionspace.services.3rdparty services.3rdparty pom diff --git a/pom.xml b/pom.xml index 05e81761a..fdd641de3 100644 --- a/pom.xml +++ b/pom.xml @@ -293,21 +293,15 @@ - - org.jvnet.hyperjaxb3 - - - maven-hyperjaxb3-plugin - - - [0.5.6,) - + org.jvnet.hyperjaxb3 + maven-hyperjaxb3-plugin + [0.5.6,) generate - + diff --git a/services/.project b/services/.project index ca988923d..62e96255f 100644 --- a/services/.project +++ b/services/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/.settings/org.maven.ide.eclipse.prefs b/services/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 56b0dc0b5..000000000 --- a/services/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:22 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/IntegrationTests/.settings/org.maven.ide.eclipse.prefs b/services/IntegrationTests/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index c279a2256..000000000 --- a/services/IntegrationTests/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:31 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/JaxRsServiceProvider/.settings/org.maven.ide.eclipse.prefs b/services/JaxRsServiceProvider/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93b6f8a66..000000000 --- a/services/JaxRsServiceProvider/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:30 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/JaxRsServiceProvider/src/main/resources/log4j.properties b/services/JaxRsServiceProvider/src/main/resources/log4j.properties index 2db9cb87f..9c19e196d 100644 --- a/services/JaxRsServiceProvider/src/main/resources/log4j.properties +++ b/services/JaxRsServiceProvider/src/main/resources/log4j.properties @@ -53,6 +53,7 @@ log4j.additivity.perf.collectionspace=false # CollectionSpace loggers and default levels - all loggers using the rootLogger if not otherwise specified # log4j.logger.org.collectionspace=DEBUG +log4j.logger.org.collectionspace.services.common.storage.JDBCTools=TRACE #log4j.logger.org.collectionspace.services.common.vocabulary.nuxeo=TRACE # diff --git a/services/JaxRsServiceProvider/src/main/webapp/META-INF/context.xml b/services/JaxRsServiceProvider/src/main/webapp/META-INF/context.xml index de1031dcb..3d0f5e317 100644 --- a/services/JaxRsServiceProvider/src/main/webapp/META-INF/context.xml +++ b/services/JaxRsServiceProvider/src/main/webapp/META-INF/context.xml @@ -8,85 +8,68 @@ 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. --> - + - - - - - + - + + - + + - - - - - - - - - + + + + + + + + - - - + + + - + - - - - + + diff --git a/services/PerformanceTests/.settings/org.maven.ide.eclipse.prefs b/services/PerformanceTests/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index c279a2256..000000000 --- a/services/PerformanceTests/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:31 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/account/.project b/services/account/.project index 0ce4c5b34..551ac7ac0 100644 --- a/services/account/.project +++ b/services/account/.project @@ -3,20 +3,8 @@ org.collectionspace.services.account - org.collectionspace.services.account.jaxb - org.collectionspace.services.common - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -25,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/account/.settings/org.maven.ide.eclipse.prefs b/services/account/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index ed1df416c..000000000 --- a/services/account/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Dec 02 09:40:39 PST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/account/client/.settings/org.maven.ide.eclipse.prefs b/services/account/client/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index ed1df416c..000000000 --- a/services/account/client/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Dec 02 09:40:39 PST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/account/jaxb/.settings/org.maven.ide.eclipse.prefs b/services/account/jaxb/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 75847f06f..000000000 --- a/services/account/jaxb/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Jan 19 22:49:28 PST 2011 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/account/pstore/.settings/org.maven.ide.eclipse.prefs b/services/account/pstore/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 25d304a82..000000000 --- a/services/account/pstore/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Dec 28 10:22:03 PST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/account/service/.settings/org.maven.ide.eclipse.prefs b/services/account/service/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index ed1df416c..000000000 --- a/services/account/service/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Dec 02 09:40:39 PST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/acquisition/.project b/services/acquisition/.project index cc56a5674..34718ac73 100644 --- a/services/acquisition/.project +++ b/services/acquisition/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/acquisition/.settings/org.maven.ide.eclipse.prefs b/services/acquisition/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93c9e7e2e..000000000 --- a/services/acquisition/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:28 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/acquisition/3rdparty/.project b/services/acquisition/3rdparty/.project index c5762ab9e..526750fff 100644 --- a/services/acquisition/3rdparty/.project +++ b/services/acquisition/3rdparty/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/acquisition/3rdparty/.settings/org.maven.ide.eclipse.prefs b/services/acquisition/3rdparty/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93c9e7e2e..000000000 --- a/services/acquisition/3rdparty/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:28 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/acquisition/3rdparty/nuxeo-platform-cs-acquisition/.settings/org.maven.ide.eclipse.prefs b/services/acquisition/3rdparty/nuxeo-platform-cs-acquisition/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 95a5ba022..000000000 --- a/services/acquisition/3rdparty/nuxeo-platform-cs-acquisition/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:29 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/acquisition/client/.settings/org.maven.ide.eclipse.prefs b/services/acquisition/client/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 95a5ba022..000000000 --- a/services/acquisition/client/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:29 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/acquisition/jaxb/.settings/org.maven.ide.eclipse.prefs b/services/acquisition/jaxb/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 0c6fb5ca3..000000000 --- a/services/acquisition/jaxb/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Jan 19 22:49:36 PST 2011 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/acquisition/service/.settings/org.maven.ide.eclipse.prefs b/services/acquisition/service/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93c9e7e2e..000000000 --- a/services/acquisition/service/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:28 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/authentication/.project b/services/authentication/.project index 54b316dd5..80f21e119 100644 --- a/services/authentication/.project +++ b/services/authentication/.project @@ -3,20 +3,8 @@ org.collectionspace.services.authentication - org.collectionspace.services.authentication.jaxb - org.collectionspace.services.common - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -25,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/authentication/.settings/org.maven.ide.eclipse.prefs b/services/authentication/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 0c7b2cd0e..000000000 --- a/services/authentication/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:23 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/authentication/client/.settings/org.maven.ide.eclipse.prefs b/services/authentication/client/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 84b63f1b8..000000000 --- a/services/authentication/client/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Jan 04 16:40:34 PST 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/authentication/jaxb/.settings/org.maven.ide.eclipse.prefs b/services/authentication/jaxb/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 223c9b5ad..000000000 --- a/services/authentication/jaxb/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Jan 19 22:49:16 PST 2011 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/authentication/pstore/.settings/org.maven.ide.eclipse.prefs b/services/authentication/pstore/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 25d304a82..000000000 --- a/services/authentication/pstore/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Dec 28 10:22:03 PST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/authentication/service/.settings/org.maven.ide.eclipse.prefs b/services/authentication/service/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 84b63f1b8..000000000 --- a/services/authentication/service/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Jan 04 16:40:34 PST 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/authorization-mgt/.project b/services/authorization-mgt/.project index 9a9957d7f..a8ee8d880 100644 --- a/services/authorization-mgt/.project +++ b/services/authorization-mgt/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/authorization-mgt/.settings/org.maven.ide.eclipse.prefs b/services/authorization-mgt/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 0ce6a3185..000000000 --- a/services/authorization-mgt/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Apr 05 14:31:16 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/authorization-mgt/client/.settings/org.maven.ide.eclipse.prefs b/services/authorization-mgt/client/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 8a7f0538a..000000000 --- a/services/authorization-mgt/client/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Apr 05 14:31:17 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/authorization-mgt/import/.settings/org.maven.ide.eclipse.prefs b/services/authorization-mgt/import/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index af42010fd..000000000 --- a/services/authorization-mgt/import/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri May 21 15:18:26 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/authorization-mgt/service/.settings/org.maven.ide.eclipse.prefs b/services/authorization-mgt/service/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 8a7f0538a..000000000 --- a/services/authorization-mgt/service/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Apr 05 14:31:17 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/authorization/.project b/services/authorization/.project index c2f1a72c8..53fed1555 100644 --- a/services/authorization/.project +++ b/services/authorization/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/authorization/.settings/org.maven.ide.eclipse.prefs b/services/authorization/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 0ce6a3185..000000000 --- a/services/authorization/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Apr 05 14:31:16 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/authorization/jaxb/.settings/org.maven.ide.eclipse.prefs b/services/authorization/jaxb/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 944f24750..000000000 --- a/services/authorization/jaxb/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Jan 19 22:49:18 PST 2011 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/authorization/pstore/.settings/org.maven.ide.eclipse.prefs b/services/authorization/pstore/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 0ce6a3185..000000000 --- a/services/authorization/pstore/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Apr 05 14:31:16 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/authorization/service/.settings/org.maven.ide.eclipse.prefs b/services/authorization/service/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 0ce6a3185..000000000 --- a/services/authorization/service/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Apr 05 14:31:16 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/batch/.project b/services/batch/.project index 3001e96de..e857f894e 100644 --- a/services/batch/.project +++ b/services/batch/.project @@ -5,11 +5,6 @@ - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -18,6 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.maven.ide.eclipse.maven2Nature diff --git a/services/batch/3rdparty/.project b/services/batch/3rdparty/.project index 5b4b02f88..9f043a30b 100644 --- a/services/batch/3rdparty/.project +++ b/services/batch/3rdparty/.project @@ -5,11 +5,6 @@ - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -18,6 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.maven.ide.eclipse.maven2Nature diff --git a/services/batch/3rdparty/.settings/org.maven.ide.eclipse.prefs b/services/batch/3rdparty/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index e2ce08c02..000000000 --- a/services/batch/3rdparty/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Aug 27 16:35:21 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/batch/3rdparty/nuxeo-platform-cs-batch/.settings/org.maven.ide.eclipse.prefs b/services/batch/3rdparty/nuxeo-platform-cs-batch/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index e2ce08c02..000000000 --- a/services/batch/3rdparty/nuxeo-platform-cs-batch/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Aug 27 16:35:21 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/batch/client/.settings/org.maven.ide.eclipse.prefs b/services/batch/client/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index e2ce08c02..000000000 --- a/services/batch/client/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Aug 27 16:35:21 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/batch/jaxb/.settings/org.maven.ide.eclipse.prefs b/services/batch/jaxb/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index c9f07df5d..000000000 --- a/services/batch/jaxb/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Jan 19 22:49:45 PST 2011 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/batch/service/.settings/org.maven.ide.eclipse.prefs b/services/batch/service/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index e2ce08c02..000000000 --- a/services/batch/service/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Aug 27 16:35:21 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/blob/.project b/services/blob/.project index 7a546e836..2cb6d0902 100644 --- a/services/blob/.project +++ b/services/blob/.project @@ -5,11 +5,6 @@ - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -18,6 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.maven.ide.eclipse.maven2Nature diff --git a/services/blob/.settings/org.maven.ide.eclipse.prefs b/services/blob/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 1156693b1..000000000 --- a/services/blob/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Dec 03 15:35:01 PST 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/blob/3rdparty/.project b/services/blob/3rdparty/.project index ea8c9be87..5ca2f2bb0 100644 --- a/services/blob/3rdparty/.project +++ b/services/blob/3rdparty/.project @@ -5,11 +5,6 @@ - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -18,6 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.maven.ide.eclipse.maven2Nature diff --git a/services/blob/3rdparty/.settings/org.maven.ide.eclipse.prefs b/services/blob/3rdparty/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 1156693b1..000000000 --- a/services/blob/3rdparty/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Dec 03 15:35:01 PST 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/blob/3rdparty/nuxeo-platform-cs-blob/.settings/org.maven.ide.eclipse.prefs b/services/blob/3rdparty/nuxeo-platform-cs-blob/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 1156693b1..000000000 --- a/services/blob/3rdparty/nuxeo-platform-cs-blob/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Dec 03 15:35:01 PST 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/blob/client/.settings/org.maven.ide.eclipse.prefs b/services/blob/client/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 1156693b1..000000000 --- a/services/blob/client/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Dec 03 15:35:01 PST 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/blob/jaxb/.project b/services/blob/jaxb/.project deleted file mode 100644 index 10f3c6138..000000000 --- a/services/blob/jaxb/.project +++ /dev/null @@ -1,19 +0,0 @@ - - org.collectionspace.services.blob.jaxb - NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. - - org.collectionspace.services.jaxb - - - - org.eclipse.jdt.core.javabuilder - - - org.maven.ide.eclipse.maven2Builder - - - - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - \ No newline at end of file diff --git a/services/blob/jaxb/.settings/org.maven.ide.eclipse.prefs b/services/blob/jaxb/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 8ff0f62ad..000000000 --- a/services/blob/jaxb/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Jan 19 22:49:19 PST 2011 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/blob/service/.settings/org.maven.ide.eclipse.prefs b/services/blob/service/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 1156693b1..000000000 --- a/services/blob/service/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Dec 03 15:35:01 PST 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/client/.settings/org.maven.ide.eclipse.prefs b/services/client/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index c279a2256..000000000 --- a/services/client/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:31 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/client/src/main/java/org/collectionspace/services/client/IQueryManager.java b/services/client/src/main/java/org/collectionspace/services/client/IQueryManager.java index ddcb4d245..ccc53d2e4 100644 --- a/services/client/src/main/java/org/collectionspace/services/client/IQueryManager.java +++ b/services/client/src/main/java/org/collectionspace/services/client/IQueryManager.java @@ -94,6 +94,8 @@ public interface IQueryManager { public void execQuery(String queryString); + public String getDatasourceName(); + /** * Creates the where clause from keywords. * @@ -126,7 +128,10 @@ public interface IQueryManager { * * @return the string */ - public String createWhereClauseForPartialMatch(String field, String partialTerm); + public String createWhereClauseForPartialMatch(String dataSourceName, + String repositoryName, + String field, + String partialTerm); /** * Creates a filtering where clause from docType, for invocables. diff --git a/services/collectionobject/.project b/services/collectionobject/.project index 0a86d9b35..741d82ba2 100644 --- a/services/collectionobject/.project +++ b/services/collectionobject/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/collectionobject/.settings/org.maven.ide.eclipse.prefs b/services/collectionobject/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93b6f8a66..000000000 --- a/services/collectionobject/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:30 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/collectionobject/3rdparty/.project b/services/collectionobject/3rdparty/.project index 696a5c2df..ce7699e90 100644 --- a/services/collectionobject/3rdparty/.project +++ b/services/collectionobject/3rdparty/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/collectionobject/3rdparty/.settings/org.maven.ide.eclipse.prefs b/services/collectionobject/3rdparty/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93b6f8a66..000000000 --- a/services/collectionobject/3rdparty/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:30 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/collectionobject/client/.settings/org.maven.ide.eclipse.prefs b/services/collectionobject/client/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93b6f8a66..000000000 --- a/services/collectionobject/client/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:30 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/collectionobject/jaxb/.settings/org.maven.ide.eclipse.prefs b/services/collectionobject/jaxb/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index dbd51f384..000000000 --- a/services/collectionobject/jaxb/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Jan 19 22:49:41 PST 2011 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/collectionobject/sample/.project b/services/collectionobject/sample/.project index 3f4c8fe25..0b31a5792 100644 --- a/services/collectionobject/sample/.project +++ b/services/collectionobject/sample/.project @@ -1,20 +1,10 @@ - org.collectionspace.services.collectionobjects.client.samples + org.collectionspace.services.collectionobject.client.samples - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/collectionobject/sample/.settings/org.maven.ide.eclipse.prefs b/services/collectionobject/sample/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index e085fa462..000000000 --- a/services/collectionobject/sample/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Dec 28 10:22:04 PST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/collectionobject/sample/sample/.project b/services/collectionobject/sample/sample/.project index e028f2e15..18d3006a8 100644 --- a/services/collectionobject/sample/sample/.project +++ b/services/collectionobject/sample/sample/.project @@ -3,8 +3,6 @@ org.collectionspace.services.collectionobject.client.sample - org.collectionspace.services.client - org.collectionspace.services.common @@ -12,11 +10,6 @@ - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -24,8 +17,7 @@ - org.eclipse.m2e.core.maven2Nature org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature + org.eclipse.m2e.core.maven2Nature diff --git a/services/collectionobject/sample/sample/.settings/org.maven.ide.eclipse.prefs b/services/collectionobject/sample/sample/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index e085fa462..000000000 --- a/services/collectionobject/sample/sample/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Dec 28 10:22:04 PST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/common-test/.settings/org.maven.ide.eclipse.prefs b/services/common-test/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index af42010fd..000000000 --- a/services/common-test/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri May 21 15:18:26 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/common/.settings/org.maven.ide.eclipse.prefs b/services/common/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 2a7cb62bf..000000000 --- a/services/common/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Jan 19 22:49:24 PST 2011 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/common/pom.xml b/services/common/pom.xml index ede77b46a..8ce480629 100644 --- a/services/common/pom.xml +++ b/services/common/pom.xml @@ -127,11 +127,23 @@ commons-jexl 2.0.1 + + commons-dbcp + commons-dbcp + 1.3-RC1 + provided + commons-codec commons-codec 1.4 + + org.apache.tomcat + dbcp + 6.0.33 + provided + @@ -291,6 +303,11 @@ nuxeo-core-storage-sql ${nuxeo.core.version} + + org.nuxeo.ecm.core + nuxeo-core-storage-sql-ra + ${nuxeo.core.version} + org.nuxeo.ecm.core nuxeo-core-io diff --git a/services/common/src/main/cspace/config/services/tenants/lifesci/tenant-bindings.delta.xml b/services/common/src/main/cspace/config/services/tenants/lifesci/tenant-bindings.delta.xml index 6938663af..2a972b97a 100644 --- a/services/common/src/main/cspace/config/services/tenants/lifesci/tenant-bindings.delta.xml +++ b/services/common/src/main/cspace/config/services/tenants/lifesci/tenant-bindings.delta.xml @@ -5,7 +5,7 @@ - + diff --git a/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml b/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml index fc1a312e0..ce50d0750 100644 --- a/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml +++ b/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml @@ -51,6 +51,16 @@ + default-domain + + org.collectionspace.services.common.init.RunSqlScript + + + sqlScriptName + create_id_generators_table.sql + + + @@ -62,13 +72,26 @@ /idgenerators/*/ids --> + default-domain + + + + + org.collectionspace.services.common.init.RunSqlScript + + + sqlScriptName + load_id_generators.sql + + + + but provides tools like keyword search across many types of services. + --> default-domain org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler @@ -87,11 +110,11 @@ org.collectionspace.services.collectionobject.nuxeo.CollectionObjectDocumentModelHandler - true - - objectNumber - objectNumber - + true + + objectNumber + objectNumber + objectNumber @@ -969,9 +992,9 @@ - + - + default-domain org.collectionspace.services.objectexit.nuxeo.ObjectExitDocumentModelHandler @@ -1363,7 +1386,7 @@ authRef movementContact - + authRef inventoryContactList|inventoryContact @@ -1550,13 +1573,13 @@ org.collectionspace.services.vocabulary.nuxeo.VocabularyItemDocumentModelHandler - true - + true + order order - + @@ -1752,7 +1775,7 @@ authRef groups|group --> - + @@ -1985,9 +2008,9 @@ - + - + + currently in the CSPACE-4813 branch (P/NP term work in services), is fixed --> + - + default-domain @@ -3025,7 +3048,7 @@ - + diff --git a/services/common/src/main/java/org/collectionspace/services/common/ResourceBase.java b/services/common/src/main/java/org/collectionspace/services/common/ResourceBase.java index 0db2fc879..2d1dcb27f 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/ResourceBase.java +++ b/services/common/src/main/java/org/collectionspace/services/common/ResourceBase.java @@ -364,8 +364,8 @@ public abstract class ResourceBase // if (partialTerm != null && !partialTerm.isEmpty()) { String partialTermMatchField = getPartialTermMatchField(ctx); - String ptClause = QueryManager.createWhereClauseForPartialMatch( - partialTermMatchField, partialTerm); + String ptClause = QueryManager.createWhereClauseForPartialMatch(ctx, partialTermMatchField, + partialTerm); docFilter.appendWhereClause(ptClause, IQueryManager.SEARCH_QUALIFIER_AND); } else if (keywords != null && !keywords.isEmpty()) { String whereClause = QueryManager.createWhereClauseFromKeywords(keywords); diff --git a/services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java b/services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java index 2a9cab010..6b20685f0 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java +++ b/services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java @@ -7,11 +7,6 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; import java.util.*; import javax.naming.NamingException; @@ -20,17 +15,15 @@ import javax.sql.DataSource; import org.collectionspace.authentication.AuthN; -import org.collectionspace.services.config.service.InitHandler; import org.collectionspace.services.common.authorization_mgt.AuthorizationCommon; import org.collectionspace.services.common.config.ConfigReader; +import org.collectionspace.services.common.config.ConfigUtils; import org.collectionspace.services.common.config.ServicesConfigReaderImpl; import org.collectionspace.services.common.config.TenantBindingConfigReaderImpl; import org.collectionspace.services.common.init.AddIndices; import org.collectionspace.services.config.service.InitHandler.Params.Field; import org.collectionspace.services.common.init.IInitHandler; -import org.collectionspace.services.common.security.SecurityUtils; import org.collectionspace.services.common.storage.JDBCTools; -import org.collectionspace.services.common.storage.DatabaseProductType; import org.collectionspace.services.config.ClientType; import org.collectionspace.services.config.ServiceConfig; import org.collectionspace.services.config.service.ServiceBindingType; @@ -213,56 +206,80 @@ public class ServiceMain { } } - /** - * Create required indexes (aka indices) in database tables not associated - * with any specific tenant. - * - * @throws Exception - */ - void createRequiredIndices() throws Exception { - - // Define a set of columns (fields) and their associated - // tables, on which database indexes should always be created - final String COLLECTIONSPACE_CORE_TABLE_NAME = "collectionspace_core"; - final String NUXEO_FULLTEXT_TABLE_NAME = "fulltext"; - final String NUXEO_HIERARCHY_TABLE_NAME = "hierarchy"; - - Map> fieldsToIndex = new HashMap>(); - fieldsToIndex.put(1, new ArrayList(Arrays.asList(COLLECTIONSPACE_CORE_TABLE_NAME, "tenantid"))); - fieldsToIndex.put(2, new ArrayList(Arrays.asList(COLLECTIONSPACE_CORE_TABLE_NAME, "updatedat"))); - fieldsToIndex.put(3, new ArrayList(Arrays.asList(NUXEO_FULLTEXT_TABLE_NAME, "jobid"))); - fieldsToIndex.put(4, new ArrayList(Arrays.asList(NUXEO_HIERARCHY_TABLE_NAME, "name"))); - - // Invoke existing post-init code to create these indexes, - // sending in the set of values above, in contrast to - // drawing these values from per-tenant configuration. - DataSource dataSource = JDBCTools.getDataSource(JDBCTools.NUXEO_REPOSITORY_NAME); - AddIndices addindices = new AddIndices(); - List fields = new ArrayList(); - for (Map.Entry> entry : fieldsToIndex.entrySet()) { - Field field = new Field(); - field.setTable(entry.getValue().get(0)); // Table name from List item 0 - field.setCol(entry.getValue().get(1)); // Column name from List item 1 - fields.add(field); - } - addindices.onRepositoryInitialized(dataSource, null, fields, null); + /** + * Create required indexes (aka indices) in database tables not associated + * with any specific tenant. + * + * We need to loop over each repository/db declared in the tenant bindings. + * The assumption here is that each repo/db is a Nuxeo repo/DB. + * + * @throws Exception + */ + void createRequiredIndices() throws Exception { + Hashtable tenantBindingTypeMap = tenantBindingConfigReader.getTenantBindings(); - } + // + //Loop through all tenants in tenant-bindings.xml + // + for (TenantBindingType tbt : tenantBindingTypeMap.values()) { + List repositoryNameList = ConfigUtils.getRepositoryNameList(tbt); + if (repositoryNameList != null && repositoryNameList.isEmpty() == false) { + // + // Loop through each repo/DB defined in a tenant bindings file + // + for (String repositoryName : repositoryNameList) { + // Define a set of columns (fields) and their associated + // tables, on which database indexes should always be created + final String COLLECTIONSPACE_CORE_TABLE_NAME = "collectionspace_core"; + final String NUXEO_FULLTEXT_TABLE_NAME = "fulltext"; + final String NUXEO_HIERARCHY_TABLE_NAME = "hierarchy"; + + Map> fieldsToIndex = new HashMap>(); + fieldsToIndex.put(1, new ArrayList(Arrays.asList(COLLECTIONSPACE_CORE_TABLE_NAME, "tenantid"))); + fieldsToIndex.put(2, new ArrayList(Arrays.asList(COLLECTIONSPACE_CORE_TABLE_NAME, "updatedat"))); + fieldsToIndex.put(3, new ArrayList(Arrays.asList(NUXEO_FULLTEXT_TABLE_NAME, "jobid"))); + fieldsToIndex.put(4, new ArrayList(Arrays.asList(NUXEO_HIERARCHY_TABLE_NAME, "name"))); + + // Invoke existing post-init code to create these indexes, + // sending in the set of values above, in contrast to + // drawing these values from per-tenant configuration. +// DataSource dataSource = JDBCTools.getDataSource(JDBCTools.NUXEO_DATASOURCE_NAME); + AddIndices addindices = new AddIndices(); + List fields = new ArrayList(); + for (Map.Entry> entry : fieldsToIndex.entrySet()) { + Field field = new Field(); + field.setTable(entry.getValue().get(0)); // Table name from List + // item 0 + field.setCol(entry.getValue().get(1)); // Column name from List item + // 1 + fields.add(field); + } + addindices.onRepositoryInitialized(JDBCTools.NUXEO_DATASOURCE_NAME, repositoryName, null, fields, null); + } + } else { + String errMsg = "repositoryNameList was empty or null."; + logger.error(errMsg); + throw new Exception(errMsg); + } + } + } public void firePostInitHandlers() throws Exception { - DataSource dataSource = JDBCTools.getDataSource(JDBCTools.NUXEO_REPOSITORY_NAME); Hashtable tenantBindingTypeMap = tenantBindingConfigReader.getTenantBindings(); + // //Loop through all tenants in tenant-bindings.xml - for (TenantBindingType tbt: tenantBindingTypeMap.values()){ - //String name = tbt.getName(); - //String id = tbt.getId(); - //Loop through all the services in this tenant + // + for (TenantBindingType tbt : tenantBindingTypeMap.values()) { + // + //Loop through all the services in this tenant + // List sbtList = tbt.getServiceBindings(); - for (ServiceBindingType sbt: sbtList){ + for (ServiceBindingType sbt: sbtList) { + String repositoryName = ConfigUtils.getRepositoryName(tbt, sbt.getRepositoryDomain()); // Each service can have a different repo domain //Get the list of InitHandler elements, extract the first one (only one supported right now) and fire it using reflection. List list = sbt.getInitHandler(); - if (list!=null && list.size()>0){ - org.collectionspace.services.config.service.InitHandler handlerType = list.get(0); + if (list != null && list.size() > 0) { + org.collectionspace.services.config.service.InitHandler handlerType = list.get(0); // REM - 12/2012: We might want to think about supporting multiple post-init handlers String initHandlerClassname = handlerType.getClassname(); List @@ -276,7 +293,7 @@ public class ServiceMain { Object o = instantiate(initHandlerClassname, IInitHandler.class); if (o != null && o instanceof IInitHandler){ IInitHandler handler = (IInitHandler)o; - handler.onRepositoryInitialized(dataSource, sbt, fields, props); + handler.onRepositoryInitialized(JDBCTools.NUXEO_DATASOURCE_NAME, repositoryName, sbt, fields, props); //The InitHandler may be the default one, // or specialized classes which still implement this interface and are registered in tenant-bindings.xml. } @@ -349,8 +366,8 @@ public class ServiceMain { // cached in a static hash map of the JDBCTools class. This will speed up lookups as well as protect our // code from JNDI lookup problems -for example, if the JNDI context gets stepped on or corrupted. // - DataSource cspaceDataSource = JDBCTools.getDataSource(JDBCTools.CSPACE_REPOSITORY_NAME); - DataSource nuxeoDataSource = JDBCTools.getDataSource(JDBCTools.NUXEO_REPOSITORY_NAME); + DataSource cspaceDataSource = JDBCTools.getDataSource(JDBCTools.CSPACE_DATASOURCE_NAME); + DataSource nuxeoDataSource = JDBCTools.getDataSource(JDBCTools.NUXEO_DATASOURCE_NAME); // // Set our AuthN's datasource to be the cspaceDataSource // diff --git a/services/common/src/main/java/org/collectionspace/services/common/authorization_mgt/AuthorizationCommon.java b/services/common/src/main/java/org/collectionspace/services/common/authorization_mgt/AuthorizationCommon.java index dde31ac03..e8e878889 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/authorization_mgt/AuthorizationCommon.java +++ b/services/common/src/main/java/org/collectionspace/services/common/authorization_mgt/AuthorizationCommon.java @@ -232,7 +232,8 @@ public class AuthorizationCommon { } private static Connection getConnection() throws NamingException, SQLException { - return JDBCTools.getConnection(JDBCTools.CSPACE_REPOSITORY_NAME); + return JDBCTools.getConnection(JDBCTools.CSPACE_DATASOURCE_NAME, + JDBCTools.DEFAULT_CSPACE_DATABASE_NAME); } /* @@ -928,7 +929,8 @@ public class AuthorizationCommon { // and we're not touching that, so we could safely toss the // accounts, users, account-tenants, account-roles, and start over. try { - DatabaseProductType databaseProductType = JDBCTools.getDatabaseProductType(); + DatabaseProductType databaseProductType = JDBCTools.getDatabaseProductType(JDBCTools.CSPACE_DATASOURCE_NAME, + JDBCTools.DEFAULT_CSPACE_DATABASE_NAME); conn = getConnection(); ArrayList existingTenants = compileExistingTenants(conn, tenantInfo); diff --git a/services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java b/services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java index 6cad17a79..103cecc2f 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java +++ b/services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java @@ -361,12 +361,10 @@ public class TenantBindingConfigReaderImpl } 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()); diff --git a/services/common/src/main/java/org/collectionspace/services/common/context/AbstractServiceContextImpl.java b/services/common/src/main/java/org/collectionspace/services/common/context/AbstractServiceContextImpl.java index 178c2fbfc..243e9ccd9 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/context/AbstractServiceContextImpl.java +++ b/services/common/src/main/java/org/collectionspace/services/common/context/AbstractServiceContextImpl.java @@ -86,7 +86,7 @@ public abstract class AbstractServiceContextImpl 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> valHandlers = null; @@ -696,4 +696,14 @@ public abstract class AbstractServiceContextImpl // TODO Auto-generated method stub return currentRepositorySession; } + + @Override + public RepositoryDomainType getRepositoryDomain() { + return repositoryDomain; + } + + @Override + public void setRepositoryDomain(RepositoryDomainType repositoryDomain) { + this.repositoryDomain = repositoryDomain; + } } diff --git a/services/common/src/main/java/org/collectionspace/services/common/context/RemoteServiceContextImpl.java b/services/common/src/main/java/org/collectionspace/services/common/context/RemoteServiceContextImpl.java index 4eee53531..08c932432 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/context/RemoteServiceContextImpl.java +++ b/services/common/src/main/java/org/collectionspace/services/common/context/RemoteServiceContextImpl.java @@ -27,7 +27,12 @@ import java.lang.reflect.Constructor; 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; @@ -108,6 +113,28 @@ public class RemoteServiceContextImpl } } + /* + * 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() */ diff --git a/services/common/src/main/java/org/collectionspace/services/common/context/ServiceContext.java b/services/common/src/main/java/org/collectionspace/services/common/context/ServiceContext.java index bbb9f2a33..1dd07be55 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/context/ServiceContext.java +++ b/services/common/src/main/java/org/collectionspace/services/common/context/ServiceContext.java @@ -36,6 +36,7 @@ import org.collectionspace.services.common.security.SecurityContext; 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; /** * @@ -147,6 +148,11 @@ public interface ServiceContext { */ 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) */ @@ -323,6 +329,9 @@ public interface ServiceContext { public UriInfo getUriInfo(); + public RepositoryDomainType getRepositoryDomain(); + + public void setRepositoryDomain(RepositoryDomainType repositoryDomain); } diff --git a/services/common/src/main/java/org/collectionspace/services/common/init/AddIndices.java b/services/common/src/main/java/org/collectionspace/services/common/init/AddIndices.java index fc654c2ee..910934d47 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/init/AddIndices.java +++ b/services/common/src/main/java/org/collectionspace/services/common/init/AddIndices.java @@ -87,7 +87,8 @@ public class AddIndices extends InitHandler implements IInitHandler { /** See the class javadoc for this class: it shows the syntax supported in the configuration params. */ @Override - public void onRepositoryInitialized(DataSource dataSource, + public void onRepositoryInitialized(String dataSourceName, + String repositoryName, ServiceBindingType sbt, List fields, List properties) throws Exception { @@ -106,21 +107,25 @@ public class AddIndices extends InitHandler implements IInitHandler { if(Tools.notEmpty(param) && (param.indexOf(',')>-1)){ String[] fieldNames = param.split(","); for (String fn: fieldNames){ - rows = addOneIndex(dataSource, tableName, fn); + rows = addOneIndex(dataSourceName, repositoryName, tableName, fn); } } else { - rows = addOneIndex(dataSource, tableName, fieldName); + rows = addOneIndex(dataSourceName, repositoryName, tableName, fieldName); } } } - private int addOneIndex(DataSource dataSource, String tableName, String columnName){ + private int addOneIndex(String dataSourceName, + String repositoryName, + String tableName, + String columnName) { int rows = 0; String sql = ""; String indexName = tableName + INDEX_SEP + columnName + INDEX_SUFFIX; try { - DatabaseProductType databaseProductType = JDBCTools.getDatabaseProductType(); - if (indexExists(dataSource, databaseProductType, tableName, columnName, indexName)) { + DatabaseProductType databaseProductType = JDBCTools.getDatabaseProductType(dataSourceName, repositoryName); + if (indexExists(dataSourceName, repositoryName, databaseProductType, + tableName, columnName, indexName)) { logger.trace("Index already exists for column " + columnName + " in table " + tableName); // FIXME: Can add the option to drop and re-create an index here. @@ -148,7 +153,7 @@ public class AddIndices extends InitHandler implements IInitHandler { // // 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); logger.trace("Index added to column ("+columnName+") on table ("+tableName+")"); } return rows; @@ -158,7 +163,8 @@ public class AddIndices extends InitHandler implements IInitHandler { } } - private boolean indexExists(DataSource dataSource, + private boolean indexExists(String dataSourceName, + String repositoryName, DatabaseProductType databaseProductType, String tableName, String colName, @@ -204,7 +210,7 @@ public class AddIndices extends InitHandler implements IInitHandler { // // If this assumption is no longer valid, we might instead // identify the relevant repository from the table name here. - conn = JDBCTools.getConnection(dataSource); + conn = JDBCTools.getConnection(dataSourceName, repositoryName); stmt = conn.createStatement(); rs = stmt.executeQuery(sql); if (rs.next()) { diff --git a/services/common/src/main/java/org/collectionspace/services/common/init/IInitHandler.java b/services/common/src/main/java/org/collectionspace/services/common/init/IInitHandler.java index 9eecbcfff..fc1154bec 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/init/IInitHandler.java +++ b/services/common/src/main/java/org/collectionspace/services/common/init/IInitHandler.java @@ -2,8 +2,6 @@ package org.collectionspace.services.common.init; import java.util.List; -import javax.sql.DataSource; - 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; @@ -15,7 +13,8 @@ import org.collectionspace.services.config.service.ServiceBindingType; */ public interface IInitHandler { - public void onRepositoryInitialized(DataSource dataSource, + public void onRepositoryInitialized(String dataSourceName, + String repositoryName, ServiceBindingType sbt, List fields, List property) throws Exception; diff --git a/services/common/src/main/java/org/collectionspace/services/common/init/InitHandler.java b/services/common/src/main/java/org/collectionspace/services/common/init/InitHandler.java index 6318b633c..2ad25624f 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/init/InitHandler.java +++ b/services/common/src/main/java/org/collectionspace/services/common/init/InitHandler.java @@ -26,8 +26,6 @@ import org.slf4j.LoggerFactory; import java.util.List; -import javax.sql.DataSource; - /** Concrete class which does nothing, but subclasses may override to do * some action on the event onRepositoryInitialized(), such as sending JDBC * calls to the repository to add indices, etc. @@ -50,7 +48,8 @@ public class InitHandler implements IInitHandler { * @throws Exception */ @Override - public void onRepositoryInitialized(DataSource dataSource, + public void onRepositoryInitialized(String dataSourceName, + String repositoryName, ServiceBindingType sbt, List fields, List properties) throws Exception { diff --git a/services/common/src/main/java/org/collectionspace/services/common/init/ModifyFieldDatatypes.java b/services/common/src/main/java/org/collectionspace/services/common/init/ModifyFieldDatatypes.java index 8e1cca0f1..ff8a3985e 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/init/ModifyFieldDatatypes.java +++ b/services/common/src/main/java/org/collectionspace/services/common/init/ModifyFieldDatatypes.java @@ -54,7 +54,8 @@ public class ModifyFieldDatatypes extends InitHandler implements IInitHandler { final Logger logger = LoggerFactory.getLogger(ModifyFieldDatatypes.class); @Override - public void onRepositoryInitialized(DataSource dataSource, + public void onRepositoryInitialized(String dataSourceName, + String repositoryName, ServiceBindingType sbt, List fields, List properties) throws Exception { @@ -66,12 +67,12 @@ public class ModifyFieldDatatypes extends InitHandler implements IInitHandler { + " 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; @@ -101,7 +102,7 @@ public class ModifyFieldDatatypes extends InitHandler implements IInitHandler { // // 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; @@ -143,7 +144,8 @@ public class ModifyFieldDatatypes extends InitHandler implements IInitHandler { return datatype; } - private boolean fieldHasDesiredDatatype(DataSource dataSource, + private boolean fieldHasDesiredDatatype(String dataSourceName, + String repositoryName, DatabaseProductType databaseProductType, Field field, String datatype) { @@ -160,16 +162,18 @@ public class ModifyFieldDatatypes extends InitHandler implements IInitHandler { 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() + "'"; } diff --git a/services/common/src/main/java/org/collectionspace/services/common/init/RunSqlScript.java b/services/common/src/main/java/org/collectionspace/services/common/init/RunSqlScript.java new file mode 100644 index 000000000..085e45a85 --- /dev/null +++ b/services/common/src/main/java/org/collectionspace/services/common/init/RunSqlScript.java @@ -0,0 +1,190 @@ +/** + * 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 fields, + List 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 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); + } + } + } +} diff --git a/services/common/src/main/java/org/collectionspace/services/common/query/QueryManager.java b/services/common/src/main/java/org/collectionspace/services/common/query/QueryManager.java index 86be6ed1c..d4b703de7 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/query/QueryManager.java +++ b/services/common/src/main/java/org/collectionspace/services/common/query/QueryManager.java @@ -27,6 +27,7 @@ package org.collectionspace.services.common.query; import org.collectionspace.services.client.IQueryManager; +import org.collectionspace.services.common.context.ServiceContext; import org.collectionspace.services.common.query.nuxeo.QueryManagerNuxeoImpl; public class QueryManager { @@ -59,8 +60,12 @@ public class QueryManager { * * @return the string */ - static public String createWhereClauseForPartialMatch(String field, String partialTerm) { - return queryManager.createWhereClauseForPartialMatch(field, partialTerm); + static public String createWhereClauseForPartialMatch(ServiceContext ctx, + String field, + String partialTerm) throws Exception { + String repositoryName = ctx.getRepositoryName(); + return queryManager.createWhereClauseForPartialMatch(queryManager.getDatasourceName(), + repositoryName, field, partialTerm); } /** diff --git a/services/common/src/main/java/org/collectionspace/services/common/query/nuxeo/QueryManagerNuxeoImpl.java b/services/common/src/main/java/org/collectionspace/services/common/query/nuxeo/QueryManagerNuxeoImpl.java index 61715b354..ba2b52362 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/query/nuxeo/QueryManagerNuxeoImpl.java +++ b/services/common/src/main/java/org/collectionspace/services/common/query/nuxeo/QueryManagerNuxeoImpl.java @@ -44,7 +44,6 @@ import org.collectionspace.services.nuxeo.client.java.NuxeoClientEmbedded; import org.collectionspace.services.nuxeo.client.java.NuxeoConnectorEmbedded; import org.collectionspace.services.client.IQueryManager; -import org.collectionspace.services.common.invocable.Invocable; import org.collectionspace.services.common.invocable.InvocableUtils; import org.collectionspace.services.common.storage.DatabaseProductType; import org.collectionspace.services.common.storage.JDBCTools; @@ -70,10 +69,10 @@ public class QueryManagerNuxeoImpl implements IQueryManager { private static Pattern kwdSearchProblemChars = Pattern.compile("[\\:\\(\\)\\*\\%\\.]"); private static Pattern kwdSearchHyphen = Pattern.compile(" - "); - private static String getLikeForm() { + private static String getLikeForm(String dataSourceName, String repositoryName) { if (SEARCH_LIKE_FORM == null) { try { - DatabaseProductType type = JDBCTools.getDatabaseProductType(); + DatabaseProductType type = JDBCTools.getDatabaseProductType(dataSourceName, repositoryName); if (type == DatabaseProductType.MYSQL) { SEARCH_LIKE_FORM = IQueryManager.SEARCH_LIKE; } else if (type == DatabaseProductType.POSTGRESQL) { @@ -86,6 +85,11 @@ public class QueryManagerNuxeoImpl implements IQueryManager { return SEARCH_LIKE_FORM; } + @Override + public String getDatasourceName() { + return JDBCTools.NUXEO_DATASOURCE_NAME; + } + // TODO: This is currently just an example fixed query. This should // eventually be // removed or replaced with a more generic method. @@ -256,7 +260,9 @@ public class QueryManagerNuxeoImpl implements IQueryManager { // Both these require using JDBC, since we cannot get to the fulltext table // in NXQL @Override - public String createWhereClauseForPartialMatch(String field, + public String createWhereClauseForPartialMatch(String dataSourceName, + String repositoryName, + String field, String partialTerm) { String trimmed = (partialTerm == null) ? "" : partialTerm.trim(); if (trimmed.isEmpty()) { @@ -265,7 +271,7 @@ public class QueryManagerNuxeoImpl implements IQueryManager { if (field == null || field.isEmpty()) { throw new RuntimeException("No match field specified."); } - String ptClause = field + getLikeForm() + "'%" + String ptClause = field + getLikeForm(dataSourceName, repositoryName) + "'%" + unescapedSingleQuote.matcher(trimmed).replaceAll("\\\\'") + "%'"; return ptClause; diff --git a/services/common/src/main/java/org/collectionspace/services/common/repository/RepositoryClient.java b/services/common/src/main/java/org/collectionspace/services/common/repository/RepositoryClient.java index c3d815a8e..c9967c00f 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/repository/RepositoryClient.java +++ b/services/common/src/main/java/org/collectionspace/services/common/repository/RepositoryClient.java @@ -31,6 +31,7 @@ import org.collectionspace.services.common.document.DocumentException; 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; @@ -54,7 +55,7 @@ public interface RepositoryClient extends StorageClient { * @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 @@ -62,7 +63,7 @@ public interface RepositoryClient extends StorageClient { * @return * @throws Exception */ - public String getDomainId(String domainName) throws Exception; + public String getDomainId(RepositoryDomainType repositoryDomain) throws Exception; /** * retrieveWorkspaceIds retrieve workspace ids for given domain @@ -70,7 +71,7 @@ public interface RepositoryClient extends StorageClient { * @return Hashtable * @throws Exception */ - public Hashtable retrieveWorkspaceIds(String domainName) throws Exception; + public Hashtable retrieveWorkspaceIds(RepositoryDomainType repositoryDomain) throws Exception; /** * createWorkspace creates a workspace in default repository under given domain @@ -79,7 +80,7 @@ public interface RepositoryClient extends StorageClient { * @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 diff --git a/services/common/src/main/java/org/collectionspace/services/common/storage/JDBCTools.java b/services/common/src/main/java/org/collectionspace/services/common/storage/JDBCTools.java index ab5909642..614ab3a7b 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/storage/JDBCTools.java +++ b/services/common/src/main/java/org/collectionspace/services/common/storage/JDBCTools.java @@ -17,7 +17,6 @@ */ package org.collectionspace.services.common.storage; -import org.collectionspace.services.common.ServiceMain; import org.collectionspace.services.common.api.Tools; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -25,11 +24,9 @@ import org.slf4j.LoggerFactory; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; -import javax.security.auth.login.LoginException; import javax.sql.DataSource; import java.sql.DatabaseMetaData; import java.sql.Connection; -import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.HashMap; @@ -41,88 +38,122 @@ import java.util.HashMap; */ public class JDBCTools { public static HashMap cachedDataSources = new HashMap(); - public static String CSPACE_REPOSITORY_NAME = "CspaceDS"; - public static String NUXEO_REPOSITORY_NAME = "NuxeoDS"; + public static String CSPACE_DATASOURCE_NAME = "CspaceDS"; + public static String NUXEO_DATASOURCE_NAME = "NuxeoDS"; + // Default database names + public static String DEFAULT_CSPACE_DATABASE_NAME = "cspace"; + public static String DEFAULT_NUXEO_REPOSITORY_NAME = "default"; + public static String DEFAULT_NUXEO_DATABASE_NAME = "nuxeo"; // // Private constants // - private static String DEFAULT_REPOSITORY_NAME = NUXEO_REPOSITORY_NAME; private static String DBProductName = null; - private static DatabaseProductType DBProductType = DatabaseProductType.UNRECOGNIZED; //todo: make sure this will get instantiated in the right order final static Logger logger = LoggerFactory.getLogger(JDBCTools.class); + private static final CharSequence URL_DATABASE_NAME = "${DatabaseName}"; private static String JDBC_URL_DATABASE_SEPARATOR = "\\/"; - public static DataSource getDataSource(String repositoryName) throws NamingException { + public static DataSource getDataSource(String dataSourceName) throws NamingException { DataSource result = null; // // First, see if we already have this DataSource instance cached // - result = cachedDataSources.get(repositoryName); + result = cachedDataSources.get(dataSourceName); if (result == null) { InitialContext ctx = new InitialContext(); Context envCtx = null; if (logger.isDebugEnabled() == true) { - logger.debug("Looking up DataSource instance in JNDI with name: " + repositoryName); + logger.debug("Looking up DataSource instance in JNDI with name: " + dataSourceName); } try { envCtx = (Context) ctx.lookup("java:comp/env"); - DataSource ds = (DataSource) envCtx.lookup("jdbc/" + repositoryName); + DataSource ds = (DataSource) envCtx.lookup("jdbc/" + dataSourceName); if (ds == null) { - throw new IllegalArgumentException("DataSource instance not found: " + repositoryName); + throw new IllegalArgumentException("DataSource instance not found: " + dataSourceName); } else { result = ds; // now cache this DataSource instance for future references - cachedDataSources.put(repositoryName, result); + cachedDataSources.put(dataSourceName, result); } } finally { if (ctx != null) { try { ctx.close(); } catch (Exception e) { - logger.error("Error getting DataSource for: " + repositoryName, e); + logger.error("Error getting DataSource for: " + dataSourceName, e); } } if (envCtx != null) { try { envCtx.close(); } catch (Exception e) { - logger.error("Error getting DataSource for: " + repositoryName, e); + logger.error("Error getting DataSource for: " + dataSourceName, e); } } } } + if (result != null) { +// DataSource resultClone = result. + } + return result; } - /* - * This is a wrapper around DataSource's getConnectionMethod -mainly exists modularize all connection related code to JDBCTool class. - */ - public static Connection getConnection(DataSource dataSource) throws SQLException { - Connection result = null; - result = dataSource.getConnection(); - return result; - } - - public static Connection getConnection(String repositoryName) throws NamingException, SQLException { + public static Connection getConnection(String dataSourceName, String repositoryName) throws NamingException, SQLException { Connection result = null; - if (Tools.isEmpty(repositoryName)) { - repositoryName = getDefaultRepositoryName(); - if (logger.isWarnEnabled() == true) { - logger.warn("getConnection() method was called with an empty or null repository name. Using " + repositoryName + " instead."); - } + if (Tools.isEmpty(dataSourceName) || Tools.isEmpty(repositoryName)) { + String errMsg = String.format( + "The getConnection() method was called with an empty or null repository name = '%s' and/or data source name = '%s'.", + dataSourceName, repositoryName); + logger.error(errMsg); + throw new NamingException(errMsg); } + + // FIXME: REM - We can rid ourselves of this special case by using the DEFAULT_NUXEO_DATABASE_NAME as the default + // value for the "repositoryName" attribute in the tenant bindings XSD (XML Schema) definition. + // + // *Special Case* - Nuxeo's default repository name is "default" but the database is called "nuxeo" + // + if (dataSourceName.equals(JDBCTools.NUXEO_DATASOURCE_NAME) && + repositoryName.equals(JDBCTools.DEFAULT_NUXEO_REPOSITORY_NAME)) { + repositoryName = DEFAULT_NUXEO_DATABASE_NAME; + } - DataSource ds = getDataSource(repositoryName); - Connection conn = getConnection(ds); - result = conn; - + /* + * We synch this block as a workaround to not have separate DataSource instances for + * each Nuxeo repo/DB. Ideally, we should replace the need for this synch block by + * registering a separate DataSource for each repo/db at init/start-up time. + * + * We need to sync because we're changing the URL of the datasource inorder to get the correct + * connection. The synch prevents different threads from getting the incorrect connection -i.e., one pointing + * to the wrong URL. + */ + Connection conn = null; + synchronized (JDBCTools.class) { + org.apache.tomcat.dbcp.dbcp.BasicDataSource dataSource = + (org.apache.tomcat.dbcp.dbcp.BasicDataSource)getDataSource(dataSourceName); + // Get the template URL value from the JNDI datasource and substitute the databaseName + String urlTemplate = dataSource.getUrl(); + String connectionUrl = urlTemplate.replace(URL_DATABASE_NAME, repositoryName); + dataSource.setUrl(connectionUrl); + + try { + conn = dataSource.getConnection(); + result = conn; + if (logger.isTraceEnabled() == true && conn != null) { + logger.trace(String.format("Connection made to repository = '%s' using datasource = '%s'", repositoryName, dataSourceName)); + } + } finally { + dataSource.setUrl(urlTemplate); // Reset the data source URL value back to the template value + } + } + return result; } @@ -158,11 +189,11 @@ public class JDBCTools { } } */ - public static int executeUpdate(DataSource dataSource, String sql) throws Exception { + public static int executeUpdate(String dataSourceName, String repositoryName, String sql) throws Exception { Connection conn = null; Statement stmt = null; try { - conn = getConnection(dataSource); + conn = getConnection(dataSourceName, repositoryName); stmt = conn.createStatement(); int rows = stmt.executeUpdate(sql); stmt.close(); @@ -209,12 +240,16 @@ public class JDBCTools { * @return the database product name */ public static String getDatabaseProductName() { - if(DBProductName==null) { + if (DBProductName == null) { Connection conn = null; try { - conn = getConnection(getDefaultRepositoryName()); //FIXME: REM - getDefaultRepositoryName returns the Nuxeo repo name -we should be using the "cspace" repo name + conn = getConnection(CSPACE_DATASOURCE_NAME, DEFAULT_CSPACE_DATABASE_NAME); DBProductName = conn.getMetaData().getDatabaseProductName(); } catch (Exception e) { + if (logger.isTraceEnabled() == true) { + logger.trace(String.format("Could not open a connection. DataSource='%s' DB='%s'.", + CSPACE_DATASOURCE_NAME, DEFAULT_CSPACE_DATABASE_NAME)); + } } finally { try { if (conn != null) { @@ -226,6 +261,7 @@ public class JDBCTools { } } } + return DBProductName; } @@ -236,23 +272,21 @@ public class JDBCTools { * @return an enumerated value identifying the database product type * @throws Exception */ - public static DatabaseProductType getDatabaseProductType() throws Exception { - if(DBProductType == DatabaseProductType.UNRECOGNIZED) { - String productName = getDatabaseProductName(); - if (productName.matches("(?i).*mysql.*")) { - DBProductType = DatabaseProductType.MYSQL; - } else if (productName.matches("(?i).*postgresql.*")) { - DBProductType = DatabaseProductType.POSTGRESQL; - } else { - throw new Exception("Unrecognized database system " - + productName); - } - } - return DBProductType; - } - - private static String getDefaultRepositoryName() { - return DEFAULT_REPOSITORY_NAME; + public static DatabaseProductType getDatabaseProductType(String dataSourceName, + String repositoryName) throws Exception { + DatabaseProductType result = DatabaseProductType.UNRECOGNIZED; + + String productName = getDatabaseProductName(); + if (productName.matches("(?i).*mysql.*")) { + result = DatabaseProductType.MYSQL; + } else if (productName.matches("(?i).*postgresql.*")) { + result = DatabaseProductType.POSTGRESQL; + } else { + throw new Exception("Unrecognized database system " + + productName); + } + + return result; } /** @@ -262,26 +296,29 @@ public class JDBCTools { * @return the catalog name. * @throws SQLException */ - public static String getDatabaseName(Connection conn) throws Exception { - String databaseName = ""; - if (conn == null) { - return databaseName; - } - DatabaseMetaData metadata = conn.getMetaData(); - String urlStr = metadata.getURL(); + public static String getDatabaseName(String dataSourceName, + String repositoryName, + Connection conn) throws Exception { + String databaseName = null; - // Format of the PostgreSQL JDBC URL: - // http://jdbc.postgresql.org/documentation/80/connect.html - if (getDatabaseProductType() == DatabaseProductType.POSTGRESQL) { - String tokens[] = urlStr.split(JDBC_URL_DATABASE_SEPARATOR); - databaseName = tokens[tokens.length - 1]; - // Format of the MySQL JDBC URL: - // http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html - // FIXME: the last token could contain optional parameters, not accounted for here. - } else if (getDatabaseProductType() == DatabaseProductType.MYSQL) { - String tokens[] = urlStr.split(JDBC_URL_DATABASE_SEPARATOR); - databaseName = tokens[tokens.length - 1]; + if (conn != null) { + DatabaseMetaData metadata = conn.getMetaData(); + String urlStr = metadata.getURL(); + + // Format of the PostgreSQL JDBC URL: + // http://jdbc.postgresql.org/documentation/80/connect.html + if (getDatabaseProductType(dataSourceName, repositoryName) == DatabaseProductType.POSTGRESQL) { + String tokens[] = urlStr.split(JDBC_URL_DATABASE_SEPARATOR); + databaseName = tokens[tokens.length - 1]; + // Format of the MySQL JDBC URL: + // http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html + // FIXME: the last token could contain optional parameters, not accounted for here. + } else if (getDatabaseProductType(dataSourceName, repositoryName) == DatabaseProductType.MYSQL) { + String tokens[] = urlStr.split(JDBC_URL_DATABASE_SEPARATOR); + databaseName = tokens[tokens.length - 1]; + } } + return databaseName; } diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoClientEmbedded.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoClientEmbedded.java index e31f25af4..c2672e8b7 100644 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoClientEmbedded.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoClientEmbedded.java @@ -32,6 +32,7 @@ import javax.transaction.TransactionManager; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.collectionspace.services.config.tenant.RepositoryDomainType; import org.jboss.remoting.InvokerLocator; import org.nuxeo.common.collections.ListenerList; import org.nuxeo.ecm.core.api.repository.Repository; @@ -41,6 +42,7 @@ import org.nuxeo.ecm.core.api.repository.RepositoryManager; import org.nuxeo.ecm.core.client.ConnectionListener; import org.nuxeo.ecm.core.client.DefaultLoginHandler; import org.nuxeo.ecm.core.client.LoginHandler; +import org.nuxeo.ecm.core.repository.RepositoryDescriptor; import org.nuxeo.ecm.core.schema.SchemaManager; import org.nuxeo.ecm.core.schema.SchemaManagerImpl; import org.nuxeo.ecm.core.schema.TypeProvider; @@ -376,15 +378,39 @@ public final class NuxeoClientEmbedded { return getRepositoryManager().getRepository(name); } + /* + * Open a Nuxeo repo session using the passed in repoDomain and use the default tx timeout period + */ + public RepositoryInstance openRepository(RepositoryDomainType repoDomain) throws Exception { + return openRepository(repoDomain.getRepositoryName(), -1); + } + + /* + * Open a Nuxeo repo session using the passed in repoDomain and use the default tx timeout period + */ + public RepositoryInstance openRepository(String repoName) throws Exception { + return openRepository(repoName, -1); + } + + /* + * Open a Nuxeo repo session using the default repo with the specified (passed in) tx timeout period + */ + @Deprecated public RepositoryInstance openRepository(int timeoutSeconds) throws Exception { return openRepository(null, timeoutSeconds); } + /* + * Open a Nuxeo repo session using the default repo with the default tx timeout period + */ + @Deprecated public RepositoryInstance openRepository() throws Exception { - return openRepository(-1 /*default timeout period*/); + return openRepository(null, -1 /*default timeout period*/); } - public RepositoryInstance openRepository(String name, int timeoutSeconds) throws Exception { + public RepositoryInstance openRepository(String repoName, int timeoutSeconds) throws Exception { + RepositoryInstance result = null; + if (timeoutSeconds > 0) { TransactionManager transactionMgr = TransactionHelper.lookupTransactionManager(); transactionMgr.setTransactionTimeout(timeoutSeconds); @@ -400,20 +426,27 @@ public final class NuxeoClientEmbedded { } Repository repository = null; - if (name != null) { - repository = getRepositoryManager().getRepository(name); + if (repoName != null) { + repository = getRepositoryManager().getRepository(repoName); } else { - repository = getRepositoryManager().getDefaultRepository(); + repository = getRepositoryManager().getDefaultRepository(); // Add a log info statement here stating that since no repo name was given we'll use the default repo instead } - RepositoryInstance repo = newRepositoryInstance(repository); - String key = repo.getSessionId(); - repositoryInstances.put(key, repo); - if (logger.isTraceEnabled()) { - logger.trace("Added a new repository instance to our repo list. Current count is now: " - + repositoryInstances.size()); + + if (repository != null) { + result = newRepositoryInstance(repository); + String key = result.getSessionId(); + repositoryInstances.put(key, result); + if (logger.isTraceEnabled()) { + logger.trace("Added a new repository instance to our repo list. Current count is now: " + + repositoryInstances.size()); + } + } else { + String errMsg = String.format("Could not open a session to the Nuxeo repository='%s'", repoName); + logger.error(errMsg); + throw new Exception(errMsg); } - return repo; + return result; } public void releaseRepository(RepositoryInstance repo) throws Exception { @@ -449,7 +482,7 @@ public final class NuxeoClientEmbedded { if (cl == null) { cl = NuxeoClientEmbedded.class.getClassLoader(); } - return new RepositoryInstanceHandler(repository).getProxy(); + return new RepositoryInstanceHandler(repository).getProxy(); // Why a proxy here? } public void addConnectionListener(ConnectionListener listener) { diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoConnectorEmbedded.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoConnectorEmbedded.java index bda350a79..694ab3f93 100644 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoConnectorEmbedded.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/NuxeoConnectorEmbedded.java @@ -2,17 +2,28 @@ package org.collectionspace.services.nuxeo.client.java; import java.io.File; import java.io.IOException; +import java.util.Collection; import java.util.Hashtable; import java.util.Iterator; +import javax.naming.InitialContext; +import javax.naming.NamingException; import javax.servlet.ServletContext; import org.collectionspace.services.config.RepositoryClientConfigType; +import org.collectionspace.services.config.tenant.RepositoryDomainType; import org.collectionspace.services.nuxeo.util.NuxeoUtils; +import org.nuxeo.ecm.core.NXCore; import org.nuxeo.ecm.core.api.DocumentModel; import org.nuxeo.ecm.core.api.DocumentModelList; import org.nuxeo.ecm.core.api.repository.RepositoryInstance; +import org.nuxeo.ecm.core.model.Repository; import org.nuxeo.osgi.application.FrameworkBootstrap; +import org.nuxeo.ecm.core.repository.RepositoryDescriptor; +import org.nuxeo.ecm.core.repository.RepositoryFactory; +import org.nuxeo.ecm.core.storage.sql.ra.ConnectionFactoryImpl; +import org.nuxeo.ecm.core.storage.sql.ra.ManagedConnectionFactoryImpl; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -174,6 +185,30 @@ public class NuxeoConnectorEmbedded { } } } + + public String getDatabaseName(String repoName) { + String result = null; + + try { + this.getRepositoryDescriptor(repoName); + } catch (Exception e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + + Repository repository = null; + try { + repository = this.lookupRepository(repoName); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + ConnectionFactoryImpl connectionFactory = (ConnectionFactoryImpl)repository; + ManagedConnectionFactoryImpl managedConnectionFactory = connectionFactory.getManagedConnectionFactory(); + String serverUrl = managedConnectionFactory.getServerURL(); + + return result; + } /** * releaseRepositorySession releases given repository session @@ -198,14 +233,51 @@ public class NuxeoConnectorEmbedded { * @return RepositoryInstance * @throws java.lang.Exception */ - public RepositoryInstance getRepositorySession() throws Exception { - RepositoryInstance repoSession = getClient().openRepository(); - if (logger.isDebugEnabled()) { + public RepositoryInstance getRepositorySession(RepositoryDomainType repoDomain) throws Exception { + RepositoryInstance repoSession = getClient().openRepository(repoDomain); + if (logger.isDebugEnabled() && repoSession != null) { logger.debug("getRepositorySession() opened repository session"); + String repoName = repoDomain.getRepositoryName(); + String databaseName = this.getDatabaseName(repoName); // For debugging purposes only } return repoSession; } + public Repository lookupRepository(String name) throws Exception { + Repository repo; + try { + // needed by glassfish + repo = (Repository) new InitialContext().lookup("NXRepository/" + + name); + } catch (NamingException e) { + try { + // needed by jboss + repo = (Repository) new InitialContext().lookup("java:NXRepository/" + + name); + } catch (NamingException ee) { + repo = (Repository) NXCore.getRepositoryService().getRepositoryManager().getRepository( + name); + } + } + if (repo == null) { + throw new IllegalArgumentException("Repository not found: " + name); + } + return repo; + } + + public RepositoryDescriptor getRepositoryDescriptor(String name) throws Exception { + RepositoryDescriptor repo = null; + + Iterable descriptorsList = NXCore.getRepositoryService().getRepositoryManager().getDescriptors(); + for (RepositoryDescriptor descriptor : descriptorsList) { + String homeDir = descriptor.getHomeDirectory(); + String config = descriptor.getConfigurationFile(); + RepositoryFactory factor = descriptor.getFactory(); + } + + return repo; + } + /** * getClient get Nuxeo client for accessing Nuxeo services remotely using * Nuxeo Java (EJB) Remote APIS @@ -250,32 +322,30 @@ public class NuxeoConnectorEmbedded { /** * retrieveWorkspaceIds retrieves all workspace ids from default repository * - * @param tenantDomain - * domain representing tenant + * @param repoDomain + * a repository domain for a given tenant - see the tenant bindings XML file for details * @return * @throws java.lang.Exception */ - public Hashtable retrieveWorkspaceIds(String tenantDomain) + public Hashtable retrieveWorkspaceIds(RepositoryDomainType repoDomain) throws Exception { RepositoryInstance repoSession = null; Hashtable workspaceIds = new Hashtable(); try { - repoSession = getRepositorySession(); + repoSession = getRepositorySession(repoDomain); DocumentModel rootDoc = repoSession.getRootDocument(); - DocumentModelList rootChildrenList = repoSession - .getChildren(rootDoc.getRef()); + DocumentModelList rootChildrenList = repoSession.getChildren(rootDoc.getRef()); Iterator diter = rootChildrenList.iterator(); while (diter.hasNext()) { DocumentModel domain = diter.next(); - String domainPath = "/" + tenantDomain; + String domainPath = "/" + repoDomain.getStorageName(); if (!domain.getPathAsString().equalsIgnoreCase(domainPath)) { - continue; + continue; // If it's not our domain folder/directory then skip it } if (logger.isDebugEnabled()) { logger.debug("domain=" + domain.toString()); } - DocumentModelList domainChildrenList = repoSession - .getChildren(domain.getRef()); + DocumentModelList domainChildrenList = repoSession.getChildren(domain.getRef()); Iterator witer = domainChildrenList.iterator(); while (witer.hasNext()) { DocumentModel childNode = witer.next(); diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RepositoryJavaClientImpl.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RepositoryJavaClientImpl.java index 628bf3213..10f39f50b 100644 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RepositoryJavaClientImpl.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RepositoryJavaClientImpl.java @@ -48,6 +48,7 @@ import org.collectionspace.services.common.document.DocumentHandler.Action; 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; @@ -1194,19 +1195,24 @@ public class RepositoryJavaClientImpl implements RepositoryClient retrieveWorkspaceIds(String domainName) throws Exception { - return NuxeoConnectorEmbedded.getInstance().retrieveWorkspaceIds(domainName); + public Hashtable 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(), @@ -1238,7 +1244,7 @@ public class RepositoryJavaClientImpl implements RepositoryClient + * + * 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', + '', +' + + + + + + . + . + + + 6 + 1 + -1 + + +'); + +-- 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', + '', +' + + + + + + . + . + + + 6 + 1 + -1 + + + . + . + + + 6 + 1 + -1 + + +'); + +-- 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', + '', +' + + + AR + AR + + + + + + . + . + + + 6 + 1 + -1 + + +'); + +-- 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', + '', +' + + + EV + EV + + + + + + . + . + + + 6 + 1 + -1 + + +'); + +-- 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', + '', +' + + + IN + IN + + + + + + . + . + + + 6 + 1 + -1 + + +'); + +-- 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', + '', +' + + + IN + IN + + + + + + . + . + + + 6 + 1 + -1 + + + . + . + + + 6 + 1 + -1 + + +'); + +-- 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', + '', +' + + + INV + INV + + + + + + . + . + + + 6 + 1 + -1 + + + . + . + + + 6 + 1 + -1 + + +'); + +-- 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', + '', +' + + + LIB + LIB + + + + + + . + . + + + 6 + 1 + -1 + + +'); + +-- 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', + '', +' + + + LI + LI + + + + + + . + . + + + 6 + 1 + -1 + + + . + . + + + 6 + 1 + -1 + + +'); + +-- 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', + '', +' + + + LO + LO + + + + + + . + . + + + 6 + 1 + -1 + + + . + . + + + 6 + 1 + -1 + + +'); + +-- 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', + '', +' + + + LOC + LOC + + + + + + . + . + + + 6 + 1 + -1 + + + . + . + + + 6 + 1 + -1 + + +'); + +-- 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', + '', +' + + + MR + MR + + + + + + . + . + + + 6 + 1 + -1 + + + . + . + + + 6 + 1 + -1 + + +'); + +-- 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', + '', +' + + + MV + MV + + + + + + . + . + + + 6 + 1 + -1 + + +'); + +-- 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', + '', +' + + + EX + EX + + + + + + . + . + + + 6 + 1 + -1 + + +'); + +-- 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', + '', +' + + + ST + ST + + + + + + . + . + + + 6 + 1 + -1 + + +'); + +-- 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', + '', +' + + + TT + TT + + + + + + . + . + + + 6 + 1 + -1 + + +'); + +-- 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', + '', +' + + + + +'); + +SHOW WARNINGS; diff --git a/services/common/src/main/resources/db/postgresql/create_id_generators_table.sql b/services/common/src/main/resources/db/postgresql/create_id_generators_table.sql new file mode 100644 index 000000000..d087fd5fe --- /dev/null +++ b/services/common/src/main/resources/db/postgresql/create_id_generators_table.sql @@ -0,0 +1,53 @@ +/* + * 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(); + diff --git a/services/common/src/main/resources/db/postgresql/load_id_generators.sql b/services/common/src/main/resources/db/postgresql/load_id_generators.sql new file mode 100644 index 000000000..b4ec5495f --- /dev/null +++ b/services/common/src/main/resources/db/postgresql/load_id_generators.sql @@ -0,0 +1,723 @@ +/* + * 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 + * + * 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', + '', +' + + + + + + . + . + + + 6 + 1 + -1 + + +' + 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', + '', +' + + + + + + . + . + + + 6 + 1 + -1 + + + . + . + + + 6 + 1 + -1 + + +' + 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', + '', +' + + + AR + AR + + + + + + . + . + + + 6 + 1 + -1 + + +' + 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', + '', +' + + + EV + EV + + + + + + . + . + + + 6 + 1 + -1 + + +' + 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', + '', +' + + + IN + IN + + + + + + . + . + + + 6 + 1 + -1 + + +' + 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', + '', +' + + + IN + IN + + + + + + . + . + + + 6 + 1 + -1 + + + . + . + + + 6 + 1 + -1 + + +' + 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', + '', +' + + + INV + INV + + + + + + . + . + + + 6 + 1 + -1 + + + . + . + + + 6 + 1 + -1 + + +' + 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', + '', +' + + + LIB + LIB + + + + + + . + . + + + 6 + 1 + -1 + + +' + 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', + '', +' + + + LI + LI + + + + + + . + . + + + 6 + 1 + -1 + + + . + . + + + 6 + 1 + -1 + + +' + 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', + '', +' + + + LO + LO + + + + + + . + . + + + 6 + 1 + -1 + + + . + . + + + 6 + 1 + -1 + + +' + 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', + '', +' + + + LOC + LOC + + + + + + . + . + + + 6 + 1 + -1 + + + . + . + + + 6 + 1 + -1 + + +' + 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', + '', +' + + + MR + MR + + + + + + . + . + + + 6 + 1 + -1 + + + . + . + + + 6 + 1 + -1 + + +' + 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', + '', +' + + + MV + MV + + + + + + . + . + + + 6 + 1 + -1 + + +' + 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', + '', +' + + + EX + EX + + + + + + . + . + + + 6 + 1 + -1 + + +' + 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', + '', +' + + + ST + ST + + + + + + . + . + + + 6 + 1 + -1 + + +' + 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', + '', +' + + + TT + TT + + + + + + . + . + + + 6 + 1 + -1 + + +' + 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', + '', +' + + + + +' + WHERE '1fa40353-05b8-4ae6-82a6-44a18b4f3c12' NOT IN + ( + SELECT csid + FROM id_generators + ); diff --git a/services/config/src/main/java/org/collectionspace/services/common/config/ConfigUtils.java b/services/config/src/main/java/org/collectionspace/services/common/config/ConfigUtils.java new file mode 100644 index 000000000..3e8c4e1a5 --- /dev/null +++ b/services/config/src/main/java/org/collectionspace/services/common/config/ConfigUtils.java @@ -0,0 +1,57 @@ +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 getRepositoryNameList(TenantBindingType tenantBindingType) { + List result = null; + + List repoDomainList = tenantBindingType.getRepositoryDomain(); + if (repoDomainList != null && repoDomainList.isEmpty() == false) { + result = new ArrayList(); + 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 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; + } + +} diff --git a/services/config/src/main/resources/tenant.xsd b/services/config/src/main/resources/tenant.xsd index 84d86f1a6..5fd98c885 100644 --- a/services/config/src/main/resources/tenant.xsd +++ b/services/config/src/main/resources/tenant.xsd @@ -66,6 +66,7 @@ + diff --git a/services/contact/.project b/services/contact/.project index 43c190af4..114bacd90 100644 --- a/services/contact/.project +++ b/services/contact/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/contact/.settings/org.maven.ide.eclipse.prefs b/services/contact/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 8bf82a11f..000000000 --- a/services/contact/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Dec 28 10:22:09 PST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/contact/3rdparty/.project b/services/contact/3rdparty/.project index 43e3cc4f0..9a453ba2d 100644 --- a/services/contact/3rdparty/.project +++ b/services/contact/3rdparty/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/contact/3rdparty/.settings/org.maven.ide.eclipse.prefs b/services/contact/3rdparty/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 8bf82a11f..000000000 --- a/services/contact/3rdparty/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Dec 28 10:22:09 PST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/contact/3rdparty/nuxeo-platform-cs-contact/.settings/org.maven.ide.eclipse.prefs b/services/contact/3rdparty/nuxeo-platform-cs-contact/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 8bf82a11f..000000000 --- a/services/contact/3rdparty/nuxeo-platform-cs-contact/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Dec 28 10:22:09 PST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/contact/client/.settings/org.maven.ide.eclipse.prefs b/services/contact/client/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 8bf82a11f..000000000 --- a/services/contact/client/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Dec 28 10:22:09 PST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/contact/jaxb/.settings/org.maven.ide.eclipse.prefs b/services/contact/jaxb/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index dd2ea026f..000000000 --- a/services/contact/jaxb/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Jan 19 22:49:48 PST 2011 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/contact/service/.settings/org.maven.ide.eclipse.prefs b/services/contact/service/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 8bf82a11f..000000000 --- a/services/contact/service/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Dec 28 10:22:09 PST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/dimension/.project b/services/dimension/.project index caefe4a42..c602d4fb8 100644 --- a/services/dimension/.project +++ b/services/dimension/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/dimension/.settings/org.maven.ide.eclipse.prefs b/services/dimension/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93b6f8a66..000000000 --- a/services/dimension/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:30 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/dimension/3rdparty/.project b/services/dimension/3rdparty/.project index f733f1b4c..c7eb0bb79 100644 --- a/services/dimension/3rdparty/.project +++ b/services/dimension/3rdparty/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/dimension/3rdparty/.settings/org.maven.ide.eclipse.prefs b/services/dimension/3rdparty/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93b6f8a66..000000000 --- a/services/dimension/3rdparty/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:30 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/dimension/3rdparty/nuxeo-platform-cs-dimension/.settings/org.maven.ide.eclipse.prefs b/services/dimension/3rdparty/nuxeo-platform-cs-dimension/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93b6f8a66..000000000 --- a/services/dimension/3rdparty/nuxeo-platform-cs-dimension/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:30 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/dimension/client/.settings/org.maven.ide.eclipse.prefs b/services/dimension/client/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93b6f8a66..000000000 --- a/services/dimension/client/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:30 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/dimension/jaxb/.settings/org.maven.ide.eclipse.prefs b/services/dimension/jaxb/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 86abf8e53..000000000 --- a/services/dimension/jaxb/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Jan 19 22:49:47 PST 2011 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/dimension/service/.settings/org.maven.ide.eclipse.prefs b/services/dimension/service/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93b6f8a66..000000000 --- a/services/dimension/service/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:30 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/group/.project b/services/group/.project index 86626f2ec..dbf1fa394 100644 --- a/services/group/.project +++ b/services/group/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/group/.settings/org.maven.ide.eclipse.prefs b/services/group/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 1156693b1..000000000 --- a/services/group/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Dec 03 15:35:01 PST 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/group/3rdparty/.project b/services/group/3rdparty/.project index a9335a34b..fd5779382 100644 --- a/services/group/3rdparty/.project +++ b/services/group/3rdparty/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/group/3rdparty/.settings/org.maven.ide.eclipse.prefs b/services/group/3rdparty/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index e2ce08c02..000000000 --- a/services/group/3rdparty/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Aug 27 16:35:21 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/group/3rdparty/nuxeo-platform-cs-group/.settings/org.maven.ide.eclipse.prefs b/services/group/3rdparty/nuxeo-platform-cs-group/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index e2ce08c02..000000000 --- a/services/group/3rdparty/nuxeo-platform-cs-group/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Aug 27 16:35:21 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/group/client/.settings/org.maven.ide.eclipse.prefs b/services/group/client/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index e2ce08c02..000000000 --- a/services/group/client/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Aug 27 16:35:21 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/group/jaxb/.settings/org.maven.ide.eclipse.prefs b/services/group/jaxb/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index c9f07df5d..000000000 --- a/services/group/jaxb/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Jan 19 22:49:45 PST 2011 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/group/service/.settings/org.maven.ide.eclipse.prefs b/services/group/service/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index e2ce08c02..000000000 --- a/services/group/service/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Aug 27 16:35:21 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/hyperjaxb/.settings/org.maven.ide.eclipse.prefs b/services/hyperjaxb/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 97c7be065..000000000 --- a/services/hyperjaxb/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Jan 19 22:49:22 PST 2011 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/id/.project b/services/id/.project index 976db9691..b8cd682ea 100644 --- a/services/id/.project +++ b/services/id/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/id/.settings/org.maven.ide.eclipse.prefs b/services/id/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 95a5ba022..000000000 --- a/services/id/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:29 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/id/3rdparty/.project b/services/id/3rdparty/.project deleted file mode 100644 index 77c38ab6e..000000000 --- a/services/id/3rdparty/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - org.collectionspace.services.id.3rdparty - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - diff --git a/services/id/3rdparty/.settings/org.maven.ide.eclipse.prefs b/services/id/3rdparty/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 95a5ba022..000000000 --- a/services/id/3rdparty/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:29 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/id/3rdparty/nuxeo-platform-cs-id/.project b/services/id/3rdparty/nuxeo-platform-cs-id/.project deleted file mode 100644 index 8388db443..000000000 --- a/services/id/3rdparty/nuxeo-platform-cs-id/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - nuxeo-platform-collectionspace - Nuxeo Enterprise Platform: CS extensions - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.maven.ide.eclipse.maven2Nature - org.eclipse.jdt.core.javanature - - diff --git a/services/id/3rdparty/nuxeo-platform-cs-id/.settings/org.maven.ide.eclipse.prefs b/services/id/3rdparty/nuxeo-platform-cs-id/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index f18b0e3ae..000000000 --- a/services/id/3rdparty/nuxeo-platform-cs-id/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Wed Apr 08 13:24:46 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -version=1 diff --git a/services/id/client/.settings/org.maven.ide.eclipse.prefs b/services/id/client/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 1f28bf908..000000000 --- a/services/id/client/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Aug 16 14:44:03 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/id/client/pom.xml b/services/id/client/pom.xml index 8e0ec213c..28e3a03ce 100644 --- a/services/id/client/pom.xml +++ b/services/id/client/pom.xml @@ -9,7 +9,6 @@ 4.0.0 - org.collectionspace.services org.collectionspace.services.id.client services.id.client @@ -19,6 +18,7 @@ org.collectionspace.services.client ${project.version} + diff --git a/services/id/client/src/main/java/org/collectionspace/services/client/IdClient.java b/services/id/client/src/main/java/org/collectionspace/services/client/IdClient.java index a2c6d7242..ad0f0d9ff 100644 --- a/services/id/client/src/main/java/org/collectionspace/services/client/IdClient.java +++ b/services/id/client/src/main/java/org/collectionspace/services/client/IdClient.java @@ -11,6 +11,8 @@ import org.jboss.resteasy.client.ClientResponse; */ public class IdClient extends AbstractServiceClientImpl { + public static final String SERVICE_NAME = "idgenerators"; + /* (non-Javadoc) * @see org.collectionspace.services.client.BaseServiceClient#getServicePathComponent() */ diff --git a/services/id/jaxb/.project b/services/id/jaxb/.project deleted file mode 100644 index 4d14ff9a9..000000000 --- a/services/id/jaxb/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - org.collectionspace.services.id.jaxb - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.maven.ide.eclipse.maven2Nature - org.eclipse.jdt.core.javanature - - diff --git a/services/id/jaxb/.settings/org.maven.ide.eclipse.prefs b/services/id/jaxb/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index b0beeb033..000000000 --- a/services/id/jaxb/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Aug 06 11:17:39 PDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=false -version=1 diff --git a/services/id/service/.settings/org.maven.ide.eclipse.prefs b/services/id/service/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 95a5ba022..000000000 --- a/services/id/service/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:29 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/id/service/build.xml b/services/id/service/build.xml index 496d60bf8..2286b7486 100644 --- a/services/id/service/build.xml +++ b/services/id/service/build.xml @@ -109,6 +109,7 @@ + 4.0.0 - org.collectionspace.services org.collectionspace.services.id.service jar services.id.service @@ -50,6 +49,12 @@ test + + org.collectionspace.services + org.collectionspace.services.id.client + ${project.version} + + diff --git a/services/person/service/.settings/org.maven.ide.eclipse.prefs b/services/person/service/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index ddebb8bf5..000000000 --- a/services/person/service/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Jan 04 16:40:35 PST 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/query/.project b/services/query/.project index 6415b4785..03ef415b1 100644 --- a/services/query/.project +++ b/services/query/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/query/.settings/org.maven.ide.eclipse.prefs b/services/query/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93c9e7e2e..000000000 --- a/services/query/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:28 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/query/service/.settings/org.maven.ide.eclipse.prefs b/services/query/service/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93c9e7e2e..000000000 --- a/services/query/service/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:28 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/relation/.project b/services/relation/.project index ae65ddee2..666fb035b 100644 --- a/services/relation/.project +++ b/services/relation/.project @@ -3,19 +3,8 @@ org.collectionspace.services.relation - org.collectionspace.services.jaxb - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -24,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/relation/3rdparty/.project b/services/relation/3rdparty/.project index 46252a4a1..21a9fcf9e 100644 --- a/services/relation/3rdparty/.project +++ b/services/relation/3rdparty/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/relation/3rdparty/.settings/org.maven.ide.eclipse.prefs b/services/relation/3rdparty/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 60695eb49..000000000 --- a/services/relation/3rdparty/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:24 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/relation/3rdparty/nuxeo-platform-cs-relation/.settings/org.maven.ide.eclipse.prefs b/services/relation/3rdparty/nuxeo-platform-cs-relation/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 35aa416a8..000000000 --- a/services/relation/3rdparty/nuxeo-platform-cs-relation/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:27 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/relation/client/.settings/org.maven.ide.eclipse.prefs b/services/relation/client/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 35aa416a8..000000000 --- a/services/relation/client/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:27 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/relation/service/.settings/org.maven.ide.eclipse.prefs b/services/relation/service/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 60695eb49..000000000 --- a/services/relation/service/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:24 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/report/.project b/services/report/.project index 84a08b671..a970c72fb 100644 --- a/services/report/.project +++ b/services/report/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/report/.settings/org.maven.ide.eclipse.prefs b/services/report/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93b6f8a66..000000000 --- a/services/report/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:30 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/report/3rdparty/.project b/services/report/3rdparty/.project index 58071d7c3..887c666a0 100644 --- a/services/report/3rdparty/.project +++ b/services/report/3rdparty/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/report/3rdparty/.settings/org.maven.ide.eclipse.prefs b/services/report/3rdparty/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93b6f8a66..000000000 --- a/services/report/3rdparty/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:30 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/report/3rdparty/nuxeo-platform-cs-report/.settings/org.maven.ide.eclipse.prefs b/services/report/3rdparty/nuxeo-platform-cs-report/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93b6f8a66..000000000 --- a/services/report/3rdparty/nuxeo-platform-cs-report/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:30 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/report/client/.settings/org.maven.ide.eclipse.prefs b/services/report/client/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93b6f8a66..000000000 --- a/services/report/client/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:30 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/report/jaxb/.settings/org.maven.ide.eclipse.prefs b/services/report/jaxb/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 86abf8e53..000000000 --- a/services/report/jaxb/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Jan 19 22:49:47 PST 2011 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/report/service/.settings/org.maven.ide.eclipse.prefs b/services/report/service/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93b6f8a66..000000000 --- a/services/report/service/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:30 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/report/service/src/main/java/org/collectionspace/services/report/ReportResource.java b/services/report/service/src/main/java/org/collectionspace/services/report/ReportResource.java index 1f8dda5c4..8685ff54f 100644 --- a/services/report/service/src/main/java/org/collectionspace/services/report/ReportResource.java +++ b/services/report/service/src/main/java/org/collectionspace/services/report/ReportResource.java @@ -58,7 +58,7 @@ import javax.ws.rs.core.UriInfo; @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); diff --git a/services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportDocumentModelHandler.java b/services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportDocumentModelHandler.java index b381395b2..41d71ea3c 100644 --- a/services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportDocumentModelHandler.java +++ b/services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportDocumentModelHandler.java @@ -56,6 +56,7 @@ import org.collectionspace.services.common.storage.JDBCTools; 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; @@ -70,7 +71,6 @@ import org.slf4j.LoggerFactory; */ public class ReportDocumentModelHandler extends DocHandlerBase { 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 = ","; @@ -261,7 +261,20 @@ public class ReportDocumentModelHandler extends DocHandlerBase { } 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; } } diff --git a/services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportPostInitHandler.java b/services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportPostInitHandler.java index 409bfd5cd..c215e0590 100644 --- a/services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportPostInitHandler.java +++ b/services/report/service/src/main/java/org/collectionspace/services/report/nuxeo/ReportPostInitHandler.java @@ -57,12 +57,13 @@ public class ReportPostInitHandler extends InitHandler implements IInitHandler { /** See the class javadoc for this class: it shows the syntax supported in the configuration params. */ @Override - public void onRepositoryInitialized(DataSource dataSource, + public void onRepositoryInitialized(String dataSourceName, + String repositoryName, ServiceBindingType sbt, List fields, - List properties) throws Exception { + List propertyList) throws Exception { //Check for existing privileges, and if not there, grant them - for(Property prop:properties) { + for(Property prop : propertyList) { if(READ_ROLE_NAME_KEY.equals(prop.getKey())) { String value = prop.getValue(); if(Tools.notEmpty(value) && !readerRoleName.equals(value)){ @@ -76,12 +77,16 @@ public class ReportPostInitHandler extends InitHandler implements IInitHandler { Statement stmt = null; String sql = ""; try { - DatabaseProductType databaseProductType = JDBCTools.getDatabaseProductType(); + DatabaseProductType databaseProductType = JDBCTools.getDatabaseProductType(dataSourceName, repositoryName); if (databaseProductType == DatabaseProductType.MYSQL) { // Nothing to do: MYSQL already does wildcard grants in init_db.sql } else if(databaseProductType != DatabaseProductType.POSTGRESQL) { throw new Exception("Unrecognized database system " + databaseProductType); } else { + // + // FIXME: REM 12/11/2012 - The local 'stmt' is alway null? An exception will always get thrown inside + // this clause + // sql = "REVOKE SELECT ON ALL TABLES IN SCHEMA public FROM "+readerRoleName; stmt.execute(sql); sql = "GRANT SELECT ON ALL TABLES IN SCHEMA public TO "+readerRoleName; diff --git a/services/sdk/.project b/services/sdk/.project deleted file mode 100644 index 382f5bf22..000000000 --- a/services/sdk/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - org.collectionspace.services.sdk - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - diff --git a/services/sdk/.settings/org.maven.ide.eclipse.prefs b/services/sdk/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index b78ecd731..000000000 --- a/services/sdk/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Jan 04 16:40:40 PST 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/sdk/sample/.project b/services/sdk/sample/.project deleted file mode 100644 index 4aba5499c..000000000 --- a/services/sdk/sample/.project +++ /dev/null @@ -1,27 +0,0 @@ - - - org.collectionspace.services.client.sample - - - org.collectionspace.services.client - org.collectionspace.services.collectionobject.client - org.collectionspace.services.collectionobject.jaxb - org.collectionspace.services.common - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.maven.ide.eclipse.maven2Nature - org.eclipse.jdt.core.javanature - - diff --git a/services/sdk/sample/.settings/org.maven.ide.eclipse.prefs b/services/sdk/sample/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 0624c1a1a..000000000 --- a/services/sdk/sample/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Sep 16 16:14:17 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/security/.project b/services/security/.project index a51bbe9e7..ddf9eb9fa 100644 --- a/services/security/.project +++ b/services/security/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/security/.settings/org.maven.ide.eclipse.prefs b/services/security/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index c9f3ca28a..000000000 --- a/services/security/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Dec 28 10:22:12 PST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/security/client/.settings/org.maven.ide.eclipse.prefs b/services/security/client/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index c9f3ca28a..000000000 --- a/services/security/client/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Dec 28 10:22:12 PST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/vocabulary/.project b/services/vocabulary/.project index 7bc666d00..dbf94a589 100644 --- a/services/vocabulary/.project +++ b/services/vocabulary/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/vocabulary/.settings/org.maven.ide.eclipse.prefs b/services/vocabulary/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 95a5ba022..000000000 --- a/services/vocabulary/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:29 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/vocabulary/3rdparty/.project b/services/vocabulary/3rdparty/.project index a06eb8da9..c8187641e 100644 --- a/services/vocabulary/3rdparty/.project +++ b/services/vocabulary/3rdparty/.project @@ -5,16 +5,6 @@ - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/vocabulary/3rdparty/.settings/org.maven.ide.eclipse.prefs b/services/vocabulary/3rdparty/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93b6f8a66..000000000 --- a/services/vocabulary/3rdparty/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:30 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/vocabulary/3rdparty/nuxeo-platform-cs-vocabulary/.settings/org.maven.ide.eclipse.prefs b/services/vocabulary/3rdparty/nuxeo-platform-cs-vocabulary/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 552ddbfcf..000000000 --- a/services/vocabulary/3rdparty/nuxeo-platform-cs-vocabulary/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Tue Oct 06 13:25:17 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/vocabulary/client/.settings/org.maven.ide.eclipse.prefs b/services/vocabulary/client/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 93b6f8a66..000000000 --- a/services/vocabulary/client/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:30 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/vocabulary/jaxb/.settings/org.maven.ide.eclipse.prefs b/services/vocabulary/jaxb/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index d97eeb986..000000000 --- a/services/vocabulary/jaxb/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Jan 19 22:49:37 PST 2011 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/vocabulary/sample/.project b/services/vocabulary/sample/.project index 474a7ee77..89c52d527 100644 --- a/services/vocabulary/sample/.project +++ b/services/vocabulary/sample/.project @@ -1,20 +1,10 @@ - org.collectionspace.services.vocabulary.samples + org.collectionspace.services.vocabulary.client.samples - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -23,7 +13,5 @@ org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature diff --git a/services/vocabulary/sample/.settings/org.maven.ide.eclipse.prefs b/services/vocabulary/sample/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index e3f71bde4..000000000 --- a/services/vocabulary/sample/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Mon Nov 23 11:53:50 PST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/vocabulary/sample/sample/.project b/services/vocabulary/sample/sample/.project index 867905504..e08b6fd1a 100644 --- a/services/vocabulary/sample/sample/.project +++ b/services/vocabulary/sample/sample/.project @@ -10,11 +10,6 @@ - - org.maven.ide.eclipse.maven2Builder - - - org.eclipse.m2e.core.maven2Builder @@ -22,8 +17,7 @@ - org.eclipse.m2e.core.maven2Nature - org.maven.ide.eclipse.maven2Nature org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature diff --git a/services/vocabulary/sample/sample/.settings/org.maven.ide.eclipse.prefs b/services/vocabulary/sample/sample/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 0624c1a1a..000000000 --- a/services/vocabulary/sample/sample/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Sep 16 16:14:17 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/services/vocabulary/service/.settings/org.maven.ide.eclipse.prefs b/services/vocabulary/service/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 95a5ba022..000000000 --- a/services/vocabulary/service/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 11 17:00:29 PDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1