CSPACE-396, CSPACE-787, CSPACE-400
Added validation handler. One or more handlers could configured in service binding. If a handler is configured for the service, the service layer callsback on the handler before create and update operations. Example validatorHandlers could be found in Account and CollectionObject services. Sends 400 (bad request) if validation fails.
Deleted DocumentHandlerFactory.java and moved that code to AbstractServiceContext.java. Service context (that is aware of ther service binding) also acts as a factory for various handlers (validator, document) configured in the binding.
tests: account validation (userid, tenant info), collectionobject (othernumber), all service tests
M services/collectionobject/service/src/main/java/org/collectionspace/services/collectionobject/CollectionObjectResource.java
A services/collectionobject/service/src/main/java/org/collectionspace/services/collectionobject/nuxeo/CollectionObjectValidatorHandler.java
M services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectServiceTest.java
M services/dimension/service/src/main/java/org/collectionspace/services/dimension/DimensionResource.java
M services/common/src/main/java/org/collectionspace/services/common/ServiceException.java
M services/common/src/main/java/org/collectionspace/services/common/context/RemoteServiceContextImpl.java
M services/common/src/main/java/org/collectionspace/services/common/context/ServiceContext.java
M services/common/src/main/java/org/collectionspace/services/common/context/MultipartServiceContext.java
M services/common/src/main/java/org/collectionspace/services/common/context/AbstractServiceContext.java
M services/common/src/main/java/org/collectionspace/services/common/context/MultipartServiceContextImpl.java
M services/common/src/main/java/org/collectionspace/services/common/document/AbstractDocumentHandler.java
A services/common/src/main/java/org/collectionspace/services/common/document/ValidatorHandler.java
D services/common/src/main/java/org/collectionspace/services/common/document/DocumentHandlerFactory.java
A services/common/src/main/java/org/collectionspace/services/common/document/InvalidDocumentException.java
M services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RepositoryJavaClient.java
M services/common/src/main/config/tenant-bindings.xml
M services/common/src/main/resources/service.xsd
M services/acquisition/service/src/main/java/org/collectionspace/services/acquisition/AcquisitionResource.java
M services/contact/service/src/main/java/org/collectionspace/services/contact/ContactResource.java
A services/account/service/src/main/java/org/collectionspace/services/account/storage/AccountValidatorHandler.java
M services/account/service/src/main/java/org/collectionspace/services/account/storage/AccountDocumentHandler.java
M services/account/service/src/main/java/org/collectionspace/services/account/storage/AccountJpaFilter.java
M services/account/service/src/main/java/org/collectionspace/services/account/AccountResource.java
M services/account/client/src/test/java/org/collectionspace/services/account/client/test/AccountServiceTest.java
M services/organization/service/src/main/java/org/collectionspace/services/organization/OrgAuthorityResource.java
_M services/organization/import
M services/person/service/src/main/java/org/collectionspace/services/person/PersonAuthorityResource.java
M services/vocabulary/service/src/main/java/org/collectionspace/services/vocabulary/VocabularyResource.java
M services/intake/service/src/main/java/org/collectionspace/services/intake/IntakeResource.java
M services/relation/service/src/main/java/org/collectionspace/services/relation/NewRelationResource.java