From: remillet Date: Tue, 24 May 2016 21:30:28 +0000 (-0700) Subject: CSPACE-6953: Simple hierarchy relations synchronization working. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=90b1421d967290f610488391e43c2134d9cb49f2;p=tmp%2Fjakarta-migration.git CSPACE-6953: Simple hierarchy relations synchronization working. --- diff --git a/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityResource.java b/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityResource.java index 760c5acd5..48607fc71 100644 --- a/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityResource.java +++ b/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityResource.java @@ -295,7 +295,7 @@ public abstract class AuthorityResource @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()); diff --git a/services/common/src/main/java/org/collectionspace/services/common/AbstractCollectionSpaceResourceImpl.java b/services/common/src/main/java/org/collectionspace/services/common/AbstractCollectionSpaceResourceImpl.java index d84be81fa..6ca439eba 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/AbstractCollectionSpaceResourceImpl.java +++ b/services/common/src/main/java/org/collectionspace/services/common/AbstractCollectionSpaceResourceImpl.java @@ -113,7 +113,7 @@ public abstract class AbstractCollectionSpaceResourceImpl */ @Override synchronized public RepositoryClient getRepositoryClient(ServiceContext ctx) { - if(repositoryClient != null){ + if (repositoryClient != null){ return repositoryClient; } repositoryClient = repositoryClientFactory.getClient(ctx.getRepositoryClientName()); diff --git a/services/common/src/main/java/org/collectionspace/services/common/NuxeoBasedResource.java b/services/common/src/main/java/org/collectionspace/services/common/NuxeoBasedResource.java index 18e43053d..97c1f71de 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/NuxeoBasedResource.java +++ b/services/common/src/main/java/org/collectionspace/services/common/NuxeoBasedResource.java @@ -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); } diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteDocumentModelHandlerImpl.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteDocumentModelHandlerImpl.java index a135db4ed..370a6dea6 100644 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteDocumentModelHandlerImpl.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RemoteDocumentModelHandlerImpl.java @@ -1196,7 +1196,7 @@ public abstract class RemoteDocumentModelHandlerImpl //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 queryParams = uriInfo.getQueryParameters(); @@ -1265,7 +1265,7 @@ public abstract class RemoteDocumentModelHandlerImpl 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()) {