]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-2133,CSPACE-1796,CSPACE-1219: Updated Acqusition schema at the services layer...
authorAron Roberts <aron@socrates.berkeley.edu>
Tue, 15 Jun 2010 19:48:14 +0000 (19:48 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Tue, 15 Jun 2010 19:48:14 +0000 (19:48 +0000)
services/acquisition/3rdparty/nuxeo-platform-cs-acquisition/src/main/resources/OSGI-INF/layouts-contrib.xml
services/acquisition/3rdparty/nuxeo-platform-cs-acquisition/src/main/resources/schemas/acquisitions_common.xsd
services/acquisition/client/src/test/java/org/collectionspace/services/client/test/AcquisitionAuthRefsTest.java
services/acquisition/jaxb/src/main/resources/acquisitions_common.xsd
services/common/src/main/config/services/tenant-bindings.xml

index 54a1f0c5f1c5acf59d3a5f5d1c9d237b5c4b9c3e..0460930207d4c87a4665ddabd74f0b01cf6876fe 100644 (file)
@@ -14,7 +14,7 @@
         <row><widget>acquisitionAuthorizer</widget></row>
         <row><widget>acquisitionAuthorizerDate</widget></row>
         <row><widget>acquisitionDate</widget></row>
-        <row><widget>acquisitionFundingDenomination</widget></row>
+        <row><widget>acquisitionFundingCurrency</widget></row>
         <row><widget>acquisitionFundingValue</widget></row>
         <row><widget>acquisitionFundingSource</widget></row>
         <row><widget>acquisitionFundingSourceProvisos</widget></row>
         <row><widget>acquisitionProvisos</widget></row>
         <row><widget>acquisitionReason</widget></row>
         <row><widget>acquisitionReferenceNumber</widget></row>
-        <row><widget>acquisitionSource</widget></row>
-        <row><widget>groupPurchasePriceDenomination</widget></row>
+        <row><widget>owner</widget></row>
+        <!-- row><widget>acquisitionSource</widget></row -->
+        <row><widget>groupPurchasePriceCurrency</widget></row>
         <row><widget>groupPurchasePriceValue</widget></row>
-        <row><widget>objectOfferPriceDenomination</widget></row>
+        <row><widget>objectOfferPriceCurrency</widget></row>
         <row><widget>objectOfferPriceValue</widget></row>
-        <row><widget>objectPurchaseOfferPriceDenomination</widget></row>
+        <row><widget>objectPurchaseOfferPriceCurrency</widget></row>
         <row><widget>objectPurchaseOfferPriceValue</widget></row>
-        <row><widget>objectPurchasePriceDenomination</widget></row>
+        <row><widget>objectPurchasePriceCurrency</widget></row>
         <row><widget>objectPurchasePriceValue</widget></row>
-        <row><widget>originalObjectPurchasePriceDenomination</widget></row>
+        <row><widget>originalObjectPurchasePriceCurrency</widget></row>
         <row><widget>originalObjectPurchasePriceValue</widget></row>
         <row><widget>transferOfTitleNumber</widget></row>
-        <row><widget>fieldCollectionDate</widget></row>
         <row><widget>fieldCollectionEventName</widget></row>
-        <row><widget>fieldCollectionNumber</widget></row>
-        <row><widget>fieldCollector</widget></row>
       </rows>
 
       <widget name="accessionDate" type="text">
         </properties>
       </widget>
       
-      <widget name="acquisitionFundingDenomination" type="text">
+      <widget name="acquisitionFundingCurrency" type="text">
         <labels>
-          <label mode="any">acquisitionFundingDenomination</label>
+          <label mode="any">acquisitionFundingCurrency</label>
         </labels>
         <translated>true</translated>
         <fields>
-          <field>acquisitions_common:acquisitionFundingDenomination</field>
+          <field>acquisitions_common:acquisitionFundingCurrency</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
         </properties>
       </widget>
       
+        <widget name="owner" type="text">
+        <labels>
+          <label mode="any">owner</label>
+        </labels>
+        <translated>true</translated>
+        <fields>
+          <field>acquisitions_common:owner</field>
+        </fields>
+        <properties widgetMode="edit">
+          <property name="styleClass">dataInputText</property>
+        </properties>
+      </widget>
+      
+      <!--
       <widget name="acquisitionSource" type="text">
         <labels>
           <label mode="any">acquisitionSources</label>
           <property name="styleClass">dataInputText</property>
         </properties>
       </widget>
+      -->
       
-      <widget name="groupPurchasePriceDenomination" type="text">
+      <widget name="groupPurchasePriceCurrency" type="text">
         <labels>
-          <label mode="any">groupPurchasePriceDenomination</label>
+          <label mode="any">groupPurchasePriceCurrency</label>
         </labels>
         <translated>true</translated>
         <fields>
-          <field>acquisitions_common:groupPurchasePriceDenomination</field>
+          <field>acquisitions_common:groupPurchasePriceCurrency</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
         </properties>
       </widget>
 
-      <widget name="objectOfferPriceDenomination" type="text">
+      <widget name="objectOfferPriceCurrency" type="text">
         <labels>
-          <label mode="any">objectOfferPriceDenomination</label>
+          <label mode="any">objectOfferPriceCurrency</label>
         </labels>
         <translated>true</translated>
         <fields>
-          <field>acquisitions_common:objectOfferPriceDenomination</field>
+          <field>acquisitions_common:objectOfferPriceCurrency</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
         </properties>
       </widget>
       
-      <widget name="objectPurchaseOfferPriceDenomination" type="text">
+      <widget name="objectPurchaseOfferPriceCurrency" type="text">
         <labels>
-          <label mode="any">objectPurchaseOfferPriceDenomination</label>
+          <label mode="any">objectPurchaseOfferPriceCurrency</label>
         </labels>
         <translated>true</translated>
         <fields>
-          <field>acquisitions_common:objectPurchaseOfferPriceDenomination</field>
+          <field>acquisitions_common:objectPurchaseOfferPriceCurrency</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
         </properties>
       </widget>
 
-      <widget name="objectPurchasePriceDenomination" type="text">
+      <widget name="objectPurchasePriceCurrency" type="text">
         <labels>
-          <label mode="any">objectPurchasePriceDenomination</label>
+          <label mode="any">objectPurchasePriceCurrency</label>
         </labels>
         <translated>true</translated>
         <fields>
-          <field>acquisitions_common:objectPurchasePriceDenomination</field>
+          <field>acquisitions_common:objectPurchasePriceCurrency</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
         </properties>
       </widget>
 
-      <widget name="originalObjectPurchasePriceDenomination" type="text">
+      <widget name="originalObjectPurchasePriceCurrency" type="text">
         <labels>
-          <label mode="any">originalObjectPurchasePriceDenomination</label>
+          <label mode="any">originalObjectPurchasePriceCurrency</label>
         </labels>
         <translated>true</translated>
         <fields>
-          <field>acquisitions_common:originalObjectPurchasePriceDenomination</field>
+          <field>acquisitions_common:originalObjectPurchasePriceCurrency</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
         </properties>
       </widget>
 
-      <widget name="fieldCollectionDate" type="text">
-        <labels>
-          <label mode="any">fieldCollectionDate</label>
-        </labels>
-        <translated>true</translated>
-        <fields>
-          <field>acquisitions_common:fieldCollectionDate</field>
-        </fields>
-        <properties widgetMode="edit">
-          <property name="styleClass">dataInputText</property>
-        </properties>
-      </widget>
-
       <widget name="fieldCollectionEventName" type="text">
         <labels>
           <label mode="any">fieldCollectionEventName</label>
         </properties>
       </widget>
 
-      <widget name="fieldCollectionNumber" type="text">
-        <labels>
-          <label mode="any">fieldCollectionNumber</label>
-        </labels>
-        <translated>true</translated>
-        <fields>
-          <field>acquisitions_common:fieldCollectionNumber</field>
-        </fields>
-        <properties widgetMode="edit">
-          <property name="styleClass">dataInputText</property>
-        </properties>
-      </widget>
-
-      <widget name="fieldCollector" type="text">
-        <labels>
-          <label mode="any">fieldCollector</label>
-        </labels>
-        <translated>true</translated>
-        <fields>
-          <field>acquisitions_common:fieldCollector</field>
-        </fields>
-        <properties widgetMode="edit">
-          <property name="styleClass">dataInputText</property>
-        </properties>
-      </widget>
-
     </layout>
   </extension>
 </component>
index b942099b1d06767085047c3f06cf420fd9c88bd5..c67a953567b9f7587883a75007e1b55c53ae8003 100644 (file)
     \r
     <!-- See http://wiki.collectionspace.org/display/collectionspace/Acquisition+Schema -->\r
 \r
-<!--  Object Entry Information Group -->\r
+    <!--  Object Entry Information Group -->\r
     <xs:element name="accessionDate" type="xs:string"/>\r
     <xs:element name="acquisitionAuthorizer" type="xs:string"/>\r
     <xs:element name="acquisitionAuthorizerDate" type="xs:string"/>\r
     <xs:element name="acquisitionDate" type="xs:string"/>\r
-    <xs:element name="acquisitionFundingDenomination" type="xs:string"/>\r
+    <xs:element name="acquisitionFundingCurrency" type="xs:string"/>\r
     <xs:element name="acquisitionFundingValue" type="xs:string"/>\r
     <xs:element name="acquisitionFundingSource" type="xs:string"/>\r
     <xs:element name="acquisitionFundingSourceProvisos" type="xs:string"/>\r
@@ -34,6 +34,7 @@
     <xs:element name="acquisitionProvisos" type="xs:string"/>\r
     <xs:element name="acquisitionReason" type="xs:string"/>\r
     <xs:element name="acquisitionReferenceNumber" type="xs:string"/>\r
+    <xs:element name="owner" type="xs:string"/>\r
     <xs:element name="acquisitionSources">\r
         <xs:complexType>\r
             <xs:sequence>\r
             </xs:sequence>\r
         </xs:complexType>\r
     </xs:element>\r
-    <xs:element name="groupPurchasePriceDenomination" type="xs:string"/>\r
+    <xs:element name="groupPurchasePriceCurrency" type="xs:string"/>\r
     <xs:element name="groupPurchasePriceValue" type="xs:string"/>\r
-    <xs:element name="objectOfferPriceDenomination" type="xs:string"/>\r
+    <xs:element name="objectOfferPriceCurrency" type="xs:string"/>\r
     <xs:element name="objectOfferPriceValue" type="xs:string"/>\r
-    <xs:element name="objectPurchaseOfferPriceDenomination" type="xs:string"/>\r
+    <xs:element name="objectPurchaseOfferPriceCurrency" type="xs:string"/>\r
     <xs:element name="objectPurchaseOfferPriceValue" type="xs:string"/>\r
-    <xs:element name="objectPurchasePriceDenomination" type="xs:string"/>\r
+    <xs:element name="objectPurchasePriceCurrency" type="xs:string"/>\r
     <xs:element name="objectPurchasePriceValue" type="xs:string"/>\r
-    <xs:element name="originalObjectPurchasePriceDenomination" type="xs:string"/>\r
+    <xs:element name="originalObjectPurchasePriceCurrency" type="xs:string"/>\r
     <xs:element name="originalObjectPurchasePriceValue" type="xs:string"/>\r
     <xs:element name="transferOfTitleNumber" type="xs:string"/>\r
+\r
     <!-- Object Collection Information Group -->\r
-    <xs:element name="fieldCollectionDate" type="xs:string"/>\r
     <xs:element name="fieldCollectionEventName" type="xs:string"/>\r
-    <xs:element name="fieldCollectionNumber" type="xs:string"/>\r
-    <xs:element name="fieldCollector" type="xs:string"/>\r
+\r
 </xs:schema>\r
index d70ab4aad376ec6c4ed01ae577cee310b5cdc785..f526eac63bcdc59495c319d6d363b4062d10a388 100644 (file)
@@ -70,15 +70,12 @@ public class AcquisitionAuthRefsTest extends BaseServiceTest {
     private String knownResourceId = null;
     private List<String> acquisitionIdsCreated = new ArrayList<String>();
     private List<String> personIdsCreated = new ArrayList<String>();
-    private int CREATED_STATUS = Response.Status.CREATED.getStatusCode();
-    private int OK_STATUS = Response.Status.OK.getStatusCode();
     private String personAuthCSID = null; 
     private String acquisitionAuthorizerRefName = null;
     private String acquisitionFundingSourceRefName = null;
     // Not ready for multiples, yet
     //private String acquisitionSourcesRefName = null;
-    private String fieldCollectorRefName = null;
-    private final int NUM_AUTH_REFS_EXPECTED = 3;
+    private final int NUM_AUTH_REFS_EXPECTED = 2;
 
     /* (non-Javadoc)
      * @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
@@ -118,10 +115,9 @@ public class AcquisitionAuthRefsTest extends BaseServiceTest {
         createPersonRefs();
         
         MultipartOutput multipart = createAcquisitionInstance(
-                                               "April 1, 2010",
-                                                               acquisitionAuthorizerRefName,
-                                                               acquisitionFundingSourceRefName,
-                                                               fieldCollectorRefName );
+            "April 1, 2010",
+           acquisitionAuthorizerRefName,
+           acquisitionFundingSourceRefName);
 
         AcquisitionClient acquisitionClient = new AcquisitionClient();
         ClientResponse<Response> res = acquisitionClient.create(multipart);
@@ -157,30 +153,25 @@ public class AcquisitionAuthRefsTest extends BaseServiceTest {
     
     protected void createPersonRefs(){
        String authRefName = 
-               PersonAuthorityClientUtils.createPersonAuthRefName(PERSON_AUTHORITY_NAME, false);
+           PersonAuthorityClientUtils.createPersonAuthRefName(PERSON_AUTHORITY_NAME, false);
         PersonAuthorityClient personAuthClient = new PersonAuthorityClient();
        MultipartOutput multipart = PersonAuthorityClientUtils.createPersonAuthorityInstance(
-                       PERSON_AUTHORITY_NAME, authRefName, personAuthClient.getCommonPartName());
+           PERSON_AUTHORITY_NAME, authRefName, personAuthClient.getCommonPartName());
         ClientResponse<Response> res = personAuthClient.create(multipart);
         int statusCode = res.getStatus();
 
         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, CREATED_STATUS);
+            invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+        Assert.assertEquals(statusCode, STATUS_CREATED);
         personAuthCSID = extractId(res);
         
         acquisitionAuthorizerRefName = PersonAuthorityClientUtils.createPersonRefName(
-                                                               authRefName, "Annie Authorizer", true);
+            authRefName, "Annie Authorizer", true);
         personIdsCreated.add(createPerson("Annie", "Authorizer", acquisitionAuthorizerRefName));
         
         acquisitionFundingSourceRefName = PersonAuthorityClientUtils.createPersonRefName(
-                                                                       authRefName, "Sammy Source", true);
+           authRefName, "Sammy Source", true);
         personIdsCreated.add(createPerson("Sammy", "Source", acquisitionFundingSourceRefName));
-        
-        
-        fieldCollectorRefName = PersonAuthorityClientUtils.createPersonRefName(
-                                                                       authRefName, "Connie Collector", true);
-        personIdsCreated.add(createPerson("Connie", "Collector", fieldCollectorRefName));
     }
     
     protected String createPerson(String firstName, String surName, String refName ) {
@@ -189,14 +180,14 @@ public class AcquisitionAuthRefsTest extends BaseServiceTest {
         personInfo.put(PersonJAXBSchema.SUR_NAME, surName);
         PersonAuthorityClient personAuthClient = new PersonAuthorityClient();
        MultipartOutput multipart = 
-               PersonAuthorityClientUtils.createPersonInstance(personAuthCSID, 
-                               refName, personInfo, personAuthClient.getItemCommonPartName());
+           PersonAuthorityClientUtils.createPersonInstance(personAuthCSID,
+               refName, personInfo, personAuthClient.getItemCommonPartName());
         ClientResponse<Response> res = personAuthClient.createItem(personAuthCSID, multipart);
         int statusCode = res.getStatus();
 
         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
-        Assert.assertEquals(statusCode, CREATED_STATUS);
+            invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+        Assert.assertEquals(statusCode, STATUS_CREATED);
        return extractId(res);
     }
 
@@ -223,7 +214,7 @@ public class AcquisitionAuthRefsTest extends BaseServiceTest {
             logger.debug(testName + ".read: status = " + statusCode);
         }
         Assert.assertTrue(REQUEST_TYPE.isValidStatusCode(statusCode),
-                invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
+            invalidStatusCodeMessage(REQUEST_TYPE, statusCode));
         Assert.assertEquals(statusCode, EXPECTED_STATUS_CODE);
 
         MultipartInput input = (MultipartInput) res.getEntity();
@@ -232,7 +223,7 @@ public class AcquisitionAuthRefsTest extends BaseServiceTest {
         Assert.assertNotNull(acquisition);
         // Check a couple of fields
         Assert.assertEquals(acquisition.getAcquisitionAuthorizer(), acquisitionAuthorizerRefName);
-        Assert.assertEquals(acquisition.getFieldCollector(), fieldCollectorRefName);
+        Assert.assertEquals(acquisition.getAcquisitionFundingSource(), acquisitionFundingSourceRefName);
         
         // Get the auth refs and check them
         ClientResponse<AuthorityRefList> res2 =
@@ -327,15 +318,14 @@ public class AcquisitionAuthRefsTest extends BaseServiceTest {
     }
 
    private MultipartOutput createAcquisitionInstance(
-                       String accessionDate,
-                               String acquisitionAuthorizer,
-                               String acquisitionFundingSource,
-                               String fieldCollector ) {
+       String accessionDate,
+       String acquisitionAuthorizer,
+       String acquisitionFundingSource) {
+       
         AcquisitionsCommon acquisition = new AcquisitionsCommon();
         acquisition.setAccessionDate(accessionDate);
         acquisition.setAcquisitionAuthorizer(acquisitionAuthorizer);
         acquisition.setAcquisitionFundingSource(acquisitionFundingSource);
-        acquisition.setFieldCollector(fieldCollector);
         MultipartOutput multipart = new MultipartOutput();
         OutputPart commonPart =
             multipart.addPart(acquisition, MediaType.APPLICATION_XML_TYPE);
index db4f19f547edb909dc741cd9b5a6427c0d2059c0..8dbfeefa3c5394ca6f6f428b3e014a40cfb6f2e3 100644 (file)
@@ -37,7 +37,7 @@
                 <xs:element name="acquisitionAuthorizer" type="xs:string"/>
                 <xs:element name="acquisitionAuthorizerDate" type="xs:string"/>
                 <xs:element name="acquisitionDate" type="xs:string"/>
-                <xs:element name="acquisitionFundingDenomination" type="xs:string"/>
+                <xs:element name="acquisitionFundingCurrency" type="xs:string"/>
                 <xs:element name="acquisitionFundingValue" type="xs:string"/>
                 <xs:element name="acquisitionFundingSource" type="xs:string"/>
                 <xs:element name="acquisitionFundingSourceProvisos" type="xs:string"/>
                 <xs:element name="acquisitionProvisos" type="xs:string"/>
                 <xs:element name="acquisitionReason" type="xs:string"/>
                 <xs:element name="acquisitionReferenceNumber" type="xs:string"/>
+                <xs:element name="owner" type="xs:string"/>
                 <xs:element name="acquisitionSources" type="acquisitionSourceList"/>
-                <xs:element name="groupPurchasePriceDenomination" type="xs:string"/>
+                <xs:element name="groupPurchasePriceCurrency" type="xs:string"/>
                 <xs:element name="groupPurchasePriceValue" type="xs:string"/>
-                <xs:element name="objectOfferPriceDenomination" type="xs:string"/>
+                <xs:element name="objectOfferPriceCurrency" type="xs:string"/>
                 <xs:element name="objectOfferPriceValue" type="xs:string"/>
-                <xs:element name="objectPurchaseOfferPriceDenomination" type="xs:string"/>
+                <xs:element name="objectPurchaseOfferPriceCurrency" type="xs:string"/>
                 <xs:element name="objectPurchaseOfferPriceValue" type="xs:string"/>
-                <xs:element name="objectPurchasePriceDenomination" type="xs:string"/>
+                <xs:element name="objectPurchasePriceCurrency" type="xs:string"/>
                 <xs:element name="objectPurchasePriceValue" type="xs:string"/>
-                <xs:element name="originalObjectPurchasePriceDenomination" type="xs:string"/>
+                <xs:element name="originalObjectPurchasePriceCurrency" type="xs:string"/>
                 <xs:element name="originalObjectPurchasePriceValue" type="xs:string"/>
                 <xs:element name="transferOfTitleNumber" type="xs:string"/>
                 <!-- Object Collection Information Group -->
-                <xs:element name="fieldCollectionDate" type="xs:string"/>
                 <xs:element name="fieldCollectionEventName" type="xs:string"/>
-                <xs:element name="fieldCollectionNumber" type="xs:string"/>
-                <xs:element name="fieldCollector" type="xs:string"/>
             </xs:sequence>
         </xs:complexType>
     </xs:element>
index 06cb556743242df68f4549f80447d269516e147e..af3aa1febfbcb11c58d5ccdb1ac63b5081ebba67 100644 (file)
                         <types:item><types:key>authRef</types:key><types:value>acquisitionAuthorizer</types:value></types:item>
                         <types:item><types:key>authRef</types:key><types:value>acquisitionFundingSource</types:value></types:item>
                         <!-- Need to handle repeating ref fields, like "acquisitionSources" -->
-                        <types:item><types:key>authRef</types:key><types:value>fieldCollector</types:value></types:item>
                     </service:properties>
                     <service:content contentType="application/xml">
                         <service:xmlContent
                         <types:item><types:key>authRef</types:key><types:value>acquisitionAuthorizer</types:value></types:item>
                         <types:item><types:key>authRef</types:key><types:value>acquisitionFundingSource</types:value></types:item>
                         <!-- Need to handle repeating ref fields, like "acquisitionSources" -->
-                        <types:item><types:key>authRef</types:key><types:value>fieldCollector</types:value></types:item>
                     </service:properties>
                     <service:content contentType="application/xml">
                         <service:xmlContent