]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-1055,CSPACE-1056: Conformed Organization schema in services layer to 'Limited...
authorAron Roberts <aron@socrates.berkeley.edu>
Wed, 24 Feb 2010 21:31:24 +0000 (21:31 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Wed, 24 Feb 2010 21:31:24 +0000 (21:31 +0000)
services/organization/3rdparty/nuxeo-platform-cs-organization/src/main/resources/OSGI-INF/layouts-contrib.xml
services/organization/3rdparty/nuxeo-platform-cs-organization/src/main/resources/schemas/organizations_common.xsd
services/organization/client/src/main/java/org/collectionspace/services/client/OrgAuthorityClientUtils.java
services/organization/client/src/test/java/org/collectionspace/services/client/test/OrgAuthorityServiceTest.java
services/organization/jaxb/src/main/java/org/collectionspace/services/OrganizationJAXBSchema.java
services/organization/jaxb/src/main/resources/organization_common.xsd

index 7c7c37c0c2ac73b82a764add41f96bdeae3e738e..5466979d11d5d51b2f87acb00dc96ec624b5ba7b 100644 (file)
@@ -17,7 +17,7 @@
 
       <widget name="displayName" type="text">
         <labels>
-          <label mode="any">Display Name</label>
+          <label mode="any">displayName</label>
         </labels>
         <translated>true</translated>
         <fields>
@@ -30,7 +30,7 @@
       
       <widget name="refName" type="text">
         <labels>
-          <label mode="any">RefName</label>
+          <label mode="any">refName</label>
         </labels>
         <translated>true</translated>
         <fields>
@@ -43,7 +43,7 @@
       
       <widget name="vocabType" type="text">
         <labels>
-          <label mode="any">Type</label>
+          <label mode="any">vocabType</label>
         </labels>
         <translated>true</translated>
         <fields>
   <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
     point="layouts">
 
-               <layout name="organization">
+    <layout name="organization">
       <templates>
         <template mode="any">/layouts/layout_default_template.xhtml</template>
       </templates>
       <rows>
+        <row><widget>inAuthority</widget></row>
+        <row><widget>refName</widget></row>
         <row><widget>displayName</widget></row>
 <!--        <row><widget>displayNameComputed</widget></row> -->
         <row><widget>shortName</widget></row>
-        <row><widget>refName</widget></row>
-        <row><widget>inAuthority</widget></row>
         <row><widget>longName</widget></row>
         <row><widget>nameAdditions</widget></row>
         <row><widget>contactName</widget></row>
         <row><widget>foundingDate</widget></row>
         <row><widget>dissolutionDate</widget></row>
         <row><widget>foundingPlace</widget></row>
+        <row><widget>group</widget></row>
         <row><widget>function</widget></row>
-        <row><widget>description</widget></row>
+        <row><widget>subBody</widget></row>
+        <row><widget>history</widget></row>
+        <row><widget>status</widget></row>
       </rows>
 
-      <widget name="displayName" type="text">
+      <widget name="inAuthority" type="text">
         <labels>
-          <label mode="any">Display Name</label>
+          <label mode="any">inAuthority (OrgAuthority)</label>
         </labels>
         <translated>true</translated>
         <fields>
-          <field schema="organizations_common">displayName</field>
+          <field schema="organizations_common">inAuthority</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
         </properties>
       </widget>
-      
-<!--      <widget name="displayNameComputed" type="text">
+
+     <widget name="refName" type="text">
         <labels>
-          <label mode="any">Display Name Computed?</label>
+          <label mode="any">refName</label>
         </labels>
         <translated>true</translated>
         <fields>
-          <field schema="organizations_common">displayNameComputed</field>
+          <field schema="organizations_common">refName</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
         </properties>
-      </widget> -->
-      
-      <widget name="shortName" type="text">
+      </widget>
+
+      <widget name="displayName" type="text">
         <labels>
-          <label mode="any">ShortName</label>
+          <label mode="any">displayName</label>
         </labels>
         <translated>true</translated>
         <fields>
-          <field schema="organizations_common">shortName</field>
+          <field schema="organizations_common">displayName</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
         </properties>
       </widget>
       
-      <widget name="refName" type="text">
+<!--      <widget name="displayNameComputed" type="text">
         <labels>
-          <label mode="any">RefName</label>
+          <label mode="any">displayNameComputed</label>
         </labels>
         <translated>true</translated>
         <fields>
-          <field schema="organizations_common">refName</field>
+          <field schema="organizations_common">displayNameComputed</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
         </properties>
-      </widget>
+      </widget> -->
       
-      <widget name="inAuthority" type="text">
+      <widget name="shortName" type="text">
         <labels>
-          <label mode="any">OrgAuthority</label>
+          <label mode="any">shortName</label>
         </labels>
         <translated>true</translated>
         <fields>
-          <field schema="organizations_common">inAuthority</field>
+          <field schema="organizations_common">shortName</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
         </properties>
       </widget>
-
+      
       <widget name="longName" type="text">
         <labels>
           <label mode="any">longName</label>
           <property name="styleClass">dataInputText</property>
         </properties>
       </widget>
+
+      <widget name="group" type="text">
+        <labels>
+          <label mode="any">group</label>
+        </labels>
+        <translated>true</translated>
+        <fields>
+          <field schema="organizations_common">group</field>
+        </fields>
+        <properties widgetMode="edit">
+          <property name="styleClass">dataInputText</property>
+        </properties>
+      </widget>
       
       <widget name="function" type="text">
         <labels>
           <property name="styleClass">dataInputText</property>
         </properties>
       </widget>
-      
-      <widget name="description" type="text">
+
+      <widget name="subBody" type="text">
         <labels>
-          <label mode="any">description</label>
+          <label mode="any">subBody</label>
         </labels>
         <translated>true</translated>
         <fields>
-          <field schema="organizations_common">description</field>
+          <field schema="organizations_common">subBody</field>
         </fields>
         <properties widgetMode="edit">
           <property name="styleClass">dataInputText</property>
         </properties>
       </widget>
       
+      <widget name="history" type="text">
+        <labels>
+          <label mode="any">history</label>
+        </labels>
+        <translated>true</translated>
+        <fields>
+          <field schema="organizations_common">history</field>
+        </fields>
+        <properties widgetMode="edit">
+          <property name="styleClass">dataInputText</property>
+        </properties>
+      </widget>
+
+      <widget name="status" type="text">
+        <labels>
+          <label mode="any">status</label>
+        </labels>
+        <translated>true</translated>
+        <fields>
+          <field schema="organizations_common">status</field>
+        </fields>
+        <properties widgetMode="edit">
+          <property name="styleClass">dataInputText</property>
+        </properties>
+      </widget>
+
     </layout>
   </extension>
 </component>
index ab4cf14ca50b5505f774288176bb3c0d78bbf99a..5f46e4413cd89c6e5227e3277131d6b89bedc6d4 100644 (file)
   targetNamespace="http://collectionspace.org/services/organization"
   version="0.1"
 >
+<!-- See http://wiki.collectionspace.org/display/collectionspace/Name+Authority+Schema -->
 <!-- See http://wiki.collectionspace.org/display/collectionspace/Organization+Service+Home -->    
 
-               <!--  Organization Information Group -->
-               <!--  inAuthority is the csid of the owning OrgAuthority -->
-               <xs:element name="inAuthority" type="xs:string" />
-               <xs:element name="refName" type="xs:string"/>
-               <xs:element name="displayName" type="xs:string"/>
-               <xs:element name="displayNameComputed" type="xs:boolean"/>
-               <xs:element name="shortName" type="xs:string"/>
-               <xs:element name="longName" type="xs:string"/>
-               <xs:element name="nameAdditions" type="xs:string"/>
-               <xs:element name="contactName" type="xs:string"/>
-               <xs:element name="foundingDate" type="xs:string"/>
-               <xs:element name="dissolutionDate" type="xs:string"/>
-               <xs:element name="foundingPlace" type="xs:string"/>
-               <xs:element name="function" type="xs:string"/>
-               <xs:element name="description" type="xs:string"/>
+    <!--  Organization Information Group -->
+    <!--  inAuthority is the csid of the owning OrgAuthority -->
+    <xs:element name="inAuthority" type="xs:string" />
+    <xs:element name="refName" type="xs:string"/>
+    <xs:element name="displayName" type="xs:string"/>
+    <xs:element name="displayNameComputed" type="xs:boolean"/>
+    <xs:element name="shortName" type="xs:string"/>
+    <xs:element name="longName" type="xs:string"/>
+    <xs:element name="nameAdditions" type="xs:string"/>
+    <xs:element name="contactName" type="xs:string"/>
+    <xs:element name="foundingDate" type="xs:string"/>
+    <xs:element name="dissolutionDate" type="xs:string"/>
+    <xs:element name="foundingPlace" type="xs:string"/>
+    <xs:element name="group" type="xs:string"/>
+    <xs:element name="function" type="xs:string"/>
+    <xs:element name="subBody" type="xs:string"/>
+    <xs:element name="history" type="xs:string"/>
+    <xs:element name="status" type="xs:string"/>
 
 </xs:schema>
 
index d08f14886acee96253c1d6940ea41a7e97cff16a..ad235b9a3615fdd0ab6215c3dd1ec9b5f3e52b84 100644 (file)
@@ -1,7 +1,6 @@
 package org.collectionspace.services.client;\r
 \r
 import java.util.ArrayList;\r
-import java.util.List;\r
 import java.util.Map;\r
 \r
 import javax.ws.rs.core.MediaType;\r
@@ -109,10 +108,16 @@ public class OrgAuthorityClientUtils {
                organization.setDissolutionDate(value);\r
         if((value = (String)orgInfo.get(OrganizationJAXBSchema.FOUNDING_PLACE))!=null)\r
                organization.setFoundingPlace(value);\r
+        if((value = (String)orgInfo.get(OrganizationJAXBSchema.GROUP))!=null)\r
+               organization.setGroup(value);\r
         if((value = (String)orgInfo.get(OrganizationJAXBSchema.FUNCTION))!=null)\r
                organization.setFunction(value);\r
-        if((value = (String)orgInfo.get(OrganizationJAXBSchema.DESCRIPTION))!=null)\r
-               organization.setDescription(value);\r
+        if((value = (String)orgInfo.get(OrganizationJAXBSchema.SUB_BODY))!=null)\r
+               organization.setSubBody(value);\r
+        if((value = (String)orgInfo.get(OrganizationJAXBSchema.HISTORY))!=null)\r
+               organization.setHistory(value);\r
+        if((value = (String)orgInfo.get(OrganizationJAXBSchema.STATUS))!=null)\r
+               organization.setStatus(value);\r
         MultipartOutput multipart = new MultipartOutput();\r
         OutputPart commonPart = multipart.addPart(organization,\r
             MediaType.APPLICATION_XML_TYPE);\r
index 28fd8551b11a1971773aa0e7197ec9058bf1f612..823820475b49bef72c011d71e670ba30d7126ca8 100644 (file)
@@ -172,9 +172,6 @@ public class OrgAuthorityServiceTest extends AbstractServiceTestImpl {
         // Store the IDs from any item resources created
         // by tests, along with the IDs of their parents, so these items
         // can be deleted after all tests have been run.
-        //
-        // Item resource IDs are unique, so these are used as keys;
-        // the non-unique IDs of their parents are stored as associated values.
         allResourceItemIdsCreated.put(newID, vcsid);
 
         return newID;
index edea07553f52ebee59a3adb4e57c07db3041aec0..c01ecd92657cf3b43f6417ca25a2fca34b243686 100644 (file)
@@ -11,18 +11,21 @@ public interface OrganizationJAXBSchema {
        final static String ORGANIZATIONS_COMMON="organizations_common";        \r
        final static String CSID = "csid";\r
        final static String IN_AUTHORITY = "inAuthority";\r
+        final static String REF_NAME = "refName";\r
        final static String DISPLAY_NAME = "displayName";\r
        final static String DISPLAY_NAME_COMPUTED = "displayNameComputed";\r
        final static String SHORT_NAME = "shortName";\r
-       final static String REF_NAME = "refName";\r
        final static String LONG_NAME = "longName";\r
        final static String NAME_ADDITIONS = "nameAdditions";\r
        final static String CONTACT_NAME = "contactName";\r
        final static String FOUNDING_DATE = "foundingDate";\r
        final static String DISSOLUTION_DATE = "dissolutionDate";\r
        final static String FOUNDING_PLACE = "foundingPlace";\r
+        final static String GROUP = "group";\r
        final static String FUNCTION = "function";\r
-       final static String DESCRIPTION = "description";\r
+        final static String SUB_BODY = "subBody";\r
+       final static String HISTORY = "history";\r
+        final static String STATUS = "status";\r
 }\r
 \r
 \r
index 51398b24d89438f5a997054f91b671484946c344..9fd20e108b412cf7bc5a3a0d632d10406b4cc887 100644 (file)
@@ -8,8 +8,10 @@
     >
 
     <!-- avoid XmlRootElement nightnmare, see http://weblogs.java.net/blog/kohsuke/archive/2006/03/why_does_jaxb_p.html-->
-    <!-- See http://wiki.collectionspace.org/display/collectionspace/Organization+Service+Home -->    
-    
+
+    <!-- See http://wiki.collectionspace.org/display/collectionspace/Name+Authority+Schema -->
+    <!-- See http://wiki.collectionspace.org/display/collectionspace/Organization+Service+Home -->
+
     <!-- Organization -->
     <xs:element name="organizations_common">
         <xs:complexType>
@@ -20,7 +22,7 @@
                 <xs:element name="inAuthority" type="xs:string" />
                 <xs:element name="refName" type="xs:string"/>
                 <xs:element name="displayName" type="xs:string"/>
-                                       <xs:element name="displayNameComputed" type="xs:boolean"/>
+                <xs:element name="displayNameComputed" type="xs:boolean"/>
                 <xs:element name="shortName" type="xs:string"/>
                 <xs:element name="longName" type="xs:string"/>
                 <xs:element name="nameAdditions" type="xs:string"/>
                 <xs:element name="foundingDate" type="xs:string"/>
                 <xs:element name="dissolutionDate" type="xs:string"/>
                 <xs:element name="foundingPlace" type="xs:string"/>
+                <xs:element name="group" type="xs:string"/>
                 <xs:element name="function" type="xs:string"/>
-                <xs:element name="description" type="xs:string"/>
+                <xs:element name="subBody" type="xs:string"/>
+                <xs:element name="history" type="xs:string"/>
+                <xs:element name="status" type="xs:string"/>
             </xs:sequence>
         </xs:complexType>
     </xs:element>
     <xs:element name="organizations-common-list">
         <xs:complexType>
             <xs:sequence>
-                                                               <xs:element name="pageNum" type="xs:unsignedInt" />
-                                                               <xs:element name="pageSize" type="xs:unsignedInt" />
-                                                               <xs:element name="totalItems" type="xs:unsignedInt" />
-                 <xs:element name="organization_list_item" maxOccurs="unbounded">
+                <xs:element name="pageNum" type="xs:unsignedInt" />
+                <xs:element name="pageSize" type="xs:unsignedInt" />
+                <xs:element name="totalItems" type="xs:unsignedInt" />
+                <xs:element name="organization_list_item" maxOccurs="unbounded">
                     <xs:complexType>
                         <xs:sequence>
                             <xs:element name="displayName" type="xs:string"