From 0312372c3197f12758ba7abb52bca4d49c458d80 Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Tue, 1 May 2012 10:59:23 -0700 Subject: [PATCH] CSPACE-5119,CSPACE-5135: Updated common fields in repeatable term information group in Person item schema, to reflect recent discussion/decisions on the Work list. Adding additional changes not yet reflected in last commit. --- .../config/services/tenants/tenant-bindings-proto.xml | 2 +- .../src/main/resources/schemas/persons_common.xsd | 8 +++----- .../person/jaxb/src/main/resources/person_common.xsd | 8 +++----- .../services/person/nuxeo/PersonValidatorHandler.java | 9 +++++++++ 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml b/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml index 5d4f0b739..a18cd2bdf 100644 --- a/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml +++ b/services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto.xml @@ -1983,7 +1983,7 @@ persontermgroup - displayname + termdisplayname persons_common diff --git a/services/person/3rdparty/nuxeo-platform-cs-person/src/main/resources/schemas/persons_common.xsd b/services/person/3rdparty/nuxeo-platform-cs-person/src/main/resources/schemas/persons_common.xsd index 05b24f369..45e5efd78 100644 --- a/services/person/3rdparty/nuxeo-platform-cs-person/src/main/resources/schemas/persons_common.xsd +++ b/services/person/3rdparty/nuxeo-platform-cs-person/src/main/resources/schemas/persons_common.xsd @@ -73,15 +73,13 @@ - - - - + + - + diff --git a/services/person/jaxb/src/main/resources/person_common.xsd b/services/person/jaxb/src/main/resources/person_common.xsd index d5e765237..23a483d79 100644 --- a/services/person/jaxb/src/main/resources/person_common.xsd +++ b/services/person/jaxb/src/main/resources/person_common.xsd @@ -62,15 +62,13 @@ - - - - + + - + diff --git a/services/person/service/src/main/java/org/collectionspace/services/person/nuxeo/PersonValidatorHandler.java b/services/person/service/src/main/java/org/collectionspace/services/person/nuxeo/PersonValidatorHandler.java index 261d81d6d..fe36ecd5f 100644 --- a/services/person/service/src/main/java/org/collectionspace/services/person/nuxeo/PersonValidatorHandler.java +++ b/services/person/service/src/main/java/org/collectionspace/services/person/nuxeo/PersonValidatorHandler.java @@ -66,12 +66,21 @@ public class PersonValidatorHandler implements ValidatorHandler { boolean invalid = false; if(person != null) { // No guarantee that there is a common part in every post/update. + // Validation occurring on both creates and updates + + // FIXME Add validation logic here to ensure that every term info group must contain + // any required data elements. (Potential example: every term info group must contain + // a non-null, non-whitespace-only value in either of the term or displayName fields.) + + /* String displayName = person.getDisplayName(); if (!person.isDisplayNameComputed() && ((displayName == null) || displayName.trim().isEmpty())) { invalid = true; msg += "displayName must be non-null and non-blank if displayNameComputed is false!"; } + * + */ // Validation specific to creates or updates if (action.equals(Action.CREATE)) { -- 2.47.3