From: Richard Millet Date: Fri, 19 Jul 2013 23:58:36 +0000 (-0700) Subject: CSPACE-5678-D: More service binding bug fixes. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=d0d32a4b205c0a34bc4fc63b04dcaca1571645ee;p=tmp%2Fjakarta-migration.git CSPACE-5678-D: More service binding bug fixes. --- diff --git a/services/common/src/main/cspace/config/services/tenants/lifesci/lifesci-tenant-bindings.delta.xml b/services/common/src/main/cspace/config/services/tenants/lifesci/lifesci-tenant-bindings.delta.xml index 2a58b41b1..c06c3ed6f 100644 --- a/services/common/src/main/cspace/config/services/tenants/lifesci/lifesci-tenant-bindings.delta.xml +++ b/services/common/src/main/cspace/config/services/tenants/lifesci/lifesci-tenant-bindings.delta.xml @@ -1,67 +1,7 @@ - - - - - - - - - - taxon - collectionobjects_naturalhistory - taxonomicIdentGroupList/[0]/taxon - - - - - - - - - - - authRef - taxonomicIdentGroupList/*/taxon - - - authRef - associatedTaxaGroupList/*/taxon - - - authRef - taxonomicIdentGroupList/*/identBy - - - authRef - taxonomicIdentGroupList/*/institution - - - - - - - - - - - - - - - true - - - - - + @@ -74,7 +14,6 @@ - @@ -110,6 +49,40 @@ + + + + + + + taxon + collectionobjects_naturalhistory + taxonomicIdentGroupList/[0]/taxon + + + + + + + + + + authRef + associatedTaxaGroupList/*/taxon + + + + + + + + + + true + + + + diff --git a/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto-unified.xml b/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto-unified.xml index 622996325..9e797ca77 100644 --- a/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto-unified.xml +++ b/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto-unified.xml @@ -3,8 +3,21 @@ + + + + + + order + order + + + + + + - + default-domain @@ -24,7 +37,7 @@ - + - + default-domain org.collectionspace.services.servicegroup.nuxeo.ServiceGroupDocumentModelHandler + + + + default-domain + org.collectionspace.services.blob.nuxeo.BlobDocumentModelHandler + + + + + name + name + + + mimeType + mimeType + + + encoding + encoding + + + length + length + + + + + org.collectionspace.services.blob.nuxeo.BlobValidatorHandler + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + default-domain + org.collectionspace.services.batch.nuxeo.BatchDocumentModelHandler + + + + + name + name + setName + + + + + org.collectionspace.services.batch.nuxeo.BatchValidatorHandler + + + + + + + + + + + + + + + + + + + + + + + default-domain + org.collectionspace.services.imports.nuxeo.ImportsDocumentModelHandler + + + + + importsField + importsField + setImportsField + + + + + + + + + + + + + + + + + + + + + + + + + + + default-domain + org.collectionspace.services.common.workflow.service.nuxeo.WorkflowDocumentModelHandler + org.collectionspace.services.workflow.nuxeo.WorkflowValidatorHandler + + + + + + + + + + + + + + + + + + + + default-domain + org.collectionspace.services.report.nuxeo.ReportDocumentModelHandler + + + + + name + name + + + + + org.collectionspace.services.report.nuxeo.ReportValidatorHandler + + org.collectionspace.services.report.nuxeo.ReportPostInitHandler + + + readerRoleName + reader + + + + + + + + + + + + + + + + + + + + + + + + + + + default-domain + org.collectionspace.services.relation.nuxeo.RelationDocumentModelHandler + + + + + org.collectionspace.services.relation.nuxeo.RelationValidatorHandler + + + objectNameProperty + subjectCsid + + + objectNumberProperty + predicateDisplayName + + + + org.collectionspace.services.common.init.AddIndices + + + relations_common + subjectcsid,objectcsid + + + + + + + + + + + + + + + + + + + + + + + + + + + /dimensions/workflow/ + default-domain + org.collectionspace.services.dimension.nuxeo.DimensionDocumentModelHandler + + + + + + + + + + + + + + + + + + + + + + + + + default-domain + org.collectionspace.services.contact.nuxeo.ContactDocumentModelHandler + + + + + displayName + displayName + + + + + + + + + + + + + + + authRef + addressGroupList/*/addressMunicipality + + + authRef + addressGroupList/*/addressStateOrProvince + + + + + + termRef + emailGroupList/*/emailType + + + termRef + telephoneNumberGroupList/*/telephoneNumberType + + + termRef + faxNumberGroupList/*/faxNumberType + + + termRef + webAddressGroupList/*/webAddressType + + + termRef + addressGroupList/*/addressCountry + + + termRef + addressGroupList/*/addressType + + + + + + + + + + + + + + + + + + + org.collectionspace.services.authorization.storage.RoleDocumentHandler + org.collectionspace.services.authorization.storage.RoleValidatorHandler + + + + + + + + + + + + + + + + + + + org.collectionspace.services.authorization.storage.PermissionDocumentHandler + org.collectionspace.services.authorization.storage.PermissionValidatorHandler + + + + + + + + + + + + + + + + + + + + + + org.collectionspace.services.authorization.storage.PermissionRoleDocumentHandler + + + + + + + + + + + + + + + + + + + + + org.collectionspace.services.account.storage.AccountRoleDocumentHandler + + + + + + + + + + + + + + + + + + + + + + + org.collectionspace.services.authorization.storage.PermissionRoleDocumentHandler + + + + + + + + + + + + + + + + + + + + + + + org.collectionspace.services.account.storage.AccountRoleDocumentHandler + + + + + + + + + + + + + + + diff --git a/services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java b/services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java index 05504aa1b..a451d5500 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java +++ b/services/common/src/main/java/org/collectionspace/services/common/config/TenantBindingConfigReaderImpl.java @@ -63,7 +63,7 @@ public class TenantBindingConfigReaderImpl final private static String MERGED_SUFFIX = ".merged.xml"; private static final String NO_SERVICE_BINDINGS_FOUND_ERR = "No Service bindings found."; - final Logger logger = LoggerFactory.getLogger(TenantBindingConfigReaderImpl.class); + private static final Logger logger = LoggerFactory.getLogger(TenantBindingConfigReaderImpl.class); private List tenantBindingTypeList; //tenant id, tenant binding private Hashtable tenantBindings = @@ -305,7 +305,7 @@ public class TenantBindingConfigReaderImpl if (found == false) { if (logger.isErrorEnabled() == true) { errMessage = errMessage != null ? errMessage : TENANT_BINDINGS_ERROR; - logger.error(errMessage + tenantName); + logger.error(errMessage + " - For tenant: " + tenantName); } } } // else-for @@ -325,11 +325,14 @@ public class TenantBindingConfigReaderImpl for (ServiceBindingType serviceBinding : tenantBinding.getServiceBindings()) { String key = getTenantQualifiedServiceName(tenantBinding.getId(), serviceBinding.getName()); + if (key == null) { + continue; + } serviceBindings.put(key, serviceBinding); if (serviceBinding!=null){ ServiceObjectType objectType = serviceBinding.getObject(); - if (objectType!=null){ + if (objectType != null) { String docType = objectType.getName(); String docTypeKey = getTenantQualifiedIdentifier(tenantBinding.getId(), docType); docTypes.put(docTypeKey, serviceBinding); @@ -464,10 +467,16 @@ public class TenantBindingConfigReaderImpl * @param serviceName * @return the properly qualified service name */ - public static String getTenantQualifiedServiceName( - String tenantId, String serviceName) { -// return tenantId + "." + serviceName.toLowerCase(); - return getTenantQualifiedIdentifier(tenantId, serviceName.toLowerCase()); + public static String getTenantQualifiedServiceName(String tenantId, String serviceName) { + String result = null; + + if (serviceName != null) { + logger.debug(String.format(" * tenant:serviceBindings '%s'", serviceName)); + System.out.println(String.format(" * tenant:serviceBindings '%s'", serviceName)); // Debug only + return getTenantQualifiedIdentifier(tenantId, serviceName.toLowerCase()); + } + + return result; } public static String getTenantQualifiedIdentifier(String tenantId, String identifier) { diff --git a/services/concept/service/src/main/java/org/collectionspace/services/concept/nuxeo/ConceptAuthorityValidatorHandler.java b/services/concept/service/src/main/java/org/collectionspace/services/concept/nuxeo/ConceptAuthorityValidatorHandler.java new file mode 100644 index 000000000..e69de29bb diff --git a/services/location/service/src/main/java/org/collectionspace/services/location/nuxeo/LocationAuthorityValidatorHandler.java b/services/location/service/src/main/java/org/collectionspace/services/location/nuxeo/LocationAuthorityValidatorHandler.java new file mode 100644 index 000000000..e69de29bb