]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5492: Updated tenant bindings prototype file to include a supportsHierarchy...
authorRichard Millet <remillet@berkeley.edu>
Thu, 30 Aug 2012 22:51:39 +0000 (15:51 -0700)
committerRichard Millet <remillet@berkeley.edu>
Thu, 30 Aug 2012 22:51:39 +0000 (15:51 -0700)
services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml
services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteDocumentModelHandlerImpl.java
services/config/src/main/resources/service.xsd

index 1455845659c78238026ed27e48279637aec8f173..e377c5d95897aaf2d55358d6826e23f66252467c 100644 (file)
             <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.vocabulary.nuxeo.VocabularyItemDocumentModelHandler</service:documentHandler>
             <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
                 <service:params>
+                       <service:SupportsHierarchy>true</service:SupportsHierarchy>
                     <service:ListResultsFields>
                         <!-- Omit the standard AuthorityItem fields (they are handled by the code) -->
                         <service:ListResultField>
             <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.organization.nuxeo.OrganizationDocumentModelHandler</service:documentHandler>
             <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
                 <service:params>
+                    <service:SupportsHierarchy>true</service:SupportsHierarchy>                
                     <service:ListResultsFields>
                         <!-- Omit the standard AuthorityItem fields (they are handled by the code) -->
                     </service:ListResultsFields>
             <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.person.nuxeo.PersonDocumentModelHandler</service:documentHandler>
             <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
                 <service:params>
+                       <service:SupportsHierarchy>true</service:SupportsHierarchy>
                     <service:ListResultsFields>
                         <!-- Omit the standard AuthorityItem fields (they are handled by the code) -->
                         <service:ListResultField>
             <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.location.nuxeo.LocationDocumentModelHandler</service:documentHandler>
             <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
                 <service:params>
+                    <service:SupportsHierarchy>true</service:SupportsHierarchy>                
                     <service:ListResultsFields>
                         <!-- Omit the standard AuthorityItem fields (they are handled by the code) -->
                     </service:ListResultsFields>
             <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.place.nuxeo.PlaceDocumentModelHandler</service:documentHandler>
             <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
                 <service:params>
+                    <service:SupportsHierarchy>true</service:SupportsHierarchy>                
                     <service:ListResultsFields>
                         <!-- Omit the standard AuthorityItem fields (they are handled by the code) -->
                     </service:ListResultsFields>
             <service:documentHandler xmlns:service="http://collectionspace.org/services/config/service">org.collectionspace.services.taxonomy.nuxeo.TaxonDocumentModelHandler</service:documentHandler>
             <service:DocHandlerParams xmlns:service="http://collectionspace.org/services/config/service">
                 <service:params>
+                    <service:SupportsHierarchy>true</service:SupportsHierarchy>                
                     <service:ListResultsFields>
                         <!-- Omit the standard AuthorityItem fields (they are handled by the code) -->
                         <!-- Uncomment when bug in returning list result values from complex types,
             <service:initHandler xmlns:service="http://collectionspace.org/services/config/service">
                 <service:classname>org.collectionspace.services.common.init.AddIndices</service:classname>
                 <service:params>
+                    <service:SupportsHierarchy>true</service:SupportsHierarchy>                
                     <service:field>
                         <service:table>concepts_common</service:table>
                         <service:col>inauthority</service:col>
index ef33888647f1995d50ff4ff769b2cb84799c48f7..6f6a1e3c6bfe47e1a75dba8b9d0e4ce632b2f9d3 100644 (file)
@@ -137,16 +137,19 @@ public abstract class   RemoteDocumentModelHandlerImpl<T, TL>
     
     @Override
     public boolean supportsHierarchy() {
-       boolean result;
+       boolean result = false;
        
        DocHandlerParams.Params params = null;
        try {
                        params = getDocHandlerParams();
+                       Boolean bool = params.isSupportsHierarchy();
+                       if (bool != null) {
+                               result = bool.booleanValue();
+                       }
                } catch (DocumentException e) {
                        // TODO Auto-generated catch block
                        logger.error(String.format("Could not get document handler params for class %s", this.getClass().getName()), e);
                }
-               result = params.isSupportsHierarchy();
        
        return result;
     }
index 8726ef87b2a183e59f2c78a03bbcdf31b7e300d6..45cc840967700c02491f9107d49a12eaa2f76d34 100644 (file)
                 <xs:complexType>
                     <xs:sequence>
                         <xs:element name="SchemaName" type="xs:string" minOccurs="0" maxOccurs="1"/>
-                        <xs:element name="supportsHierarchy" type="xs:boolean" minOccurs="0" maxOccurs="1" default="false"/>
+                        <xs:element name="SupportsHierarchy" type="xs:boolean" minOccurs="0" maxOccurs="1" default="false"/>
                         <xs:element name="DublinCoreTitle" type="xs:string" minOccurs="0" maxOccurs="1"/>
                         <xs:element name="SummaryFields" type="xs:string" minOccurs="0" maxOccurs="1"/>
                         <xs:element name="AbstractCommonListClassname" type="xs:string" minOccurs="0" maxOccurs="1"/>