]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-149. Added Organization services to system and build scripts. Fixed a few...
authorPatrick Schmitz <pschmitz@berkeley.edu>
Tue, 5 Jan 2010 19:47:02 +0000 (19:47 +0000)
committerPatrick Schmitz <pschmitz@berkeley.edu>
Tue, 5 Jan 2010 19:47:02 +0000 (19:47 +0000)
16 files changed:
services/JaxRsServiceProvider/pom.xml
services/JaxRsServiceProvider/src/main/java/org/collectionspace/services/jaxrs/CollectionSpaceJaxRsApplication.java
services/authentication/client/.settings/org.maven.ide.eclipse.prefs
services/authentication/service/.settings/org.maven.ide.eclipse.prefs
services/build.xml
services/common/src/main/config/tenant-bindings.xml
services/organization/3rdparty/nuxeo-platform-cs-organization/.settings/org.eclipse.jdt.core.prefs
services/organization/3rdparty/nuxeo-platform-cs-organization/src/main/resources/OSGI-INF/core-types-contrib.xml
services/organization/3rdparty/nuxeo-platform-cs-organization/src/main/resources/OSGI-INF/ecm-types-contrib.xml
services/organization/client/src/test/java/org/collectionspace/services/client/test/OrgAuthorityServiceTest.java
services/organization/import/src/main/java/org/collectionspace/services/organization/importer/OrgAuthorityBaseImport.java
services/organization/service/src/main/java/org/collectionspace/services/organization/OrgAuthorityResource.java
services/organization/service/src/main/java/org/collectionspace/services/organization/nuxeo/OrganizationDocumentModelHandler.java
services/pom.xml
services/sdk/.settings/org.maven.ide.eclipse.prefs
services/vocabulary/3rdparty/nuxeo-platform-cs-vocabulary/.settings/org.eclipse.jdt.core.prefs

index c702b73e3d108059b26ec7bc52d723132d40d42b..6e2c4d67489f8b786c9281c1706095aae6254092 100644 (file)
             <artifactId>org.collectionspace.services.vocabulary.service</artifactId>\r
             <version>1.0</version>\r
         </dependency>\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.organization.service</artifactId>\r
+            <version>1.0</version>\r
+        </dependency>\r
+                               <!--\r
+        <dependency>\r
+            <groupId>org.collectionspace.services</groupId>\r
+            <artifactId>org.collectionspace.services.person.service</artifactId>\r
+            <version>1.0</version>\r
+        </dependency>\r
+                               -->\r
         <dependency>\r
             <groupId>org.collectionspace.services</groupId>\r
             <artifactId>org.collectionspace.services.relation.service</artifactId>\r
index f84d7d666ad10bdc0e7339a8b83ccabeac9a40c2..ed27f6015b121393ff0da347f7a840c694ae5279 100644 (file)
@@ -33,6 +33,7 @@ import org.collectionspace.services.dimension.DimensionResource;
 import org.collectionspace.services.contact.ContactResource;
 
 import org.collectionspace.services.vocabulary.VocabularyResource;
+import org.collectionspace.services.organization.OrgAuthorityResource;
 
 //import org.collectionspace.services.query.QueryResource;
 
@@ -62,6 +63,7 @@ public class CollectionSpaceJaxRsApplication extends Application {
         singletons.add(new AcquisitionResource());
         singletons.add(new NewRelationResource());
         singletons.add(new VocabularyResource());
+        singletons.add(new OrgAuthorityResource());
         singletons.add(new DimensionResource());
         singletons.add(new ContactResource());
 
index 676ea4d99f89a4c7d9c0bb86661718d02356ff3a..84b63f1b8817604348942c895628d89ec759ba34 100644 (file)
@@ -1,8 +1,9 @@
-#Sun Aug 09 21:43:48 PDT 2009\r
+#Mon Jan 04 16:40:34 PST 2010\r
 activeProfiles=\r
 eclipse.preferences.version=1\r
 fullBuildGoals=process-test-resources\r
 includeModules=false\r
 resolveWorkspaceProjects=true\r
 resourceFilterGoals=process-resources resources\:testResources\r
+skipCompilerPlugin=true\r
 version=1\r
index 676ea4d99f89a4c7d9c0bb86661718d02356ff3a..84b63f1b8817604348942c895628d89ec759ba34 100644 (file)
@@ -1,8 +1,9 @@
-#Sun Aug 09 21:43:48 PDT 2009\r
+#Mon Jan 04 16:40:34 PST 2010\r
 activeProfiles=\r
 eclipse.preferences.version=1\r
 fullBuildGoals=process-test-resources\r
 includeModules=false\r
 resolveWorkspaceProjects=true\r
 resourceFilterGoals=process-resources resources\:testResources\r
+skipCompilerPlugin=true\r
 version=1\r
index c47b1d33ab341dbbd02a89bbdaf98aca20f1d18b..40a7dfe5c02e8b0b3af756dc3af48f20127d151f 100644 (file)
         <ant antfile="collectionobject/build.xml" target="deploy" inheritAll="false"/>\r
         <ant antfile="intake/build.xml" target="deploy" inheritAll="false"/>\r
         <ant antfile="vocabulary/build.xml" target="deploy" inheritAll="false"/>\r
+        <ant antfile="organization/build.xml" target="deploy" inheritAll="false"/>\r
         <ant antfile="acquisition/build.xml" target="deploy" inheritAll="false"/>\r
         <ant antfile="dimension/build.xml" target="deploy" inheritAll="false"/>\r
         <ant antfile="contact/build.xml" target="deploy" inheritAll="false"/>\r
             description="undeploy services from ${jboss.server.cspace}">\r
         <ant antfile="JaxRsServiceProvider/build.xml" target="undeploy" inheritAll="false"/>\r
         <ant antfile="vocabulary/build.xml" target="undeploy" inheritAll="false"/>\r
-        <ant antfile="contact/build.xml" target="undeploy" inheritAll="false"/>\r
-        <ant antfile="dimension/build.xml" target="undeploy" inheritAll="false"/>\r
+        <ant antfile="organization/build.xml" target="undeploy" inheritAll="false"/>\r
+        <ant antfile="contact/build.xml" target="undeploy" inheritAll="false"/>        \r
+        <ant antfile="dimension/build.xml" target="undeploy" inheritAll="false"/>        \r
         <ant antfile="acquisition/build.xml" target="undeploy" inheritAll="false"/>\r
         <ant antfile="intake/build.xml" target="undeploy" inheritAll="false"/>\r
         <ant antfile="collectionobject/build.xml" target="undeploy" inheritAll="false"/>\r
         <ant antfile="collectionobject/build.xml" target="dist" inheritAll="false"/>\r
         <ant antfile="intake/build.xml" target="dist" inheritAll="false"/>\r
         <ant antfile="vocabulary/build.xml" target="dist" inheritAll="false"/>\r
+        <ant antfile="organization/build.xml" target="dist" inheritAll="false"/>\r
         <ant antfile="acquisition/build.xml" target="dist" inheritAll="false"/>\r
         <ant antfile="JaxRsServiceProvider/build.xml" target="dist" inheritAll="false"/>\r
         <copy file="${basedir}/target/${javadoc.jar}"\r
         <ant antfile="id/build.xml" target="dist_installer" inheritAll="false"/>\r
         <ant antfile="collectionobject/build.xml" target="dist_installer" inheritAll="false"/>\r
         <ant antfile="vocabulary/build.xml" target="dist_installer" inheritAll="false"/>\r
+        <ant antfile="organization/build.xml" target="dist_installer" inheritAll="false"/>\r
         <!--\r
         <ant antfile="common/build.xml" target="dist_installer" inheritAll="false"/>\r
         <ant antfile="authentication/build.xml" target="dist_installer" inheritAll="false"/>\r
index 43eccf7a9340403fd9a9cf8397ecbf84824b32e7..2f14d33e525737702e1e74f7be5c82ef0e9b281a 100644 (file)
             </service:object>
         </tenant:serviceBindings>
         <!-- end vocabulary service meta-data -->
+        <!-- begin orgauthority service meta-data -->
+        <tenant:serviceBindings name="Orgauthorities" version="0.1">
+            <service:repositoryClient xmlns:service='http://collectionspace.org/services/common/service'>nuxeo-java</service:repositoryClient>
+            <service:object id="1" name="Orgauthority" version="0.1"
+            xmlns:service='http://collectionspace.org/services/common/service'>
+                <service:part id="0" control_group="Managed"
+                            versionable="true" auditable="false"
+                            label="orgauthorities-system" updated="" order="0">
+                    <service:content contentType="application/xml">
+                        <service:xmlContent
+                        namespaceURI="http://collectionspace.org/services/common/system"
+                        schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd">
+                        </service:xmlContent>
+                    </service:content>
+                </service:part>
+                <service:part id="1" control_group="Managed"
+                            versionable="true" auditable="false"
+                            label="orgauthorities_common" updated="" order="1">
+                    <service:content contentType="application/xml">
+                        <service:xmlContent
+                        namespaceURI="http://collectionspace.org/services/organization"
+                        schemaLocation="http://collectionspace.org/services/organization http://services.collectionspace.org/organization/orgauthorities_common.xsd">
+                        </service:xmlContent>
+                    </service:content>
+                </service:part>
+            </service:object>
+        </tenant:serviceBindings>
+        <!-- end orgauthority service meta-data -->
+                       <!-- begin organization service meta-data.
+                       Note there is no Organization service, but there is a
+                       Repository workspace so we have to configure that.
+        -->
+        <tenant:serviceBindings name="Organizations" version="0.1">
+            <service:repositoryClient xmlns:service='http://collectionspace.org/services/common/service'>nuxeo-java</service:repositoryClient>
+            <service:object id="1" name="Organization" version="0.1"
+            xmlns:service='http://collectionspace.org/services/common/service'>
+                <service:part id="0" control_group="Managed"
+                            versionable="true" auditable="false"
+                            label="organizations-system" updated="" order="0">
+                    <service:content contentType="application/xml">
+                        <service:xmlContent
+                        namespaceURI="http://collectionspace.org/services/common/system"
+                        schemaLocation="http://collectionspace.org/services/common/system http://collectionspace.org/services/common/system/system-response.xsd">
+                        </service:xmlContent>
+                    </service:content>
+                </service:part>
+                <service:part id="1" control_group="Managed"
+                            versionable="true" auditable="false"
+                            label="organizations_common" updated="" order="1">
+                    <service:content contentType="application/xml">
+                        <service:xmlContent
+                        namespaceURI="http://collectionspace.org/services/organization"
+                        schemaLocation="http://collectionspace.org/services/organization http://services.collectionspace.org/organization/organizations_common.xsd">
+                        </service:xmlContent>
+                    </service:content>
+                </service:part>
+            </service:object>
+        </tenant:serviceBindings>
+        <!-- end organization service meta-data -->
         <!-- begin acquisition service meta-data -->
         <tenant:serviceBindings name="Acquisitions" version="0.1">
             <service:repositoryClient xmlns:service='http://collectionspace.org/services/common/service'>nuxeo-java</service:repositoryClient>
index 82d33d354800a57a3c861bd6c23cbebd26826bcd..8c32cc87524f25b69ac1aaff16ead7ad5a1c30a5 100644 (file)
@@ -1,5 +1,5 @@
-#Tue Oct 06 13:26:44 PDT 2009\r
+#Mon Jan 04 16:43:20 PST 2010\r
 eclipse.preferences.version=1\r
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6\r
-org.eclipse.jdt.core.compiler.compliance=1.6\r
-org.eclipse.jdt.core.compiler.source=1.6\r
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5\r
+org.eclipse.jdt.core.compiler.compliance=1.5\r
+org.eclipse.jdt.core.compiler.source=1.5\r
index 7e1f0fec50033a363de95987a2295c423e11c4d9..43059a21f168fdb9e2d2ec8a49b9b937e89dcec1 100644 (file)
@@ -7,7 +7,7 @@
     <schema name="organizations_common" prefix="organizations_common" src="schemas/organizations_common.xsd"/>
   </extension>
   <extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
-    <doctype name="OrgAuthority" extends="Document">
+    <doctype name="Orgauthority" extends="Document">
       <schema name="common"/>
       <schema name="dublincore"/>
       <schema name="orgauthorities_common"/>
index c29c8f898d6f50066f0f8928af21ea7201bb2e54..e96ec8d3b476e8f758bd6ae74d9650a4bd90654c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <component name="org.collectionspace.organization.ecm.types">
   <extension target="org.nuxeo.ecm.platform.types.TypeService" point="types">
-    <type id="OrgAuthority" coretype="OrgAuthority">
+    <type id="Orgauthority" coretype="Orgauthority">
       <label>org.collectionspace.orgauthority</label>
       <!--icon>/icons/file.gif</icon-->
       <default-view>view_documents</default-view>
 
     <type id="Folder" coretype="Folder">
       <subtypes>
-        <type>OrgAuthority</type>
+        <type>Orgauthority</type>
       </subtypes>
     </type>
     
     <type id="Workspace" coretype="Workspace">
       <subtypes>
-        <type>OrgAuthority</type>
+        <type>Orgauthority</type>
       </subtypes>
     </type>
 
index d5f8dad96a2312be2b1450e865530fe93eaa0f08..8241900d276422bf2f2555cfb3c5e944435a4e9b 100644 (file)
@@ -131,15 +131,15 @@ public class OrgAuthorityServiceTest extends AbstractServiceTest {
     public void createItem(String testName) {
         setupCreate(testName);
 
-        knownItemResourceId = createItemInOrgAuthority(knownResourceId);
+        knownItemResourceId = createItemInAuthority(knownResourceId);
         if(logger.isDebugEnabled()){
             logger.debug(testName + ": knownItemResourceId=" + knownItemResourceId);
         }
     }
 
-    private String createItemInOrgAuthority(String vcsid) {
+    private String createItemInAuthority(String vcsid) {
 
-        final String testName = "createItemInOrgAuthority";
+        final String testName = "createItemInAuthority";
         if(logger.isDebugEnabled()){
             logger.debug(testName + ":...");
         }
@@ -147,7 +147,9 @@ public class OrgAuthorityServiceTest extends AbstractServiceTest {
         // Submit the request to the service and store the response.
         String identifier = createIdentifier();
         String refName = createRefName(identifier);
-        MultipartOutput multipart = createOrganizationInstance(vcsid, identifier, refName);
+        MultipartOutput multipart = createOrganizationInstance(vcsid, 
+                       identifier, refName, "Longer Name for "+identifier,
+                       "This is a fake organization that was created by a test method.");
         ClientResponse<Response> res = client.createItem(vcsid, multipart);
         int statusCode = res.getStatus();
 
@@ -781,7 +783,8 @@ public class OrgAuthorityServiceTest extends AbstractServiceTest {
 
         // The only relevant ID may be the one used in update(), below.
         MultipartOutput multipart = createOrganizationInstance(
-                       knownResourceId, NON_EXISTENT_ID, createRefName(NON_EXISTENT_ID));
+                       knownResourceId, NON_EXISTENT_ID, createRefName(NON_EXISTENT_ID),
+                       null, null);
         ClientResponse<MultipartInput> res =
                 client.updateItem(knownResourceId, NON_EXISTENT_ID, multipart);
         int statusCode = res.getStatus();
@@ -951,7 +954,6 @@ public class OrgAuthorityServiceTest extends AbstractServiceTest {
      */
     @AfterClass(alwaysRun=true)
     public void cleanUp() {
-
         if (logger.isDebugEnabled()) {
             logger.debug("Cleaning up temporary resources created for testing ...");
         }
@@ -970,7 +972,6 @@ public class OrgAuthorityServiceTest extends AbstractServiceTest {
             // Note: Any non-success responses are ignored and not reported.
             ClientResponse<Response> res = client.delete(resourceId);
         }
-
     }
 
     // ---------------------------------------------------------------
@@ -1036,12 +1037,16 @@ public class OrgAuthorityServiceTest extends AbstractServiceTest {
         return multipart;
     }
 
-    private MultipartOutput createOrganizationInstance(String inOrgAuthority,
-        String displayName, String refName) {
+    private MultipartOutput createOrganizationInstance(String inAuthority,
+        String displayName, String refName, String longName, String description) {
         OrganizationsCommon organization = new OrganizationsCommon();
         organization.setDisplayName(displayName);
         if(refName!=null)
                organization.setRefName(refName);
+        if(longName!=null)
+               organization.setLongName(longName);
+        if(description!=null)
+               organization.setDescription(description);
         MultipartOutput multipart = new MultipartOutput();
         OutputPart commonPart = multipart.addPart(organization,
             MediaType.APPLICATION_XML_TYPE);
index f01658c2c6ed3fc86d5abf0a27ebda3e7fd334fe..c4d124c6dfe754ec934580f51aa43fe521ef85aa 100644 (file)
@@ -91,11 +91,11 @@ public class OrgAuthorityBaseImport {
                                +newOrgAuthorityId );
        }
        for(String itemName : enumValues){
-               createItemInOrgAuthority(newOrgAuthorityId, orgAuthorityName, itemName, createRefName(itemName));
+               createItemInAuthority(newOrgAuthorityId, orgAuthorityName, itemName, createRefName(itemName));
        }
     }
     
-    private String createItemInOrgAuthority(String vcsid, String orgAuthorityName, String itemName, String refName) {
+    private String createItemInAuthority(String vcsid, String orgAuthorityName, String itemName, String refName) {
        // Expected status code: 201 Created
        int EXPECTED_STATUS_CODE = Response.Status.CREATED.getStatusCode();
        // Type of service request being tested
index 4f8ddb8a7deb203e6abbe31da78097a116b70896..053854baea98786e7a3146f84b10cec505c0288d 100644 (file)
@@ -104,11 +104,11 @@ public class OrgAuthorityResource extends AbstractCollectionSpaceResource {
 
     private DocumentHandler createItemDocumentHandler(
             ServiceContext ctx,
-            String inOrgAuthority) throws Exception {
+            String inAuthority) throws Exception {
         DocumentHandler docHandler = OrganizationHandlerFactory.getInstance().getHandler(
                 ctx.getRepositoryClientType().toString());
         docHandler.setServiceContext(ctx);
-        ((OrganizationDocumentModelHandler) docHandler).setInOrgAuthority(inOrgAuthority);
+        ((OrganizationDocumentModelHandler) docHandler).setInAuthority(inAuthority);
         if (ctx.getInput() != null) {
             Object obj = ((MultipartServiceContext) ctx).getInputPart(ctx.getCommonPartLabel(getItemServiceName()),
                     OrganizationsCommon.class);
@@ -406,7 +406,7 @@ public class OrgAuthorityResource extends AbstractCollectionSpaceResource {
             DocumentFilter myFilter =
                 DocumentFilter.CreatePaginatedDocumentFilter(queryParams);
             myFilter.setWhereClause(
-                    "organizations_common:inOrgAuthority='" + parentcsid + "'");
+                    "organizations_common:inAuthority='" + parentcsid + "'");
             handler.setDocumentFilter(myFilter);
             getRepositoryClient(ctx).getFiltered(ctx, handler);
             organizationObjectList = (OrganizationsCommonList) handler.getCommonPartList();
index 4276f43177be205fefd263a10d8a316fcfbcb68e..10937af34db3bca69ca50200a6a73ec4781335e8 100644 (file)
@@ -60,16 +60,16 @@ public class OrganizationDocumentModelHandler
     private OrganizationsCommonList organizationList;
     
     /**
-     * inOrgAuthority is the parent OrgAuthority for this context
+     * inAuthority is the parent OrgAuthority for this context
      */
-    private String inOrgAuthority;
+    private String inAuthority;
 
-    public String getInOrgAuthority() {
-               return inOrgAuthority;
+    public String getInAuthority() {
+               return inAuthority;
        }
 
-       public void setInOrgAuthority(String inOrgAuthority) {
-               this.inOrgAuthority = inOrgAuthority;
+       public void setInAuthority(String inAuthority) {
+               this.inAuthority = inAuthority;
        }
 
        @Override
@@ -152,7 +152,7 @@ public class OrganizationDocumentModelHandler
                                                                        OrganizationJAXBSchema.DESCRIPTION));
                                                         */
                                                        String id = NuxeoUtils.extractId(docModel.getPathAsString());
-                   ilistItem.setUri("/organizations/"+inOrgAuthority+"/items/" + id);
+                   ilistItem.setUri("/organizations/"+inAuthority+"/items/" + id);
                    ilistItem.setCsid(id);
                    list.add(ilistItem);
                }
index 5455df1c4b0baa2b3dec2246b3fadbaa8dcc7aa7..3f92548a5e315f361e3969eb616a4ec2b1e0d3c3 100644 (file)
@@ -21,6 +21,7 @@
         <!--module>query</module-->
         <module>acquisition</module>
         <module>vocabulary</module>
+        <module>organization</module>
         <module>id</module>
         <module>collectionobject</module>
         <module>intake</module>
index b8a9fb6003b76fbe94a2eba3f693539102829a38..b78ecd73148aadbce77f99f5fea7800993e4aeda 100644 (file)
@@ -1,8 +1,9 @@
-#Thu Sep 17 14:30:08 PDT 2009\r
+#Mon Jan 04 16:40:40 PST 2010\r
 activeProfiles=\r
 eclipse.preferences.version=1\r
 fullBuildGoals=process-test-resources\r
 includeModules=false\r
 resolveWorkspaceProjects=true\r
 resourceFilterGoals=process-resources resources\:testResources\r
+skipCompilerPlugin=true\r
 version=1\r
index 2c883044b5c4da3463908b3c11de622fec7193fb..97fa77c87e302ff9fc0015dbf79aca42984e76a9 100644 (file)
@@ -1,4 +1,4 @@
-#Tue Oct 06 13:26:44 PDT 2009\r
+#Mon Jan 04 16:43:17 PST 2010\r
 eclipse.preferences.version=1\r
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5\r
 org.eclipse.jdt.core.compiler.compliance=1.5\r