]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-6953: Simple hierarchy relations synchronization working.
authorremillet <remillet@yahoo.com>
Tue, 24 May 2016 21:30:28 +0000 (14:30 -0700)
committerremillet <remillet@yahoo.com>
Tue, 24 May 2016 21:30:28 +0000 (14:30 -0700)
services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityResource.java
services/common/src/main/java/org/collectionspace/services/common/AbstractCollectionSpaceResourceImpl.java
services/common/src/main/java/org/collectionspace/services/common/NuxeoBasedResource.java
services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteDocumentModelHandlerImpl.java

index 760c5acd5559ef5f5ccb5050ff6c956b316673bf..48607fc71bb0c2445f709dceb937c5c1cfe523a5 100644 (file)
@@ -295,7 +295,7 @@ public abstract class AuthorityResource<AuthCommon, AuthItemHandler>
     @Override
        public DocumentModel getDocModelForAuthorityItem(CoreSessionInterface repoSession, RefName.AuthorityItem item) 
                        throws Exception, DocumentNotFoundException {
-       if(item == null) {
+       if (item == null) {
                return null;
        }
         String whereClause = RefNameServiceUtils.buildWhereForAuthByName(authorityCommonSchemaName, item.getParentShortIdentifier());
index d84be81faae78ffe07fb027c2dd2bf52586c0e54..6ca439eba5c13facca8714b17179e949f9c4caac 100644 (file)
@@ -113,7 +113,7 @@ public abstract class AbstractCollectionSpaceResourceImpl<IT, OT>
      */
     @Override
     synchronized public RepositoryClient<IT, OT> getRepositoryClient(ServiceContext<IT, OT> ctx) {
-        if(repositoryClient != null){
+        if (repositoryClient != null){
             return repositoryClient;
         }
         repositoryClient = repositoryClientFactory.getClient(ctx.getRepositoryClientName());
index 18e43053d9198ee6bb8ae8caf5c428aed3125261..97c1f71de30998c6d94b5964c32fb83a09ebbb4f 100644 (file)
@@ -600,7 +600,7 @@ public abstract class NuxeoBasedResource
     public static DocumentModel getDocModelForRefName(CoreSessionInterface repoSession, String refName, ResourceMap resourceMap) 
                        throws Exception, DocumentNotFoundException {
        RefName.AuthorityItem item = RefName.AuthorityItem.parse(refName);
-       if(item != null) {
+       if (item != null) {
                NuxeoBasedResource resource = (NuxeoBasedResource) resourceMap.get(item.inAuthority.resource);
                return resource.getDocModelForAuthorityItem(repoSession, item);
        }
index a135db4ed961c2ca13b839ba1ee576cd0b2bf28e..370a6dea6e5b4f8b3c9395506461eedc22ece799 100644 (file)
@@ -1196,7 +1196,7 @@ public abstract class   RemoteDocumentModelHandlerImpl<T, TL>
         //Do magic replacement of ${itemCSID} and fix URI's.
         fixupInboundListItems(ctx, inboundList, docModel, itemCSID);
 
-        String HAS_BROADER = RelationshipType.HAS_BROADER.value();
+        final String HAS_BROADER = RelationshipType.HAS_BROADER.value();
         UriInfo uriInfo = ctx.getUriInfo();
         MultivaluedMap<String, String> queryParams = uriInfo.getQueryParameters();
 
@@ -1265,7 +1265,7 @@ public abstract class   RemoteDocumentModelHandlerImpl<T, TL>
                                String newChildCsid = inboundItem.getSubject().getCsid();
                                if(newChildCsid == null) {
                                        String newChildRefName = inboundItem.getSubject().getRefName();
-                                       if(newChildRefName==null) {
+                                       if (newChildRefName == null) {
                                                throw new RuntimeException("Child with no CSID or refName!");
                                        }
                             if (logger.isTraceEnabled()) {