]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
DRYD-645: Upgrade logging to log4j2 over slf4j.
authorRay Lee <ray.lee@lyrasis.org>
Sat, 6 Jul 2019 04:39:51 +0000 (21:39 -0700)
committerRay Lee <ray.lee@lyrasis.org>
Mon, 23 Sep 2019 19:25:24 +0000 (12:25 -0700)
128 files changed:
3rdparty/nuxeo/nuxeo-platform-elasticsearch/pom.xml
3rdparty/nuxeo/nuxeo-platform-listener/botgarden/pom.xml
3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/CreateVersionListener.java
3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/DeleteDeadLocationListener.java
3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateAccessCodeListener.java
3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateDeadFlagListener.java
3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateLocationListener.java
3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateRareFlagListener.java
3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateStyledNameListener.java
3rdparty/nuxeo/nuxeo-platform-listener/naturalhistory/pom.xml
3rdparty/nuxeo/nuxeo-platform-listener/naturalhistory/src/main/java/org/collectionspace/services/listener/naturalhistory/UpdateFormattedDisplayNameListener.java
3rdparty/nuxeo/nuxeo-platform-listener/pom.xml
3rdparty/nuxeo/nuxeo-platform-listener/updateimagederivatives/src/main/java/org/collectionspace/services/listener/UpdateImageDerivatives.java
3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/src/main/java/org/collectionspace/services/listener/AbstractUpdateObjectLocationValues.java
3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/src/main/java/org/collectionspace/services/listener/UpdateObjectLocationAndCrateOnMove.java
3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/src/main/java/org/collectionspace/services/listener/UpdateObjectLocationOnMove.java
3rdparty/nuxeo/nuxeo-platform-listener/updaterelationsondelete/src/main/java/org/collectionspace/services/listener/UpdateRelationsOnDelete.java
3rdparty/nuxeo/nuxeo-platform-quote/pom.xml
3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/impl/QuoteManagerImpl.java
3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/listener/AbstractQuoteListener.java
3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/listener/DocumentRemovedQuoteEventListener.java
3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/listener/QuoteRemovedEventListener.java
3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/service/QuoteService.java
3rdparty/nuxeo/nuxeo-platform-thumbnail/pom.xml
3rdparty/nuxeo/nuxeo-platform-thumbnail/src/main/java/org/collectionspace/services/nuxeo/extension/thumbnail/AddThumbnailUnrestricted.java
3rdparty/nuxeo/nuxeo-platform-thumbnail/src/main/java/org/collectionspace/services/nuxeo/extension/thumbnail/ThumbnailConverter.java
3rdparty/nuxeo/nuxeo-server/7.10-HF17/bundles/pom.xml
pom.xml
services/IntegrationTests/pom.xml
services/JaxRsServiceProvider/pom.xml
services/JaxRsServiceProvider/src/main/resources/log4j.properties
services/JaxRsServiceProvider/src/main/resources/log4j2.xml [new file with mode: 0644]
services/PerformanceTests/pom.xml
services/account/client/pom.xml
services/account/service/pom.xml
services/account/service/src/main/java/org/collectionspace/services/account/storage/TenantDocumentHandler.java
services/account/service/src/main/java/org/collectionspace/services/account/storage/TenantValidatorHandler.java
services/acquisition/client/pom.xml
services/authentication/client/pom.xml
services/authentication/service/pom.xml
services/authority/pom.xml
services/authority/service/pom.xml
services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityServiceUtils.java
services/authorization-common/pom.xml
services/authorization-mgt/client/pom.xml
services/authorization-mgt/import/pom.xml
services/authorization-mgt/service/pom.xml
services/authorization/service/pom.xml
services/authorization/service/src/main/java/org/collectionspace/services/authorization/AuthZ.java
services/authorization/service/src/main/java/org/collectionspace/services/authorization/spring/SpringAuthorizationProvider.java
services/authorization/service/src/main/java/org/collectionspace/services/authorization/spring/SpringPermissionEvaluator.java
services/authorization/service/src/main/java/org/collectionspace/services/authorization/spring/SpringPermissionManager.java
services/batch/client/pom.xml
services/blob/client/pom.xml
services/citation/client/pom.xml
services/citation/service/pom.xml
services/claim/client/pom.xml
services/client/pom.xml
services/client/src/main/java/org/collectionspace/services/client/PoxPayload.java
services/collectionobject/client/pom.xml
services/collectionobject/service/pom.xml
services/common-api/pom.xml
services/common-test/pom.xml
services/common/lib/slf4j/log4j-1.2.17.jar [deleted file]
services/common/lib/slf4j/log4j-api-2.7.jar [new file with mode: 0644]
services/common/lib/slf4j/log4j-api-2.9.1.jar [deleted file]
services/common/lib/slf4j/log4j-core-2.7.jar [new file with mode: 0644]
services/common/lib/slf4j/log4j-core-2.9.1.jar [deleted file]
services/common/lib/slf4j/log4j-slf4j-impl-2.7.jar [new file with mode: 0644]
services/common/lib/slf4j/log4j-web-2.7.jar [new file with mode: 0644]
services/common/lib/slf4j/slf4j-log4j12-1.7.21.jar [deleted file]
services/common/pom.xml
services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/ImagePlugin.javax
services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JPATransactionContext.java
services/common/src/main/java/org/collectionspace/services/nuxeo/util/ReindexFulltextRoot.java
services/concept/client/pom.xml
services/concept/service/pom.xml
services/conditioncheck/client/pom.xml
services/config/pom.xml
services/conservation/client/pom.xml
services/contact/client/pom.xml
services/dimension/client/pom.xml
services/dimension/pom.xml
services/exhibition/client/pom.xml
services/group/client/pom.xml
services/id/pom.xml
services/imports/service/pom.xml
services/imports/service/src/main/java/org/collectionspace/services/imports/ImportsResource.java
services/index/client/pom.xml
services/intake/client/pom.xml
services/loanin/client/pom.xml
services/loanout/client/pom.xml
services/location/client/pom.xml
services/location/service/pom.xml
services/material/client/pom.xml
services/material/service/pom.xml
services/media/client/pom.xml
services/movement/client/pom.xml
services/note/client/pom.xml
services/objectexit/client/pom.xml
services/organization/client/pom.xml
services/organization/service/pom.xml
services/osteology/client/pom.xml
services/person/client/pom.xml
services/person/service/pom.xml
services/place/client/pom.xml
services/place/service/pom.xml
services/pom.xml
services/pottag/client/pom.xml
services/propagation/client/pom.xml
services/publicitem/client/pom.xml
services/query/service/pom.xml
services/relation/client/pom.xml
services/report/client/pom.xml
services/security/client/pom.xml
services/servicegroup/client/pom.xml
services/structureddate/client/pom.xml
services/structureddate/structureddate/pom.xml
services/systeminfo/client/pom.xml
services/taxonomy/client/pom.xml
services/taxonomy/service/pom.xml
services/uoc/client/pom.xml
services/valuationcontrol/client/pom.xml
services/vocabulary/client/pom.xml
services/vocabulary/service/pom.xml
services/work/client/pom.xml
services/work/service/pom.xml
services/workflow/client/pom.xml

index 574cfe837f36321354d494f7a42eb0b4ed830e79..d6cb6e71a6898e4b9f6861064c2d12a8b443a681 100644 (file)
@@ -24,7 +24,6 @@
         <dependency>
             <groupId>org.nuxeo.ecm.automation</groupId>
             <artifactId>nuxeo-automation-io</artifactId>
-            <version>${nuxeo.core.version}</version>
         </dependency>
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 8af09b050b98e8f9afc0606824a0b3fc98b17b20..755a5a4d6d4845bd1e51cd8aadada2c102bffd1d 100644 (file)
@@ -20,7 +20,6 @@
         <dependency>
             <groupId>org.nuxeo.ecm.core</groupId>
             <artifactId>nuxeo-core-storage-sql</artifactId>
-            <version>${nuxeo.core.version}</version>
         </dependency>
            <dependency>
              <groupId>org.nuxeo.ecm.platform</groupId>
index a30c848e70b74534efe6daaff0269cbcaecaf995..6424df4e68beb9b1dca703412e6cb0cc5d6fabe6 100644 (file)
@@ -1,7 +1,5 @@
 package org.collectionspace.services.listener.botgarden;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.movement.nuxeo.MovementConstants;
 import org.collectionspace.services.nuxeo.listener.AbstractCSEventListenerImpl;
@@ -11,11 +9,13 @@ import org.nuxeo.ecm.core.api.VersioningOption;
 import org.nuxeo.ecm.core.event.Event;
 import org.nuxeo.ecm.core.event.EventContext;
 import org.nuxeo.ecm.core.event.impl.DocumentEventContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class CreateVersionListener extends AbstractCSEventListenerImpl {
        public static final String SKIP_PROPERTY = "CreateVersionListener.SKIP";
 
-       final Log logger = LogFactory.getLog(CreateVersionListener.class);
+       final Logger logger = LoggerFactory.getLogger(CreateVersionListener.class);
 
        @Override
        public void handleEvent(Event event) {
@@ -32,12 +32,12 @@ public class CreateVersionListener extends AbstractCSEventListenerImpl {
 
                                logger.debug("docType=" + doc.getType());
 
-                               if (doc.getType().startsWith(MovementConstants.NUXEO_DOCTYPE) && 
-                                               !doc.isVersion() && 
+                               if (doc.getType().startsWith(MovementConstants.NUXEO_DOCTYPE) &&
+                                               !doc.isVersion() &&
                                                !doc.isProxy() &&
                                                !doc.getCurrentLifeCycleState().equals(WorkflowClient.WORKFLOWSTATE_DELETED)) {
                                        // Version the document
-                                       DocumentRef versionRef = doc.checkIn(VersioningOption.MINOR, null);             
+                                       DocumentRef versionRef = doc.checkIn(VersioningOption.MINOR, null);
                                        DocumentModel versionDoc = context.getCoreSession().getDocument(versionRef);
 
                                        logger.debug("created version: id=" + versionDoc.getId() + " csid=" + versionDoc.getName());
@@ -48,4 +48,4 @@ public class CreateVersionListener extends AbstractCSEventListenerImpl {
                        }
                }
        }
-}
\ No newline at end of file
+}
index 45436ad9b21d626d0d3232f569dabfa94939192a..4590b3f0687e162cbee45b6c98240d302bed2ebf 100644 (file)
@@ -1,7 +1,5 @@
 package org.collectionspace.services.listener.botgarden;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.movement.nuxeo.MovementBotGardenConstants;
 import org.collectionspace.services.movement.nuxeo.MovementConstants;
@@ -11,12 +9,14 @@ import org.nuxeo.ecm.core.api.DocumentModel;
 import org.nuxeo.ecm.core.event.Event;
 import org.nuxeo.ecm.core.event.EventContext;
 import org.nuxeo.ecm.core.event.impl.DocumentEventContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class DeleteDeadLocationListener extends AbstractCSEventListenerImpl {
-       final Log logger = LogFactory.getLog(DeleteDeadLocationListener.class);
+       final Logger logger = LoggerFactory.getLogger(DeleteDeadLocationListener.class);
 
-    /* 
-     * Delete dead locations. 
+    /*
+     * Delete dead locations.
      */
     @Override
        public void handleEvent(Event event) {
@@ -27,17 +27,17 @@ public class DeleteDeadLocationListener extends AbstractCSEventListenerImpl {
             DocumentModel doc = context.getSourceDocument();
 
             if (doc.getType().startsWith(MovementConstants.NUXEO_DOCTYPE) &&
-                       !doc.isVersion() && 
-                       !doc.isProxy() && 
+                       !doc.isVersion() &&
+                       !doc.isProxy() &&
                        !doc.getCurrentLifeCycleState().equals(WorkflowClient.WORKFLOWSTATE_DELETED)) {
-               String actionCode = (String) doc.getProperty(MovementBotGardenConstants.ACTION_CODE_SCHEMA_NAME, 
+               String actionCode = (String) doc.getProperty(MovementBotGardenConstants.ACTION_CODE_SCHEMA_NAME,
                                MovementBotGardenConstants.ACTION_CODE_FIELD_NAME);
-               
+
                logger.debug("actionCode=" + actionCode);
-               
+
                if (actionCode != null && actionCode.equals(MovementBotGardenConstants.DEAD_ACTION_CODE)) {
                        CoreSession session = context.getCoreSession();
-                       
+
                        if (session.getAllowedStateTransitions(doc.getRef()).contains(WorkflowClient.WORKFLOWTRANSITION_DELETE)) {
                                session.followTransition(doc.getRef(), WorkflowClient.WORKFLOWTRANSITION_DELETE);
                        }
@@ -45,4 +45,4 @@ public class DeleteDeadLocationListener extends AbstractCSEventListenerImpl {
             }
         }
     }
-}
\ No newline at end of file
+}
index 64989d1adde41c330240a9163e24e56149e72618..a90f6ed59ee71b135f5992b86a099ea96806f9c6 100644 (file)
@@ -8,8 +8,6 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.collectionspace.services.batch.nuxeo.UpdateAccessCodeBatchJob;
 import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.collectionobject.nuxeo.CollectionObjectBotGardenConstants;
@@ -27,23 +25,25 @@ import org.nuxeo.ecm.core.api.event.DocumentEventTypes;
 import org.nuxeo.ecm.core.event.Event;
 import org.nuxeo.ecm.core.event.EventContext;
 import org.nuxeo.ecm.core.event.impl.DocumentEventContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A listener that updates the access code on taxon records when collectionobjects
  * or taxon records are created or modified.
- * 
+ *
  * @see org.collectionspace.services.batch.nuxeo.UpdateAccessCodeBatchJob
  * @author ray
  *
  */
 public class UpdateAccessCodeListener extends AbstractCSEventListenerImpl {
-       final Log logger = LogFactory.getLog(UpdateAccessCodeListener.class);
+       final Logger logger = LoggerFactory.getLogger(UpdateAccessCodeListener.class);
 
        public static final String PREVIOUS_DEAD_FLAG_PROPERTY_NAME = "UpdateAccessCodeListener.previousDeadFlag";
        public static final String PREVIOUS_TAXON_NAMES_PROPERTY_NAME = "UpdateAccessCodeListener.previousTaxonNames";
        public static final String PREVIOUS_ACCESS_CODE_PROPERTY_NAME = "UpdateAccessCodeListener.previousAccessCode";
        public static final String DELETED_RELATION_PARENT_CSID_PROPERTY_NAME = "UpdateAccessCodeListener.deletedRelationParentCsid";
-       
+
        private static final String[] TAXON_PATH_ELEMENTS = CollectionObjectBotGardenConstants.TAXON_FIELD_NAME.split("/");
        private static final String TAXONOMIC_IDENT_GROUP_LIST_FIELD_NAME = TAXON_PATH_ELEMENTS[0];
        private static final String TAXON_FIELD_NAME = TAXON_PATH_ELEMENTS[2];
@@ -51,7 +51,7 @@ public class UpdateAccessCodeListener extends AbstractCSEventListenerImpl {
        @Override
        public void handleEvent(Event event) {
                EventContext ec = event.getContext();
-               
+
                if (isRegistered(event) && ec instanceof DocumentEventContext) {
                        DocumentEventContext context = (DocumentEventContext) ec;
                        DocumentModel doc = context.getSourceDocument();
@@ -59,19 +59,19 @@ public class UpdateAccessCodeListener extends AbstractCSEventListenerImpl {
                        logger.debug("docType=" + doc.getType());
 
                        if (doc.getType().startsWith(CollectionObjectConstants.NUXEO_DOCTYPE) &&
-                                       !doc.isVersion() && 
-                                       !doc.isProxy() && 
+                                       !doc.isVersion() &&
+                                       !doc.isProxy() &&
                                        !doc.getCurrentLifeCycleState().equals(WorkflowClient.WORKFLOWSTATE_DELETED)) {
-                               
+
                                if (event.getName().equals(DocumentEventTypes.BEFORE_DOC_UPDATE)) {
                                        // Stash the previous dead flag and taxonomic ident values, so they can be retrieved in the documentModified handler.
-                                       
+
                                        DocumentModel previousDoc = (DocumentModel) context.getProperty(CoreEventConstants.PREVIOUS_DOCUMENT_MODEL);
 
-                                       String previousDeadFlag = (String) previousDoc.getProperty(CollectionObjectBotGardenConstants.DEAD_FLAG_SCHEMA_NAME, 
+                                       String previousDeadFlag = (String) previousDoc.getProperty(CollectionObjectBotGardenConstants.DEAD_FLAG_SCHEMA_NAME,
                                                        CollectionObjectBotGardenConstants.DEAD_FLAG_FIELD_NAME);
                                        context.setProperty(PREVIOUS_DEAD_FLAG_PROPERTY_NAME, previousDeadFlag);
-                                       
+
                                        List<String> previousTaxonNames = getTaxonNames(previousDoc);
                                        context.setProperty(PREVIOUS_TAXON_NAMES_PROPERTY_NAME, previousTaxonNames.toArray(new String[previousTaxonNames.size()]));
                                }
@@ -79,24 +79,24 @@ public class UpdateAccessCodeListener extends AbstractCSEventListenerImpl {
                                        boolean deadFlagChanged = false;
                                        Set<String> deletedTaxonNames = null;
                                        Set<String> addedTaxonNames = null;
-                                       
-                                       if (event.getName().equals(DocumentEventTypes.DOCUMENT_UPDATED)) {                                              
+
+                                       if (event.getName().equals(DocumentEventTypes.DOCUMENT_UPDATED)) {
                                                // As an optimization, check if the dead flag of the collectionobject has
                                                // changed, or if the taxonomic identification has changed. If so, we need to
                                                // update the access codes of referenced taxon records.
 
                                                String previousDeadFlag = (String) context.getProperty(PREVIOUS_DEAD_FLAG_PROPERTY_NAME);
-                                               String currentDeadFlag = (String) doc.getProperty(CollectionObjectBotGardenConstants.DEAD_FLAG_SCHEMA_NAME, 
+                                               String currentDeadFlag = (String) doc.getProperty(CollectionObjectBotGardenConstants.DEAD_FLAG_SCHEMA_NAME,
                                                                CollectionObjectBotGardenConstants.DEAD_FLAG_FIELD_NAME);
 
                                                if (previousDeadFlag == null) {
                                                        previousDeadFlag = "";
                                                }
-                                               
+
                                                if (currentDeadFlag == null) {
                                                        currentDeadFlag = "";
                                                }
-                                                                                               
+
                                                if (previousDeadFlag.equals(currentDeadFlag)) {
                                                        logger.debug("dead flag not changed: previousDeadFlag=" + previousDeadFlag + " currentDeadFlag=" + currentDeadFlag);
                                                }
@@ -104,33 +104,33 @@ public class UpdateAccessCodeListener extends AbstractCSEventListenerImpl {
                                                        logger.debug("dead flag changed: previousDeadFlag=" + previousDeadFlag + " currentDeadFlag=" + currentDeadFlag);
                                                        deadFlagChanged = true;
                                                }
-                                               
+
                                                List<String> previousTaxonNames = Arrays.asList((String[]) context.getProperty(PREVIOUS_TAXON_NAMES_PROPERTY_NAME));
                                                List<String> currentTaxonNames = getTaxonNames(doc);
-                                               
+
                                                deletedTaxonNames = findDeletedTaxonNames(previousTaxonNames, currentTaxonNames);
                                                logger.debug("found deleted taxon names: " + StringUtils.join(deletedTaxonNames, ", "));
 
                                                addedTaxonNames = findAddedTaxonNames(previousTaxonNames, currentTaxonNames);
-                                               logger.debug("found added taxon names: " + StringUtils.join(addedTaxonNames, ", "));                                    
+                                               logger.debug("found added taxon names: " + StringUtils.join(addedTaxonNames, ", "));
                                        }
                                        else if (event.getName().equals(DocumentEventTypes.DOCUMENT_CREATED)) {
                                                deadFlagChanged = true;
                                        }
-                                       
+
                                        UpdateAccessCodeBatchJob updater = createUpdater();
-                                       
+
                                        if (deadFlagChanged) {
                                                String collectionObjectCsid = doc.getName();
-                                               
+
                                                try {
                                                        // Pass false for the second parameter to updateReferencedAccessCodes, so that it doesn't
                                                        // propagate changes up the taxon hierarchy. Propagation is taken care of by this
                                                        // event handler: As taxon records are modified, this handler executes, and updates the
                                                        // parent.
-                                               
+
                                                        InvocationResults results = updater.updateReferencedAccessCodes(collectionObjectCsid, false);
-                       
+
                                                        logger.debug("updateReferencedAccessCodes complete: numAffected=" + results.getNumAffected() + " userNote=" + results.getUserNote());
                                                }
                                                catch (Exception e) {
@@ -140,23 +140,23 @@ public class UpdateAccessCodeListener extends AbstractCSEventListenerImpl {
                                        else {
                                                // If the dead flag didn't change, we still need to recalculate the access codes of
                                                // any taxonomic idents that were added.
-                                               
+
                                                if (addedTaxonNames != null) {
                                                        for (String addedTaxonName : addedTaxonNames) {
                                                                logger.debug("updating added taxon: " + addedTaxonName);
 
-                                                               try {                                                                   
+                                                               try {
                                                                        InvocationResults results = updater.updateAccessCode(addedTaxonName, false);
-                                               
+
                                                                        logger.debug("updateAccessCode complete: numAffected=" + results.getNumAffected() + " userNote=" + results.getUserNote());
                                                                }
                                                                catch (Exception e) {
                                                                        logger.error(e.getMessage(), e);
-                                                               }                                               
-                                                       }                                                       
+                                                               }
+                                                       }
                                                }
                                        }
-                                       
+
                                        if (deletedTaxonNames != null) {
                                                // If any taxonomic idents were removed from the collectionobject, they need to have their
                                                // access codes recalculated.
@@ -164,24 +164,24 @@ public class UpdateAccessCodeListener extends AbstractCSEventListenerImpl {
                                                for (String deletedTaxonName : deletedTaxonNames) {
                                                        logger.debug("updating deleted taxon: " + deletedTaxonName);
 
-                                                       try {                                                                   
+                                                       try {
                                                                InvocationResults results = updater.updateAccessCode(deletedTaxonName, false);
-                                       
+
                                                                logger.debug("updateAccessCode complete: numAffected=" + results.getNumAffected() + " userNote=" + results.getUserNote());
                                                        }
                                                        catch (Exception e) {
                                                                logger.error(e.getMessage(), e);
-                                                       }                                               
+                                                       }
                                                }
                                        }
                                }
                        }
                        else if (doc.getType().startsWith(TaxonConstants.NUXEO_DOCTYPE) &&
-                                       !doc.isVersion() && 
-                                       !doc.isProxy() && 
+                                       !doc.isVersion() &&
+                                       !doc.isProxy() &&
                                        !doc.getCurrentLifeCycleState().equals(WorkflowClient.WORKFLOWSTATE_DELETED)) {
-                               
-                               if (event.getName().equals(DocumentEventTypes.BEFORE_DOC_UPDATE)) {                                     
+
+                               if (event.getName().equals(DocumentEventTypes.BEFORE_DOC_UPDATE)) {
                                        // Stash the previous access code value, so it can be retrieved in the documentModified handler.
 
                                        DocumentModel previousDoc = (DocumentModel) context.getProperty(CoreEventConstants.PREVIOUS_DOCUMENT_MODEL);
@@ -192,7 +192,7 @@ public class UpdateAccessCodeListener extends AbstractCSEventListenerImpl {
                                else {
                                        boolean updateRequired = false;
 
-                                       if (event.getName().equals(DocumentEventTypes.DOCUMENT_UPDATED)) {                              
+                                       if (event.getName().equals(DocumentEventTypes.DOCUMENT_UPDATED)) {
                                                // As an optimization, check if the access code of the taxon has
                                                // changed. We only need to update the access code of the parent taxon
                                                // record if it has.
@@ -203,11 +203,11 @@ public class UpdateAccessCodeListener extends AbstractCSEventListenerImpl {
                                                if (previousAccessCode == null) {
                                                        previousAccessCode = "";
                                                }
-                                               
+
                                                if (currentAccessCode == null) {
                                                        currentAccessCode = "";
                                                }
-                                               
+
                                                if (previousAccessCode.equals(currentAccessCode)) {
                                                        logger.debug("update not required: previousAccessCode=" + previousAccessCode + " currentAccessCode=" + currentAccessCode);
                                                }
@@ -217,20 +217,20 @@ public class UpdateAccessCodeListener extends AbstractCSEventListenerImpl {
                                                }
                                        }
                                        else if (event.getName().equals(DocumentEventTypes.DOCUMENT_CREATED)) {
-                                               updateRequired = true;  
+                                               updateRequired = true;
                                        }
-                               
+
                                        if (updateRequired) {
                                                String taxonCsid = doc.getName();
-                                               
+
                                                try {
                                                        // Pass false for the second parameter to updateReferencedAccessCodes, so that it doesn't
                                                        // propagate changes up the taxon hierarchy. Propagation is taken care of by this
                                                        // event handler: As taxon records are modified, this handler executes, and updates the
                                                        // parent.
-                                                       
+
                                                        InvocationResults results = createUpdater().updateParentAccessCode(taxonCsid, false);
-                       
+
                                                        logger.debug("updateParentAccessCode complete: numAffected=" + results.getNumAffected() + " userNote=" + results.getUserNote());
                                                }
                                                catch (Exception e) {
@@ -240,23 +240,23 @@ public class UpdateAccessCodeListener extends AbstractCSEventListenerImpl {
                                }
                        }
                        else if (doc.getType().equals(RelationConstants.NUXEO_DOCTYPE) &&
-                                       !doc.isVersion() && 
+                                       !doc.isVersion() &&
                                        !doc.isProxy()) {
-                               
+
                                if (event.getName().equals(DocumentEventTypes.DOCUMENT_CREATED)) {
                                        String subjectDocType = (String) doc.getProperty(RelationConstants.SUBJECT_DOCTYPE_SCHEMA_NAME, RelationConstants.SUBJECT_DOCTYPE_FIELD_NAME);
                                        String objectDocType = (String) doc.getProperty(RelationConstants.OBJECT_DOCTYPE_SCHEMA_NAME, RelationConstants.OBJECT_DOCTYPE_FIELD_NAME);;
                                        String relationType = (String) doc.getProperty(RelationConstants.TYPE_SCHEMA_NAME, RelationConstants.TYPE_FIELD_NAME);
-       
+
                                        logger.debug("subjectDocType=" + subjectDocType + " objectDocType=" + objectDocType + " relationType=" + relationType);
-       
+
                                        if (subjectDocType.equals(TaxonConstants.NUXEO_DOCTYPE) && objectDocType.equals(TaxonConstants.NUXEO_DOCTYPE) && relationType.equals(RelationConstants.BROADER_TYPE)) {
                                                String parentTaxonCsid = (String) doc.getProperty(RelationConstants.OBJECT_CSID_SCHEMA_NAME, RelationConstants.OBJECT_CSID_FIELD_NAME);
                                                logger.debug("child added, updating parent taxon: parentTaxonCsid=" + parentTaxonCsid);
-                                               
-                                               try {                                                   
+
+                                               try {
                                                        InvocationResults results = createUpdater().updateAccessCode(parentTaxonCsid, false);
-                                                       
+
                                                        logger.debug("updateAccessCode complete: numAffected=" + results.getNumAffected() + " userNote=" + results.getUserNote());
                                                }
                                                catch (Exception e) {
@@ -268,12 +268,12 @@ public class UpdateAccessCodeListener extends AbstractCSEventListenerImpl {
                                        String subjectDocType = (String) doc.getProperty(RelationConstants.SUBJECT_DOCTYPE_SCHEMA_NAME, RelationConstants.SUBJECT_DOCTYPE_FIELD_NAME);
                                        String objectDocType = (String) doc.getProperty(RelationConstants.OBJECT_DOCTYPE_SCHEMA_NAME, RelationConstants.OBJECT_DOCTYPE_FIELD_NAME);;
                                        String relationType = (String) doc.getProperty(RelationConstants.TYPE_SCHEMA_NAME, RelationConstants.TYPE_FIELD_NAME);
-       
+
                                        logger.debug("subjectDocType=" + subjectDocType + " objectDocType=" + objectDocType + " relationType=" + relationType);
 
                                        if (subjectDocType.equals(TaxonConstants.NUXEO_DOCTYPE) && objectDocType.equals(TaxonConstants.NUXEO_DOCTYPE) && relationType.equals(RelationConstants.BROADER_TYPE)) {
                                                String parentTaxonCsid = (String) doc.getProperty(RelationConstants.OBJECT_CSID_SCHEMA_NAME, RelationConstants.OBJECT_CSID_FIELD_NAME);
-                                               
+
                                                // Stash the parent taxon csid, so it can be retrieved in the documentRemoved handler.
                                                logger.debug("about to delete taxon hierarchy relation: parentTaxonCsid=" + parentTaxonCsid);
                                                context.setProperty(DELETED_RELATION_PARENT_CSID_PROPERTY_NAME, parentTaxonCsid);
@@ -281,26 +281,26 @@ public class UpdateAccessCodeListener extends AbstractCSEventListenerImpl {
                                }
                                else if (event.getName().equals(DocumentEventTypes.DOCUMENT_REMOVED)) {
                                        String parentTaxonCsid = (String) context.getProperty(DELETED_RELATION_PARENT_CSID_PROPERTY_NAME);
-                                       
+
                                        if (StringUtils.isNotEmpty(parentTaxonCsid)) {
                                                logger.debug("child removed, updating parent taxon: parentTaxonCsid=" + parentTaxonCsid);
 
-                                               try {                                                   
+                                               try {
                                                        InvocationResults results = createUpdater().updateAccessCode(parentTaxonCsid, false);
-                                                       
+
                                                        logger.debug("updateAccessCode complete: numAffected=" + results.getNumAffected() + " userNote=" + results.getUserNote());
                                                }
                                                catch (Exception e) {
                                                        logger.error(e.getMessage(), e);
-                                               }                                               
+                                               }
                                        }
                                }
                        }
                }
        }
-       
+
        private List<String> getTaxonNames(DocumentModel doc) {
-               List<Map<String, Object>> taxonomicIdentGroupList = (List<Map<String, Object>>) doc.getProperty(CollectionObjectBotGardenConstants.TAXON_SCHEMA_NAME, 
+               List<Map<String, Object>> taxonomicIdentGroupList = (List<Map<String, Object>>) doc.getProperty(CollectionObjectBotGardenConstants.TAXON_SCHEMA_NAME,
                                TAXONOMIC_IDENT_GROUP_LIST_FIELD_NAME);
                List<String> taxonNames = new ArrayList<String>();
 
@@ -318,29 +318,29 @@ public class UpdateAccessCodeListener extends AbstractCSEventListenerImpl {
        private Set<String> findDeletedTaxonNames(List<String> previousTaxonNames, List<String> currentTaxonNames) {
                Set<String> currentTaxonNameSet = new HashSet<String>(currentTaxonNames);
                Set<String> deletedTaxonNameSet = new HashSet<String>();
-               
+
                for (String previousTaxonName : previousTaxonNames) {
                        if (!currentTaxonNameSet.contains(previousTaxonName)) {
                                deletedTaxonNameSet.add(previousTaxonName);
                        }
                }
-               
+
                return deletedTaxonNameSet;
        }
-       
+
        private Set<String> findAddedTaxonNames(List<String> previousTaxonNames, List<String> currentTaxonNames) {
                Set<String> previousTaxonNameSet = new HashSet<String>(previousTaxonNames);
                Set<String> addedTaxonNameSet = new HashSet<String>();
-               
+
                for (String currentTaxonName : currentTaxonNames) {
                        if (!previousTaxonNameSet.contains(currentTaxonName)) {
                                addedTaxonNameSet.add(currentTaxonName);
                        }
                }
-               
+
                return addedTaxonNameSet;
        }
-       
+
        private UpdateAccessCodeBatchJob createUpdater() {
                ResourceMap resourceMap = ResteasyProviderFactory.getContextData(ResourceMap.class);
 
@@ -349,4 +349,4 @@ public class UpdateAccessCodeListener extends AbstractCSEventListenerImpl {
 
                return updater;
        }
-}
\ No newline at end of file
+}
index 58c61f25e5d03272de30dc2ca3f67acd1c13b0c8..b25bd7a33b31202d6e953073396a8090b08ee806 100644 (file)
@@ -1,7 +1,5 @@
 package org.collectionspace.services.listener.botgarden;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.collectionspace.services.batch.nuxeo.UpdateDeadFlagBatchJob;
 import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.collectionobject.nuxeo.CollectionObjectConstants;
@@ -17,11 +15,13 @@ import org.nuxeo.ecm.core.api.event.DocumentEventTypes;
 import org.nuxeo.ecm.core.event.Event;
 import org.nuxeo.ecm.core.event.EventContext;
 import org.nuxeo.ecm.core.event.impl.DocumentEventContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class UpdateDeadFlagListener extends AbstractCSEventListenerImpl {
-       final Log logger = LogFactory.getLog(UpdateDeadFlagListener.class);
+       final Logger logger = LoggerFactory.getLogger(UpdateDeadFlagListener.class);
 
-       /* 
+       /*
         * Set the dead flag and dead date on collectionobjects related to a new or modified movement record.
         */
        @Override
@@ -38,10 +38,10 @@ public class UpdateDeadFlagListener extends AbstractCSEventListenerImpl {
                                /*
                                 * Handle the case where a new movement is created with action code revive, and then related
                                 * to a collectionobject. The movement won't have any relations at the time it's created,
-                                * so we need to capture the creation of the relation. 
+                                * so we need to capture the creation of the relation.
                                 */
                                if (doc.getType().equals(RelationConstants.NUXEO_DOCTYPE) &&
-                                               !doc.isVersion() && 
+                                               !doc.isVersion() &&
                                                !doc.isProxy()) {
                                        String subjectDocType = (String) doc.getProperty(RelationConstants.SUBJECT_DOCTYPE_SCHEMA_NAME, RelationConstants.SUBJECT_DOCTYPE_FIELD_NAME);
                                        String objectDocType = (String) doc.getProperty(RelationConstants.OBJECT_DOCTYPE_SCHEMA_NAME, RelationConstants.OBJECT_DOCTYPE_FIELD_NAME);;
@@ -58,22 +58,22 @@ public class UpdateDeadFlagListener extends AbstractCSEventListenerImpl {
                                                        logger.debug("updateDeadFlag complete: numAffected=" + results.getNumAffected() + " userNote=" + results.getUserNote());
                                                } catch (Exception e) {
                                                        logger.error(e.getMessage(), e);
-                                               }                       
+                                               }
                                        }
                                }
                        }
                        else {
                                /*
-                                * Handle document modification. If the modified document was a movement record, and 
+                                * Handle document modification. If the modified document was a movement record, and
                                 * its action code is dead or revived, update the dead flag. We don't actually have to
                                 * check the action code here, since it will be checked inside UpdateDeadFlagBatchJob.updateRelatedDeadFlags,
                                 * but it is an optimization.
                                 */
                                if (doc.getType().startsWith(MovementConstants.NUXEO_DOCTYPE) &&
-                                               !doc.isVersion() && 
-                                               !doc.isProxy() && 
+                                               !doc.isVersion() &&
+                                               !doc.isProxy() &&
                                                !doc.getCurrentLifeCycleState().equals(WorkflowClient.WORKFLOWSTATE_DELETED)) {
-                                       String actionCode = (String) doc.getProperty(MovementBotGardenConstants.ACTION_CODE_SCHEMA_NAME, MovementBotGardenConstants.ACTION_CODE_FIELD_NAME);            
+                                       String actionCode = (String) doc.getProperty(MovementBotGardenConstants.ACTION_CODE_SCHEMA_NAME, MovementBotGardenConstants.ACTION_CODE_FIELD_NAME);
 
                                        logger.debug("actionCode=" + actionCode);
 
@@ -101,4 +101,4 @@ public class UpdateDeadFlagListener extends AbstractCSEventListenerImpl {
 
                return updater;
        }
-}
\ No newline at end of file
+}
index 49e2f3aca48645a9fe4e345e65bb16af0ec440e2..b537c6a901418a7e81847306b15b8b46deab6e05 100644 (file)
@@ -1,7 +1,5 @@
 package org.collectionspace.services.listener.botgarden;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.movement.nuxeo.MovementBotGardenConstants;
 import org.collectionspace.services.movement.nuxeo.MovementConstants;
@@ -12,14 +10,16 @@ import org.nuxeo.ecm.core.api.event.DocumentEventTypes;
 import org.nuxeo.ecm.core.event.Event;
 import org.nuxeo.ecm.core.event.EventContext;
 import org.nuxeo.ecm.core.event.impl.DocumentEventContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class UpdateLocationListener extends AbstractCSEventListenerImpl {
-       final Log logger = LogFactory.getLog(UpdateLocationListener.class);
+       final Logger logger = LoggerFactory.getLogger(UpdateLocationListener.class);
 
-       /* 
+       /*
         * Set the currentLocation and previousLocation fields in a Current Location record
         * to appropriate values.
-        * 
+        *
         * <ul>
         * <li>If the plant is dead, set currentLocation to none</li>
         * <li>Set the previousLocation field to the previous value of the currentLocation field</li>
@@ -33,11 +33,11 @@ public class UpdateLocationListener extends AbstractCSEventListenerImpl {
                        DocumentEventContext context = (DocumentEventContext) ec;
                        DocumentModel doc = context.getSourceDocument();
 
-                       if (doc.getType().startsWith(MovementConstants.NUXEO_DOCTYPE) && 
-                                       !doc.isVersion() && 
-                                       !doc.isProxy() && 
+                       if (doc.getType().startsWith(MovementConstants.NUXEO_DOCTYPE) &&
+                                       !doc.isVersion() &&
+                                       !doc.isProxy() &&
                                        !doc.getCurrentLifeCycleState().equals(WorkflowClient.WORKFLOWSTATE_DELETED)) {
-                               String actionCode = (String) doc.getProperty(MovementBotGardenConstants.ACTION_CODE_SCHEMA_NAME, 
+                               String actionCode = (String) doc.getProperty(MovementBotGardenConstants.ACTION_CODE_SCHEMA_NAME,
                                                MovementBotGardenConstants.ACTION_CODE_FIELD_NAME);
 
                                logger.debug("actionCode=" + actionCode);
@@ -46,7 +46,7 @@ public class UpdateLocationListener extends AbstractCSEventListenerImpl {
                                        /*
                                         * Special case for a document that is created with an action code of dead.
                                         * In this case, we'll set the currentLocation to none, and the previousLocation to
-                                        * the current value of currentLocation, since there isn't a previous value. To do 
+                                        * the current value of currentLocation, since there isn't a previous value. To do
                                         * this, we can simply save the document, which will cause the beforeDocumentModification
                                         * event to fire, taking us into the other branch of this code, with the current document
                                         * becoming the previous document.
@@ -61,12 +61,12 @@ public class UpdateLocationListener extends AbstractCSEventListenerImpl {
                                                ec.setProperty(CreateVersionListener.SKIP_PROPERTY, true);
                                        }
                                }
-                               else {                  
+                               else {
                                        if (actionCode != null && actionCode.equals(MovementBotGardenConstants.DEAD_ACTION_CODE)) {
                                                doc.setProperty(MovementConstants.CURRENT_LOCATION_SCHEMA_NAME, MovementConstants.CURRENT_LOCATION_FIELD_NAME, MovementConstants.NONE_LOCATION);
                                        }
 
-                                       DocumentModel previousDoc = (DocumentModel) context.getProperty(CoreEventConstants.PREVIOUS_DOCUMENT_MODEL);                    
+                                       DocumentModel previousDoc = (DocumentModel) context.getProperty(CoreEventConstants.PREVIOUS_DOCUMENT_MODEL);
                                        String previousLocation = (String) previousDoc.getProperty(MovementConstants.CURRENT_LOCATION_SCHEMA_NAME, MovementConstants.CURRENT_LOCATION_FIELD_NAME);
 
                                        logger.debug("previousLocation=" + previousLocation);
@@ -76,4 +76,4 @@ public class UpdateLocationListener extends AbstractCSEventListenerImpl {
                        }
                }
        }
-}
\ No newline at end of file
+}
index 1f04c532041923213525383f00d2149f93c3a1f1..6a342b80295f8715f62f204124909c5101da72b9 100644 (file)
@@ -3,8 +3,6 @@ package org.collectionspace.services.listener.botgarden;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.collectionspace.services.batch.nuxeo.UpdateRareFlagBatchJob;
 import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.collectionobject.nuxeo.CollectionObjectBotGardenConstants;
@@ -21,21 +19,23 @@ import org.nuxeo.ecm.core.api.event.DocumentEventTypes;
 import org.nuxeo.ecm.core.event.Event;
 import org.nuxeo.ecm.core.event.EventContext;
 import org.nuxeo.ecm.core.event.impl.DocumentEventContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A listener that updates the rare flag on collectionobjects when collectionobjects
  * are created or modified, and when taxon records are modified.
- * 
+ *
  * @see org.collectionspace.services.batch.nuxeo.UpdateRareFlagBatchJob
  * @author ray
  *
  */
 public class UpdateRareFlagListener extends AbstractCSEventListenerImpl {
-       final Log logger = LogFactory.getLog(UpdateRareFlagListener.class);
+       final Logger logger = LoggerFactory.getLogger(UpdateRareFlagListener.class);
 
        public static final String PREVIOUS_TAXON_PROPERTY_NAME = "UpdateRareFlagListener.previousTaxon";
        public static final String PREVIOUS_HAS_RARE_CONSERVATION_CATEGORY_PROPERTY_NAME = "UpdateRareFlagListener.previousHasRareConservationCategory";
-       
+
        private static final String[] CONSERVATION_CATEGORY_PATH_ELEMENTS = TaxonBotGardenConstants.CONSERVATION_CATEGORY_FIELD_NAME.split("/");
        private static final String PLANT_ATTRIBUTES_GROUP_LIST_FIELD_NAME = CONSERVATION_CATEGORY_PATH_ELEMENTS[0];
        private static final String CONSERVATION_CATEGORY_FIELD_NAME = CONSERVATION_CATEGORY_PATH_ELEMENTS[2];
@@ -51,58 +51,58 @@ public class UpdateRareFlagListener extends AbstractCSEventListenerImpl {
                        logger.debug("docType=" + doc.getType());
 
                        if (doc.getType().startsWith(CollectionObjectConstants.NUXEO_DOCTYPE) &&
-                                       !doc.isVersion() && 
-                                       !doc.isProxy() && 
+                                       !doc.isVersion() &&
+                                       !doc.isProxy() &&
                                        !doc.getCurrentLifeCycleState().equals(WorkflowClient.WORKFLOWSTATE_DELETED)) {
-                               
+
                                if (event.getName().equals(DocumentEventTypes.BEFORE_DOC_UPDATE)) {
                                        // Stash the previous primary taxonomic ident, so it can be retrieved in the documentModified handler.
-                                       
+
                                        DocumentModel previousDoc = (DocumentModel) context.getProperty(CoreEventConstants.PREVIOUS_DOCUMENT_MODEL);
-                                       String previousTaxon = (String) previousDoc.getProperty(CollectionObjectBotGardenConstants.TAXON_SCHEMA_NAME, 
+                                       String previousTaxon = (String) previousDoc.getProperty(CollectionObjectBotGardenConstants.TAXON_SCHEMA_NAME,
                                                        CollectionObjectBotGardenConstants.PRIMARY_TAXON_FIELD_NAME);
 
                                        context.setProperty(PREVIOUS_TAXON_PROPERTY_NAME, previousTaxon);
                                }
                                else {
                                        boolean updateRequired = false;
-                                       
+
                                        if (event.getName().equals(DocumentEventTypes.DOCUMENT_UPDATED)) {
                                                // A collectionobject was modified. As an optimization, check if the primary taxonomic determination
                                                // of the collectionobject has changed. We only need to update the rare flag if it has.
 
                                                String previousTaxon = (String) context.getProperty(PREVIOUS_TAXON_PROPERTY_NAME);
-                                               String currentTaxon = (String) doc.getProperty(CollectionObjectBotGardenConstants.TAXON_SCHEMA_NAME, 
+                                               String currentTaxon = (String) doc.getProperty(CollectionObjectBotGardenConstants.TAXON_SCHEMA_NAME,
                                                                CollectionObjectBotGardenConstants.PRIMARY_TAXON_FIELD_NAME);
-                                               
+
                                                if (previousTaxon == null) {
                                                        previousTaxon = "";
                                                }
-                                               
+
                                                if (currentTaxon == null) {
                                                        currentTaxon = "";
                                                }
-                                               
+
                                                if (previousTaxon.equals(currentTaxon)) {
                                                        logger.debug("update not required: previousTaxon=" + previousTaxon + " currentTaxon=" + currentTaxon);
                                                }
                                                else {
                                                        logger.debug("update required: previousTaxon=" + previousTaxon + " currentTaxon=" + currentTaxon);
                                                        updateRequired = true;
-                                               }                                       
+                                               }
                                        }
                                        else if (event.getName().equals(DocumentEventTypes.DOCUMENT_CREATED)) {
                                                // A collectionobject was created. Always update the rare flag.
-                                               
+
                                                updateRequired = true;
                                        }
-                                       
+
                                        if (updateRequired) {
                                                String collectionObjectCsid = doc.getName();
-                       
+
                                                try {
                                                        InvocationResults results = createUpdater().updateRareFlag(collectionObjectCsid);
-                       
+
                                                        logger.debug("updateRareFlag complete: numAffected=" + results.getNumAffected() + " userNote=" + results.getUserNote());
                                                } catch (Exception e) {
                                                        logger.error(e.getMessage(), e);
@@ -111,21 +111,21 @@ public class UpdateRareFlagListener extends AbstractCSEventListenerImpl {
                                }
                        }
                        else if (doc.getType().startsWith(TaxonConstants.NUXEO_DOCTYPE) &&
-                                       !doc.isVersion() && 
-                                       !doc.isProxy() && 
+                                       !doc.isVersion() &&
+                                       !doc.isProxy() &&
                                        !doc.getCurrentLifeCycleState().equals(WorkflowClient.WORKFLOWSTATE_DELETED)) {
-                               
+
                                if (event.getName().equals(DocumentEventTypes.BEFORE_DOC_UPDATE)) {
                                        // Stash whether there was previously a non-empty conservation category, so it can be retrieved in the documentModified handler.
-                                       
+
                                        DocumentModel previousDoc = (DocumentModel) context.getProperty(CoreEventConstants.PREVIOUS_DOCUMENT_MODEL);
                                        boolean previousHasRareConservationCategory = hasRareConservationCategory(previousDoc);
-                                       
+
                                        context.setProperty(PREVIOUS_HAS_RARE_CONSERVATION_CATEGORY_PROPERTY_NAME, new Boolean(previousHasRareConservationCategory));
                                }
                                else {
                                        boolean updateRequired = false;
-                                       
+
                                        if (event.getName().equals(DocumentEventTypes.DOCUMENT_UPDATED)) {
                                                // A taxon record was modified. As an optimization, check if there is now a rare
                                                // conservation category when there wasn't before, or vice versa. We only need to update
@@ -135,7 +135,7 @@ public class UpdateRareFlagListener extends AbstractCSEventListenerImpl {
                                                boolean currentHasRareConservationCategory = hasRareConservationCategory(doc);
 
                                                if (previousHasRareConservationCategory == currentHasRareConservationCategory) {
-                                                       logger.debug("update not required: previousHasRareConservationCategory=" + previousHasRareConservationCategory + 
+                                                       logger.debug("update not required: previousHasRareConservationCategory=" + previousHasRareConservationCategory +
                                                                        " currentHasRareConservationCategory=" + currentHasRareConservationCategory);
                                                }
                                                else {
@@ -147,10 +147,10 @@ public class UpdateRareFlagListener extends AbstractCSEventListenerImpl {
 
                                        if (updateRequired) {
                                                String taxonCsid = doc.getName();
-               
+
                                                try {
                                                        InvocationResults results = createUpdater().updateReferencingRareFlags(taxonCsid);
-               
+
                                                        logger.debug("updateReferencingRareFlags complete: numAffected=" + results.getNumAffected() + " userNote=" + results.getUserNote());
                                                } catch (Exception e) {
                                                        logger.error(e.getMessage(), e);
@@ -160,7 +160,7 @@ public class UpdateRareFlagListener extends AbstractCSEventListenerImpl {
                        }
                }
        }
-       
+
        private boolean hasRareConservationCategory(DocumentModel doc) {
                List<Map<String, Object>> plantAttributesGroupList = (List<Map<String, Object>>) doc.getProperty(TaxonBotGardenConstants.CONSERVATION_CATEGORY_SCHEMA_NAME,
                                PLANT_ATTRIBUTES_GROUP_LIST_FIELD_NAME);
@@ -171,12 +171,12 @@ public class UpdateRareFlagListener extends AbstractCSEventListenerImpl {
                if (plantAttributesGroupList.size() > 0) {
                        Map<String, Object> plantAttributesGroup = plantAttributesGroupList.get(0);
                        String conservationCategory = (String) plantAttributesGroup.get(CONSERVATION_CATEGORY_FIELD_NAME);
-                       
+
                        if (UpdateRareFlagBatchJob.isRare(conservationCategory)) {
                                hasRareConservationCategory = true;
                        }
                }
-               
+
 //             for (Map<String, Object> plantAttributesGroup : plantAttributesGroupList) {
 //                     String conservationCategory = (String) plantAttributesGroup.get(CONSERVATION_CATEGORY_FIELD_NAME);
 //
@@ -185,7 +185,7 @@ public class UpdateRareFlagListener extends AbstractCSEventListenerImpl {
 //                             break;
 //                     }
 //             }
-               
+
                return hasRareConservationCategory;
        }
 
@@ -197,4 +197,4 @@ public class UpdateRareFlagListener extends AbstractCSEventListenerImpl {
 
                return updater;
        }
-}
\ No newline at end of file
+}
index 1952efc321e6e4969b7d2f5cafcc7ce4a86c0545..c9656ea9f2c25a9787b0b1c4f47fd0ddecd405c6 100644 (file)
@@ -1,7 +1,5 @@
 package org.collectionspace.services.listener.botgarden;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.jboss.resteasy.spi.ResteasyProviderFactory;
 
 import org.collectionspace.services.batch.nuxeo.FormatVoucherNameBatchJob;
@@ -16,11 +14,13 @@ import org.nuxeo.ecm.core.api.event.DocumentEventTypes;
 import org.nuxeo.ecm.core.event.Event;
 import org.nuxeo.ecm.core.event.EventContext;
 import org.nuxeo.ecm.core.event.impl.DocumentEventContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class UpdateStyledNameListener extends AbstractCSEventListenerImpl {
        public static final String RUN_AFTER_MODIFIED_PROPERTY = "UpdateStyledNameListener.RUN_AFTER_MODIFIED";
 
-       final Log logger = LogFactory.getLog(UpdateStyledNameListener.class);
+       final Logger logger = LoggerFactory.getLogger(UpdateStyledNameListener.class);
 
        @Override
        public void handleEvent(Event event) {
@@ -31,23 +31,23 @@ public class UpdateStyledNameListener extends AbstractCSEventListenerImpl {
                        DocumentModel doc = context.getSourceDocument();
 
                        logger.debug("docType=" + doc.getType());
-                       
-                       if (doc.getType().startsWith(LoanoutConstants.NUXEO_DOCTYPE) && 
-                                       !doc.isVersion() && 
-                                       !doc.isProxy() && 
+
+                       if (doc.getType().startsWith(LoanoutConstants.NUXEO_DOCTYPE) &&
+                                       !doc.isVersion() &&
+                                       !doc.isProxy() &&
                                        !doc.getCurrentLifeCycleState().equals(WorkflowClient.WORKFLOWSTATE_DELETED)) {
-                               
+
                                if (event.getName().equals(DocumentEventTypes.BEFORE_DOC_UPDATE)) {
-                                       DocumentModel previousDoc = (DocumentModel) context.getProperty(CoreEventConstants.PREVIOUS_DOCUMENT_MODEL);                    
-       
+                                       DocumentModel previousDoc = (DocumentModel) context.getProperty(CoreEventConstants.PREVIOUS_DOCUMENT_MODEL);
+
                                        String previousLabelRequested = (String) previousDoc.getProperty(LoanoutBotGardenConstants.LABEL_REQUESTED_SCHEMA_NAME,
                                                        LoanoutBotGardenConstants.LABEL_REQUESTED_FIELD_NAME);
                                        String labelRequested = (String) doc.getProperty(LoanoutBotGardenConstants.LABEL_REQUESTED_SCHEMA_NAME,
                                                        LoanoutBotGardenConstants.LABEL_REQUESTED_FIELD_NAME);
-                                       
+
                                        logger.debug("previousLabelRequested=" + previousLabelRequested + " labelRequested=" + labelRequested);
-                                       
-                                       if ((previousLabelRequested == null || previousLabelRequested.equals(LoanoutBotGardenConstants.LABEL_REQUESTED_NO_VALUE)) && 
+
+                                       if ((previousLabelRequested == null || previousLabelRequested.equals(LoanoutBotGardenConstants.LABEL_REQUESTED_NO_VALUE)) &&
                                                        labelRequested.equals(LoanoutBotGardenConstants.LABEL_REQUESTED_YES_VALUE)) {
                                                // The label request is changing from no to yes, so we should update the styled name.
                                                ec.setProperty(RUN_AFTER_MODIFIED_PROPERTY, true);
@@ -55,21 +55,21 @@ public class UpdateStyledNameListener extends AbstractCSEventListenerImpl {
                                }
                                else {
                                        boolean doUpdate = false;
-                                       
+
                                        if (event.getName().equals(DocumentEventTypes.DOCUMENT_CREATED)) {
-                                               String labelRequested = (String) doc.getProperty(LoanoutBotGardenConstants.LABEL_REQUESTED_SCHEMA_NAME, 
+                                               String labelRequested = (String) doc.getProperty(LoanoutBotGardenConstants.LABEL_REQUESTED_SCHEMA_NAME,
                                                                LoanoutBotGardenConstants.LABEL_REQUESTED_FIELD_NAME);
-                                               
+
                                                doUpdate = (labelRequested != null && labelRequested.equals(LoanoutBotGardenConstants.LABEL_REQUESTED_YES_VALUE));
                                        } else {
                                                doUpdate = ec.hasProperty(RUN_AFTER_MODIFIED_PROPERTY) && ((Boolean) ec.getProperty(RUN_AFTER_MODIFIED_PROPERTY));
                                        }
-                                       
+
                                        if (doUpdate) {
                                                logger.debug("Updating styled name");
-       
+
                                                String voucherCsid = doc.getName();
-                                               
+
                                                try {
                                                        createFormatter().formatVoucherName(voucherCsid);
                                                } catch (Exception e) {
@@ -80,7 +80,7 @@ public class UpdateStyledNameListener extends AbstractCSEventListenerImpl {
                        }
                }
        }
-       
+
        private FormatVoucherNameBatchJob createFormatter() {
                ResourceMap resourceMap = ResteasyProviderFactory.getContextData(ResourceMap.class);
 
@@ -89,4 +89,4 @@ public class UpdateStyledNameListener extends AbstractCSEventListenerImpl {
 
                return formatter;
        }
-}
\ No newline at end of file
+}
index d2399e978cf648c39d3fb62d55ab7a05f34a2f15..e441c1940b92aae4615c0e39c98ec589fd35f6f8 100644 (file)
@@ -20,7 +20,6 @@
         <dependency>
             <groupId>org.nuxeo.ecm.core</groupId>
             <artifactId>nuxeo-core-storage-sql</artifactId>
-            <version>${nuxeo.core.version}</version>
         </dependency>
            <dependency>
              <groupId>org.nuxeo.ecm.platform</groupId>
index fcf6a4a69252c64e584461c6ea1a92e90910071f..d2ddc19404a85633a004d8adfe58b82669ebd278 100644 (file)
@@ -5,8 +5,6 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.common.api.RefName;
 import org.collectionspace.services.common.api.TaxonFormatter;
@@ -19,6 +17,8 @@ import org.nuxeo.ecm.core.api.event.DocumentEventTypes;
 import org.nuxeo.ecm.core.event.Event;
 import org.nuxeo.ecm.core.event.EventContext;
 import org.nuxeo.ecm.core.event.impl.DocumentEventContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class UpdateFormattedDisplayNameListener extends AbstractCSEventListenerImpl {
        public static final String RUN_AFTER_MODIFIED_PROPERTY = "UpdateFormattedDisplayNameListener.RUN_AFTER_MODIFIED";
@@ -26,12 +26,12 @@ public class UpdateFormattedDisplayNameListener extends AbstractCSEventListenerI
        private static final String[] DISPLAY_NAME_PATH_ELEMENTS = TaxonConstants.DISPLAY_NAME_FIELD_NAME.split("/");
        private static final String TERM_GROUP_LIST_FIELD_NAME = DISPLAY_NAME_PATH_ELEMENTS[0];
        private static final String DISPLAY_NAME_FIELD_NAME = DISPLAY_NAME_PATH_ELEMENTS[2];
-       
+
        private static final String[] FORMATTED_DISPLAY_NAME_PATH_ELEMENTS = TaxonConstants.FORMATTED_DISPLAY_NAME_FIELD_NAME.split("/");
        private static final String FORMATTED_DISPLAY_NAME_FIELD_NAME = FORMATTED_DISPLAY_NAME_PATH_ELEMENTS[2];
 
-       final Log logger = LogFactory.getLog(UpdateFormattedDisplayNameListener.class);
-       
+       final Logger logger = LoggerFactory.getLogger(UpdateFormattedDisplayNameListener.class);
+
        @Override
        public void handleEvent(Event event) {
                EventContext ec = event.getContext();
@@ -41,33 +41,33 @@ public class UpdateFormattedDisplayNameListener extends AbstractCSEventListenerI
                        DocumentModel doc = context.getSourceDocument();
 
                        logger.debug("docType=" + doc.getType());
-                       
-                       if (doc.getType().startsWith(TaxonConstants.NUXEO_DOCTYPE) && 
-                                       !doc.isVersion() && 
-                                       !doc.isProxy() && 
+
+                       if (doc.getType().startsWith(TaxonConstants.NUXEO_DOCTYPE) &&
+                                       !doc.isVersion() &&
+                                       !doc.isProxy() &&
                                        !doc.getCurrentLifeCycleState().equals(WorkflowClient.WORKFLOWSTATE_DELETED)) {
-                               
+
                                String refName = (String) doc.getProperty(TaxonConstants.REFNAME_SCHEMA_NAME, TaxonConstants.REFNAME_FIELD_NAME);
                                RefName.AuthorityItem item = RefName.AuthorityItem.parse(refName);
                                String parentShortId = item.getParentShortIdentifier();
-                               
+
                                logger.debug("parentShortId=" + parentShortId);
-                               
+
                                if (!parentShortId.equals(TaxonBotGardenConstants.COMMON_VOCABULARY_SHORTID)) {
                                        if (event.getName().equals(DocumentEventTypes.DOCUMENT_CREATED)) {
                                                // Save the document, to get the BEFORE_DOC_UPDATE branch to run.
                                                doc.getCoreSession().saveDocument(doc);
                                        }
                                        else if (event.getName().equals(DocumentEventTypes.BEFORE_DOC_UPDATE)) {
-                                               DocumentModel previousDoc = (DocumentModel) context.getProperty(CoreEventConstants.PREVIOUS_DOCUMENT_MODEL);                    
-       
+                                               DocumentModel previousDoc = (DocumentModel) context.getProperty(CoreEventConstants.PREVIOUS_DOCUMENT_MODEL);
+
                                                updateFormattedDisplayNames(doc, previousDoc);
                                        }
                                }
                        }
                }
        }
-       
+
        private void updateFormattedDisplayNames(DocumentModel doc, DocumentModel previousDoc) {
                //Set<String> previousDisplayNames = getDisplayNames(previousDoc);
                TaxonFormatter formatter = new TaxonFormatter();
@@ -76,24 +76,24 @@ public class UpdateFormattedDisplayNameListener extends AbstractCSEventListenerI
                for (Map<String, Object> termGroup : termGroupList) {
                        String displayName = (String) termGroup.get(DISPLAY_NAME_FIELD_NAME);
                        String formattedDisplayName = (String) termGroup.get(FORMATTED_DISPLAY_NAME_FIELD_NAME);
-                       
+
                        if (StringUtils.isBlank(formattedDisplayName)) {
                                formattedDisplayName = "";
-                               
+
                                if (StringUtils.isNotBlank(displayName)) {
                                        formattedDisplayName = formatter.format(displayName);
                                }
-       
+
                                termGroup.put(FORMATTED_DISPLAY_NAME_FIELD_NAME, formattedDisplayName);
                        }
                }
-               
+
                Map<String, Object> updateMap = new HashMap<String, Object>();
                updateMap.put(TERM_GROUP_LIST_FIELD_NAME, termGroupList);
-               
+
                doc.setProperties(TaxonConstants.DISPLAY_NAME_SCHEMA_NAME, updateMap);
        }
-       
+
        /*
        private Set<String> getDisplayNames(DocumentModel doc) throws ClientException {
                Set<String> displayNames = new HashSet<String>();
@@ -101,13 +101,13 @@ public class UpdateFormattedDisplayNameListener extends AbstractCSEventListenerI
 
                for (Map<String, Object> termGroup : termGroupList) {
                        String displayName = (String) termGroup.get(DISPLAY_NAME_FIELD_NAME);
-                       
+
                        if (displayName != null) {
                                displayNames.add(displayName);
                        }
                }
-               
+
                return displayNames;
        }
        */
-}
\ No newline at end of file
+}
index 125bba755072c0711f72111bc33be6e6f1295436..ef2bea300911a4670d60134a02688a5afa83c091 100644 (file)
@@ -30,7 +30,6 @@
         <dependency>
             <groupId>org.nuxeo.ecm.core</groupId>
             <artifactId>nuxeo-core-storage-sql</artifactId>
-            <version>${nuxeo.core.version}</version>
         </dependency>
         <dependency>
             <groupId>org.nuxeo.ecm.platform</groupId>
index 2d2164e126c84aafa6dbe58bde7429287bdeafad..e04a6361523f7654d11a5738b0f471540d71f5ce 100644 (file)
@@ -2,8 +2,6 @@ package org.collectionspace.services.listener;
 
 import java.io.Serializable;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.collectionspace.services.common.api.CommonAPI;
 import org.collectionspace.services.nuxeo.client.java.CoreSessionInterface;
 import org.collectionspace.services.nuxeo.client.java.CoreSessionWrapper;
@@ -19,6 +17,8 @@ import org.nuxeo.ecm.core.event.EventContext;
 import org.nuxeo.ecm.core.event.impl.DocumentEventContext;
 //import org.nuxeo.ecm.platform.picture.api.ImagingDocumentConstants;
 import org.nuxeo.ecm.platform.picture.api.ImagingDocumentConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class UpdateImageDerivatives extends AbstractCSEventListenerImpl {
 
@@ -27,9 +27,7 @@ public class UpdateImageDerivatives extends AbstractCSEventListenerImpl {
        //              CoreSessionInterface coreSession = new
        //              CoreSessionWrapper(docEventContext.getCoreSession());
 
-       // FIXME: We might experiment here with using log4j instead of Apache
-       // Commons Logging; am using the latter to follow Ray's pattern for now
-       private final static Log logger = LogFactory.getLog(UpdateImageDerivatives.class);
+       private final static Logger logger = LoggerFactory.getLogger(UpdateImageDerivatives.class);
 
        @Override
        public void handleEvent(Event event) {
@@ -74,7 +72,7 @@ public class UpdateImageDerivatives extends AbstractCSEventListenerImpl {
                // just disassociates the blob content (aka, the original image) from the document.
                //
                docModel.setPropertyValue("file:content", (Serializable) null);
-               
+
                //
                // Removing this facet ensures the original derivatives are unchanged when
                // we call the save method.  If we didn't remove the face, then all the
@@ -88,12 +86,12 @@ public class UpdateImageDerivatives extends AbstractCSEventListenerImpl {
                // Nuxeo will still tread this document as a Picture document.
                //
                NuxeoUtils.addFacet(docModel, ImagingDocumentConstants.PICTURE_FACET);
-               
+
                //
                // Finally, we need to remove the actual blob/image bits that are store on disk.
                //
                DocumentBlobHolder docBlobHolder = (DocumentBlobHolder) docModel.getAdapter(BlobHolder.class);
-               Blob blob = docBlobHolder.getBlob();            
+               Blob blob = docBlobHolder.getBlob();
                if (blob == null) {
                        logger.error(String.format("Could not get blob for original image. Trying to delete original for: '%s'",
                                                        docModel.getTitle()));
@@ -102,12 +100,12 @@ public class UpdateImageDerivatives extends AbstractCSEventListenerImpl {
                        logger.debug(String.format("Started thread '%s' to delete file of blob '%s'.",
                                        thread.getId(), blob.getFilename()));
                }
-               
+
                if (logger.isTraceEnabled()) {
-                       logger.trace(String.format("Exiting handleEvent in '%s'.", getClass().getName()));                      
-               }       
+                       logger.trace(String.format("Exiting handleEvent in '%s'.", getClass().getName()));
+               }
        }
-       
+
        private boolean shouldProcessEvent(Event event) {
                boolean result = false;
 
@@ -121,4 +119,4 @@ public class UpdateImageDerivatives extends AbstractCSEventListenerImpl {
                return result;
        }
 
-}
\ No newline at end of file
+}
index 2cb7f22dfea3b2de7cc2cf940530b7bf1e6472ca..1d60b06ca6b9dadefb4a4aea4a70425573254b84 100644 (file)
@@ -5,9 +5,6 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.collectionspace.services.client.LocationAuthorityClient;
 import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.collectionobject.nuxeo.CollectionObjectConstants;
@@ -27,12 +24,11 @@ import org.nuxeo.ecm.core.api.event.DocumentEventTypes;
 import org.nuxeo.ecm.core.api.impl.DocumentModelListImpl;
 import org.nuxeo.ecm.core.event.Event;
 import org.nuxeo.ecm.core.event.impl.DocumentEventContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public abstract class AbstractUpdateObjectLocationValues extends AbstractCSEventListenerImpl {
-
-    // FIXME: We might experiment here with using log4j instead of Apache Commons Logging;
-    // am using the latter to follow Ray's pattern for now
-    private final static Log logger = LogFactory.getLog(AbstractUpdateObjectLocationValues.class);
+    private final static Logger logger = LoggerFactory.getLogger(AbstractUpdateObjectLocationValues.class);
 
     // FIXME: Make the following message, or its equivalent, a constant usable by all event listeners
     private final static String NO_FURTHER_PROCESSING_MESSAGE =
@@ -332,7 +328,7 @@ public abstract class AbstractUpdateObjectLocationValues extends AbstractCSEvent
                try {
                        relationDocModels = coreSession.query(query);
                } catch (DocumentException e) {
-                       logger.error(e);
+                       logger.error(e.getMessage());
                }
 
         if (relationDocModels == null || relationDocModels.isEmpty()) {
@@ -529,7 +525,7 @@ public abstract class AbstractUpdateObjectLocationValues extends AbstractCSEvent
                try {
                        relationDocModels = session.query(query);
                } catch (DocumentException e) {
-                       logger.error(e);
+                       logger.error(e.getMessage());
                        return null;
                }
 
index cd593de6425bff88d9eddb2a00d14b2fbd23812d..03e70861939be68261eae57d8dd8ed979cc4af62 100644 (file)
@@ -1,18 +1,15 @@
 package org.collectionspace.services.listener;
 
 import java.io.Serializable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.collectionspace.services.common.api.RefNameUtils;
 import org.collectionspace.services.common.api.Tools;
 import org.nuxeo.ecm.core.api.ClientException;
 import org.nuxeo.ecm.core.api.DocumentModel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class UpdateObjectLocationAndCrateOnMove extends UpdateObjectLocationOnMove {
-
-    // FIXME: We might experiment here with using log4j instead of Apache Commons Logging;
-    // am using the latter to follow Ray's pattern for now
-    private final Log logger = LogFactory.getLog(UpdateObjectLocationAndCrateOnMove.class);
+    private final Logger logger = LoggerFactory.getLogger(UpdateObjectLocationAndCrateOnMove.class);
     // FIXME: Get values below from external constants
     private final static String COLLECTIONOBJECTS_ANTHROPOLOGY_SCHEMA = "collectionobjects_anthropology";
     private final static String MOVEMENTS_ANTHROPOLOGY_SCHEMA = "movements_anthropology";
@@ -25,14 +22,14 @@ public class UpdateObjectLocationAndCrateOnMove extends UpdateObjectLocationOnMo
             String mostRecentLocation) throws ClientException {
         boolean flag = super.updateCollectionObjectLocation(collectionObjectDocModel, movementDocModel, mostRecentLocation);
         collectionObjectDocModel = updateComputedCrateValue(collectionObjectDocModel, movementDocModel);
-        
+
         return flag;
     }
 
     private DocumentModel updateComputedCrateValue(DocumentModel collectionObjectDocModel,
             DocumentModel movementDocModel)
             throws ClientException {
-        
+
         // Get the current crate value from the Movement (the "new" value)
         String crateRefName =
                 (String) movementDocModel.getProperty(MOVEMENTS_ANTHROPOLOGY_SCHEMA, CRATE_PROPERTY);
@@ -84,7 +81,7 @@ public class UpdateObjectLocationAndCrateOnMove extends UpdateObjectLocationOnMo
                 logger.trace("crate refName does NOT require updating.");
             }
         }
-        
+
         return collectionObjectDocModel;
     }
-}
\ No newline at end of file
+}
index 819197a65316ed6809ebc9792e448b5d1591eb43..6004819270287ae57d8ce788d8d2f5349756767a 100644 (file)
@@ -1,17 +1,14 @@
 package org.collectionspace.services.listener;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.collectionspace.services.common.api.RefNameUtils;
 import org.collectionspace.services.common.api.Tools;
 import org.nuxeo.ecm.core.api.ClientException;
 import org.nuxeo.ecm.core.api.DocumentModel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class UpdateObjectLocationOnMove extends AbstractUpdateObjectLocationValues {
-
-    // FIXME: We might experiment here with using log4j instead of Apache Commons Logging;
-    // am using the latter to follow Ray's pattern for now
-    private final Log logger = LogFactory.getLog(UpdateObjectLocationOnMove.class);
+    private final Logger logger = LoggerFactory.getLogger(UpdateObjectLocationOnMove.class);
 
     @Override
     protected boolean updateCollectionObjectLocation(DocumentModel collectionObjectDocModel,
@@ -31,7 +28,7 @@ public class UpdateObjectLocationOnMove extends AbstractUpdateObjectLocationValu
                        movementRecordsLocation));
             return result;
         }
-        
+
         // Get the computed current location value of the CollectionObject.
         String existingComputedCurrentLocation = (String) collectionObjectDocModel.getProperty(COLLECTIONOBJECTS_COMMON_SCHEMA,
                 COMPUTED_CURRENT_LOCATION_PROPERTY);
@@ -42,7 +39,7 @@ public class UpdateObjectLocationOnMove extends AbstractUpdateObjectLocationValu
                        COMPUTED_CURRENT_LOCATION_PROPERTY, movementRecordsLocation);
             result = true; // We've updated the location field.
         }
-        
+
         return result;
     }
-}
\ No newline at end of file
+}
index dbf63645ed64d04e2f1c2f9cb71ac9851ddd9e7f..bc54278a2672e3c2417a328bee07258437eadf28 100644 (file)
@@ -4,8 +4,6 @@ import java.util.ArrayList;
 import java.util.IllegalFormatException;
 import java.util.List;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.collectionspace.services.client.workflow.WorkflowClient;
 import org.collectionspace.services.common.document.DocumentException;
 import org.collectionspace.services.nuxeo.client.java.CoreSessionInterface;
@@ -17,13 +15,12 @@ import org.nuxeo.ecm.core.api.impl.LifeCycleFilter;
 import org.nuxeo.ecm.core.event.Event;
 import org.nuxeo.ecm.core.event.EventContext;
 import org.nuxeo.ecm.core.event.impl.DocumentEventContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class UpdateRelationsOnDelete extends AbstractCSEventListenerImpl {
+    final Logger logger = LoggerFactory.getLogger(UpdateRelationsOnDelete.class);
 
-    // FIXME: We might experiment here with using log4j instead of Apache Commons Logging;
-    // am using the latter to follow Ray's pattern for now
-    final Log logger = LogFactory.getLog(UpdateRelationsOnDelete.class);
-    
     // FIXME: Get these constant values from external sources rather than redeclaring here
     final static String RELATION_DOCTYPE = "Relation";
     final static String RELATIONS_COMMON_SUBJECT_CSID_FIELD = "relations_common:subjectCsid";
@@ -32,29 +29,29 @@ public class UpdateRelationsOnDelete extends AbstractCSEventListenerImpl {
     @Override
     public void handleEvent(Event event) {
         logger.trace("In handleEvent in UpdateRelationsOnDelete ...");
-        
+
         EventContext eventContext = event.getContext();
 
         if (isRegistered(event) && isDocumentSoftDeletedEvent(eventContext)) {
-            
+
             logger.trace("A soft deletion event was received by UpdateRelationsOnDelete ...");
-            
+
             DocumentEventContext docContext = (DocumentEventContext) eventContext;
             DocumentModel docModel = docContext.getSourceDocument();
-            
+
             // Exclude soft deletion events involving Relation records themselves
             // from handling by this event handler.
             if (docModel != null && docModel.getType().startsWith(RELATION_DOCTYPE)) {
                 return;
             }
-  
+
             // Retrieve a list of relation records, where the soft deleted
             // document provided in the context of the current event is
             // either the subject or object of any relation
-            
+
             // Build a query string
             String csid = docModel.getName();
-            
+
             String queryString;
             try {
                 queryString =
@@ -66,7 +63,7 @@ public class UpdateRelationsOnDelete extends AbstractCSEventListenerImpl {
                 logger.warn("Actions in this event listener will NOT be performed, as a result of a previous Exception.");
                 return;
             }
-            
+
             // Create a filter to exclude from the list results any records
             // that have already been soft deleted or are locked
             List<String> workflowStatesToFilter = new ArrayList<String>();
@@ -74,9 +71,9 @@ public class UpdateRelationsOnDelete extends AbstractCSEventListenerImpl {
             workflowStatesToFilter.add(WorkflowClient.WORKFLOWSTATE_LOCKED);
             workflowStatesToFilter.add(WorkflowClient.WORKFLOWSTATE_LOCKED_DELETED);
             workflowStatesToFilter.add(WorkflowClient.WORKFLOWSTATE_REPLICATED_DELETED);
-            
+
             LifeCycleFilter workflowStateFilter = new LifeCycleFilter(null, workflowStatesToFilter);
-            
+
             // Perform the filtered query
             CoreSessionInterface session = new CoreSessionWrapper(docModel.getCoreSession());
             DocumentModelList matchingDocuments;
@@ -98,22 +95,22 @@ public class UpdateRelationsOnDelete extends AbstractCSEventListenerImpl {
         }
 
     }
-    
+
     // FIXME: Generic methods like the following might be split off
     // into an event utilities class. - ADR 2012-12-05
 
     /**
      * Identifies whether a supplied event concerns a document that has
      * been transitioned to the 'deleted' workflow state.
-     * 
+     *
      * @param eventContext an event context
-     * 
+     *
      * @return true if this event concerns a document that has
      * been transitioned to the 'deleted' workflow state.
      */
     private boolean isDocumentSoftDeletedEvent(EventContext eventContext) {
         boolean isSoftDeletedEvent = false;
-        
+
         if (eventContext instanceof DocumentEventContext) {
             if (eventContext.getProperties().containsKey(WorkflowClient.WORKFLOWTRANSITION_TO)
                     &&
@@ -123,7 +120,7 @@ public class UpdateRelationsOnDelete extends AbstractCSEventListenerImpl {
                 isSoftDeletedEvent = true;
             }
         }
-        
+
         return isSoftDeletedEvent;
     }
 }
index 6be78d04157e1f4b70da7f64f924f1d7536960e8..60f2b9172ab2f5b127f8ed570cdf35d8788d0771 100644 (file)
       <groupId>org.nuxeo.ecm.core</groupId>
       <artifactId>nuxeo-core-event</artifactId>
       <version>${nuxeo.core.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-log4j12</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.nuxeo.ecm.core</groupId>
     </dependency>
     <dependency>
          <groupId>org.jboss.javaee</groupId>
-         <artifactId>jboss-javaee</artifactId>   
+         <artifactId>jboss-javaee</artifactId>
     </dependency>
-    
-    <dependency>
-        <groupId>commons-logging</groupId>
-        <artifactId>commons-logging</artifactId>
-        <version>1.1.1</version>
-    </dependency>
-    <dependency>
-        <groupId>log4j</groupId>
-        <artifactId>log4j</artifactId>
-        <version>1.2.14</version>
-        <scope>provided</scope>
-    </dependency>
-    
 
     <!-- test dependencies -->
     <dependency>
       <scope>test</scope>
     </dependency>
   </dependencies>
-  
+
     <build>
         <plugins>
             <plugin>
             </plugin>
         </plugins>
     </build>
-  
+
 
 </project>
index 91a02d0d7f5e03899ea118ec32239149f4e63db6..1c35eeb07ca3da75cf69a970186c60bca29cf315 100644 (file)
@@ -32,9 +32,6 @@ import java.util.Map;
 import javax.security.auth.login.LoginContext;
 import javax.security.auth.login.LoginException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.nuxeo.common.utils.IdUtils;
 import org.nuxeo.ecm.core.api.ClientException;
 import org.nuxeo.ecm.core.api.ClientRuntimeException;
@@ -70,13 +67,16 @@ import org.collectionspace.ecm.platform.quote.api.QuoteEvents;
 import org.collectionspace.ecm.platform.quote.api.QuoteManager;
 import org.collectionspace.ecm.platform.quote.service.QuoteServiceConfig;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
  * @author <a href="mailto:glefter@nuxeo.com">George Lefter</a>
  *
  */
 public class QuoteManagerImpl implements QuoteManager {
 
-    private static final Log log = LogFactory.getLog(QuoteManagerImpl.class);
+    private static final Logger logger = LoggerFactory.getLogger(QuoteManagerImpl.class);
 
     final SimpleDateFormat timeFormat = new SimpleDateFormat("dd-HHmmss.S");
 
@@ -104,13 +104,13 @@ public class QuoteManagerImpl implements QuoteManager {
     protected CoreSession openCoreSession(String repositoryName)
             throws ClientException {
        CoreSession result = null;
-       
+
         try {
                result = CoreInstance.openCoreSession(repositoryName);
         } catch (Exception e) {
             throw new ClientException(e);
         }
-        
+
         return result;
     }
 
index fe4157b5b70be76876f2e72d24a9d292ed98b47c..ca7aa521f6238f4aa06b4602bb5181273486e1a9 100644 (file)
@@ -19,9 +19,6 @@
 
 package org.collectionspace.ecm.platform.quote.listener;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.nuxeo.ecm.core.api.CoreSession;
 import org.nuxeo.ecm.core.api.DocumentModel;
 import org.nuxeo.ecm.core.api.event.DocumentEventTypes;
@@ -35,9 +32,12 @@ import org.nuxeo.runtime.api.Framework;
 import org.collectionspace.ecm.platform.quote.service.QuoteServiceConfig;
 import org.collectionspace.ecm.platform.quote.service.QuoteServiceHelper;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 public abstract class AbstractQuoteListener {
 
-     private static final Log log = LogFactory.getLog(AbstractQuoteListener.class);
+     private static final Logger logger = LoggerFactory.getLogger(AbstractQuoteListener.class);
 
         public void handleEvent(EventBundle events) {
             for (Event event : events) {
index 7983d1d16399a6b89bdb54e9611806b1c74fdca8..b39968d7d60803124ed0df75c41036969c6ebb71 100644 (file)
  */
 
 /*
- * An example Nuxeo event listener. 
+ * An example Nuxeo event listener.
  */
 
 package org.collectionspace.ecm.platform.quote.listener;
 
-
-
 import java.util.List;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.nuxeo.ecm.core.api.ClientException;
 import org.nuxeo.ecm.core.api.CoreSession;
 import org.nuxeo.ecm.core.api.DocumentModel;
@@ -40,11 +35,13 @@ import org.nuxeo.ecm.platform.relations.api.RelationManager;
 import org.nuxeo.ecm.platform.relations.api.Resource;
 import org.nuxeo.ecm.platform.relations.api.Statement;
 import org.nuxeo.ecm.platform.relations.api.impl.StatementImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class DocumentRemovedQuoteEventListener extends
         AbstractQuoteListener implements PostCommitEventListener {
 
-    private static final Log log = LogFactory.getLog(DocumentRemovedQuoteEventListener.class);
+    private static final Logger logger = LoggerFactory.getLogger(DocumentRemovedQuoteEventListener.class);
 
     @Override
     protected void doProcess(CoreSession coreSession,
index a1a662e4c2bd91a2e3cd63d988a04db42ed09f5f..321e87a2ffcde9d8996540b0a6ee8f8f7752f36a 100644 (file)
@@ -21,9 +21,6 @@ package org.collectionspace.ecm.platform.quote.listener;
 
 import java.util.List;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.nuxeo.ecm.core.api.ClientException;
 import org.nuxeo.ecm.core.api.CoreSession;
 import org.nuxeo.ecm.core.api.DocumentModel;
@@ -33,12 +30,15 @@ import org.nuxeo.ecm.platform.relations.api.Resource;
 import org.nuxeo.ecm.platform.relations.api.Statement;
 import org.nuxeo.ecm.platform.relations.api.impl.StatementImpl;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import org.collectionspace.ecm.platform.quote.service.QuoteServiceConfig;
 
 public class QuoteRemovedEventListener extends AbstractQuoteListener
         implements EventListener {
 
-    private static final Log log = LogFactory.getLog(QuoteRemovedEventListener.class);
+    private static final Logger logger = LoggerFactory.getLogger(QuoteRemovedEventListener.class);
 
     @Override
     protected void doProcess(CoreSession coreSession,
index 4030da17e0720601d0c2df4eec115948db68d76c..5ee3ba3b42790118f5eae23a1e756c0b3bec0e92 100644 (file)
 
 package org.collectionspace.ecm.platform.quote.service;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.nuxeo.runtime.model.ComponentInstance;
 import org.nuxeo.runtime.model.DefaultComponent;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import org.collectionspace.ecm.platform.quote.api.QuoteManager;
 import org.collectionspace.ecm.platform.quote.impl.QuoteManagerImpl;
 
@@ -37,7 +38,7 @@ public class QuoteService extends DefaultComponent {
 
     public static final String VERSIONING_EXTENSION_POINT_RULES = "rules";
 
-    private static final Log log = LogFactory.getLog(QuoteService.class);
+    private static final Logger logger = LoggerFactory.getLogger(QuoteService.class);
 
     private QuoteManager quoteManager;
 
index 36aec2296344614603359672c6718e053cf76535..f8b76a51b6af2c31bef912ea987365753a4271a5 100644 (file)
@@ -19,7 +19,6 @@
         <dependency>
             <groupId>org.nuxeo.ecm.core</groupId>
             <artifactId>nuxeo-core-storage-sql</artifactId>
-            <version>${nuxeo.core.version}</version>
         </dependency>
            <dependency>
              <groupId>org.nuxeo.ecm.platform</groupId>
index f43c46722d8504b431a243521805395979778c6f..bc52169c5a16ce7d0316d8d2a6b4e5da0070b683 100644 (file)
@@ -8,8 +8,6 @@ import java.io.Serializable;
 import java.util.Calendar;
 import java.util.GregorianCalendar;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.nuxeo.ecm.core.api.Blob;
 import org.nuxeo.ecm.core.api.ClientException;
 import org.nuxeo.ecm.core.api.CoreSession;
@@ -19,31 +17,33 @@ import org.nuxeo.ecm.core.api.blobholder.BlobHolder;
 import org.nuxeo.ecm.core.convert.api.ConversionService;
 import org.nuxeo.ecm.platform.filemanager.api.FileManager;
 import org.nuxeo.runtime.api.Framework;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class AddThumbnailUnrestricted extends UnrestrictedSessionRunner {
-    private static final Log logger = LogFactory
-            .getLog(AddThumbnailUnrestricted.class);
+
+    private static final Logger logger = LoggerFactory
+            .getLogger(AddThumbnailUnrestricted.class);
+
     protected ConversionService cs;
+
     protected DocumentModel doc;
+
     protected BlobHolder blobHolder;
+
     protected Thumbnail thumbnail = null;
+
     public AddThumbnailUnrestricted(CoreSession coreSession, DocumentModel doc,
             BlobHolder blobHolder) {
         super(coreSession);
         this.doc = doc;
         this.blobHolder = blobHolder;
     }
+
     /*
      * (non-Javadoc)
      * @see org.nuxeo.ecm.core.api.UnrestrictedSessionRunner#run()
-     * 
+     *
      * Creates a new thumbnail image and associates it with the document blob by adding a "Thumbnail" facet
      * to the document blob.
      */
@@ -51,13 +51,13 @@ public class AddThumbnailUnrestricted extends UnrestrictedSessionRunner {
     public void run() throws ClientException {
        String errMsg = "Error while adding preview thumbnail.";
        String documentId = doc.getId();
-       
+
         try {
             Blob blob = blobHolder.getBlob();
             if (blob != null) {
                 if (doc.hasFacet(ThumbnailConstants.THUMBNAIL_FACET) == false) { // Make sure we don't already have a "Thumbnail" facet
-                       cs = Framework.getService(ConversionService.class);                
-                       ensureModificationDateExists(doc); // For some reason, the ConversionService service requires the modification date of the blob is not null so we need to ensure it is not null. 
+                       cs = Framework.getService(ConversionService.class);
+                       ensureModificationDateExists(doc); // For some reason, the ConversionService service requires the modification date of the blob is not null so we need to ensure it is not null.
                        BlobHolder thumbnailBlobHolder = cs.convert(ThumbnailConstants.THUMBNAIL_CONVERTER_NAME,
                                blobHolder, null /*no params*/);
                        if (thumbnailBlobHolder != null && thumbnailBlobHolder.getBlob() != null) {
@@ -66,7 +66,7 @@ public class AddThumbnailUnrestricted extends UnrestrictedSessionRunner {
                                // Give the thumbnail blob a name.
                            String thumbnailName = documentId + ThumbnailConstants.THUMBNAIL_PROPERTY_NAME;
                            thumbnailBlobHolder.getBlob().setFilename(thumbnailName); // Give it a name so we can manually search for it in the "nuxeo" database
-                           
+
                            doc.setProperty(ThumbnailConstants.THUMBNAIL_SCHEMA_NAME,
                                    ThumbnailConstants.THUMBNAIL_FILENAME_PROPERTY_NAME,
                                    (Serializable) thumbnailName);
@@ -77,7 +77,7 @@ public class AddThumbnailUnrestricted extends UnrestrictedSessionRunner {
                            // Save the new Thumnail facet data (including the new thumbnail image).  The save triggers a new create event and recurses us back to
                            // this method, but the next time we'll have a Thumbnail facet and bypass this save -sparing us from an infinite event loop.
                            //
-                           doc = session.saveDocument(doc); 
+                           doc = session.saveDocument(doc);
                        } else {
                                logger.warn("Could not create a preview thumbnail image for Nuxeo blob document: " + doc.getId());
                        }
@@ -89,17 +89,17 @@ public class AddThumbnailUnrestricted extends UnrestrictedSessionRunner {
             logger.warn(errMsg, e);
         }
     }
+
     private String computeDigest(FileManager fileManager, Blob blob) throws Exception {
        String result = null;
-       
+
        // Compute the digest
 //        result = fileManager.computeDigest(blob); // REM - Warning: Why is this operation so slow?
         result = blob.getDigest();
-        
+
         return result;
     }
-    
+
     private String ensureModificationDateExists(DocumentModel docModel) throws Exception {
         Calendar modificationDate = (Calendar)doc.getProperty("dublincore", "modified");
         if (modificationDate == null) {
@@ -113,12 +113,12 @@ public class AddThumbnailUnrestricted extends UnrestrictedSessionRunner {
                }
                doc.setProperty("dublincore", "modified", modificationDate);
         }
-        
+
         return modificationDate.toString();
     }
-    
+
     public Thumbnail getAdapter() {
         return thumbnail;
     }
+
 }
index b8e23e59d10ab5b86c2dec70d4cd1fb7d23b516c..bfeb4fd4d639ae744fa099e73acf498b12452015 100644 (file)
@@ -4,9 +4,6 @@ import java.io.File;
 import java.io.Serializable;
 import java.util.Map;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.nuxeo.ecm.core.api.Blob;
 import org.nuxeo.ecm.core.api.blobholder.BlobHolder;
 import org.nuxeo.ecm.core.api.impl.blob.FileBlob;
@@ -26,8 +23,11 @@ import org.nuxeo.runtime.api.Framework;
 //import org.nuxeo.runtime.services.streaming.FileSource;
 //import org.nuxeo.runtime.services.streaming.StreamSource;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 public class ThumbnailConverter extends IMImageUtils implements Converter {
-       private static final Log logger = LogFactory.getLog(ThumbnailConverter.class);
+       private static final Logger logger = LoggerFactory.getLogger(ThumbnailConverter.class);
 
        @Override
        public BlobHolder convert(BlobHolder blobHolder,
@@ -59,7 +59,7 @@ public class ThumbnailConverter extends IMImageUtils implements Converter {
 //                             StreamSource source = streamingBlob.getStreamSource();
 //                             inputFile = ((FileSource) source).getFile();
 //                     }
-                       
+
                        if (inputFile == null) {
                                logger.error("Blob from blob holder was null.");
                                return null; // Add a log message here
index 06198c118211215a6e481ba675d9bda1c37d7b85..7351efa459ef0e11040f8104dfa59f6c118d57f6 100644 (file)
       <groupId>org.nuxeo.ecm.platform</groupId>
       <artifactId>nuxeo-platform-ws-sun-jaxws</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>jcl-over-slf4j</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.elasticsearch</groupId>
       <artifactId>elasticsearch</artifactId>
diff --git a/pom.xml b/pom.xml
index 42f1adc2d30fe44ea809e9a29520de26e1a51895..fe6fb810d8d2208e69d99cb31d68a6c781b5d7aa 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -23,6 +23,7 @@
                <spring.security.version>4.1.1.RELEASE</spring.security.version>
                <spring.security.oauth2.version>2.0.10.RELEASE</spring.security.oauth2.version>
                <aspectj.version>1.7.4</aspectj.version>
+               <log4j.version>2.12.0</log4j.version>
        </properties>
 
        <distributionManagement>
 
        <dependencyManagement>
                <dependencies>
-                       <dependency>
-                               <groupId>junit</groupId>
-                               <artifactId>junit</artifactId>
-                               <version>4.1</version>
-                               <scope>test</scope>
-                       </dependency>
+                       <!-- Ensure transitive dependencies on slf4j and log4j libraries all use the same version. -->
+                       <!-- These jars are all provided, in services/common/lib/slf4j. -->
                        <dependency>
                                <groupId>org.slf4j</groupId>
                                <artifactId>slf4j-api</artifactId>
-                               <version>1.6.1</version>
+                               <version>1.7.21</version>
+                               <scope>provided</scope>
                        </dependency>
                        <dependency>
-                               <groupId>org.slf4j</groupId>
-                               <artifactId>slf4j-log4j12</artifactId>
-                               <version>1.6.1</version>
+                               <groupId>org.apache.logging.log4j</groupId>
+                               <artifactId>log4j-slf4j-impl</artifactId>
+                               <version>${log4j.version}</version>
+                               <scope>provided</scope>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.apache.logging.log4j</groupId>
+                               <artifactId>log4j-api</artifactId>
+                               <version>${log4j.version}</version>
+                               <scope>provided</scope>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.apache.logging.log4j</groupId>
+                               <artifactId>log4j-core</artifactId>
+                               <version>${log4j.version}</version>
+                               <scope>provided</scope>
+                       </dependency>
+                       <!-- commons-logging is provided by jcl-over-slf4j, in services/common/lib/slf4j. -->
+                       <dependency>
+                               <groupId>commons-logging</groupId>
+                               <artifactId>commons-logging</artifactId>
+                               <scope>provided</scope>
+                       </dependency>
+                       <!-- End of logging dependencies. -->
+                       <dependency>
+                               <groupId>ch.elca.el4j.modules</groupId>
+                               <artifactId>module-xml_merge-common</artifactId>
+                               <version>3.1</version>
+                               <scope>provided</scope>
+                               <exclusions>
+                                       <exclusion>
+                                               <groupId>commons-codec</groupId>
+                                               <artifactId>commons-codec</artifactId>
+                                       </exclusion>
+                                       <exclusion>
+                                               <groupId>org.slf4j</groupId>
+                                               <artifactId>slf4j-log4j12</artifactId>
+                                       </exclusion>
+                                       <exclusion>
+                                               <groupId>xml-apis</groupId>
+                                               <artifactId>xml-apis</artifactId>
+                                       </exclusion>
+                               </exclusions>
+                       </dependency>
+                       <dependency>
+                               <groupId>junit</groupId>
+                               <artifactId>junit</artifactId>
+                               <version>4.1</version>
+                               <scope>test</scope>
                        </dependency>
                        <dependency>
                                <groupId>org.testng</groupId>
                                <artifactId>testng</artifactId>
                                <version>6.1.1</version>
-                               <!-- <version>5.6</version> -->
                                <scope>test</scope>
                        </dependency>
                        <dependency>
                                                <groupId>com.sun.jersey</groupId>
                                                <artifactId>jersey-servlet</artifactId>
                                        </exclusion>
+                                       <exclusion>
+                                               <groupId>org.slf4j</groupId>
+                                               <artifactId>slf4j-log4j12</artifactId>
+                                       </exclusion>
                                </exclusions>
                        </dependency>
                        <dependency>
                                <groupId>org.nuxeo.ecm.core</groupId>
                                <artifactId>nuxeo-core</artifactId>
                                <version>${nuxeo.core.version}</version>
+                               <exclusions>
+                                       <exclusion>
+                                               <groupId>org.slf4j</groupId>
+                                               <artifactId>slf4j-log4j12</artifactId>
+                                       </exclusion>
+                                       <exclusion>
+                                               <groupId>xerces</groupId>
+                                               <artifactId>xercesImpl</artifactId>
+                                       </exclusion>
+                               </exclusions>
                        </dependency>
                        <dependency>
                                <groupId>org.nuxeo.ecm.core</groupId>
                                                <groupId>com.sun.jersey</groupId>
                                                <artifactId>jersey-servlet</artifactId>
                                        </exclusion>
-                                       <!-- <exclusion>
-                                                       <artifactId>jboss-remoting</artifactId>
-                                                       <groupId>jboss</groupId>
-                                       </exclusion> -->
                                </exclusions>
                        </dependency>
                        <dependency>
                                <groupId>org.nuxeo.ecm.core</groupId>
                                <artifactId>nuxeo-core-storage-sql</artifactId>
                                <version>${nuxeo.core.version}</version>
+                               <exclusions>
+                                       <exclusion>
+                                               <groupId>org.slf4j</groupId>
+                                               <artifactId>slf4j-log4j12</artifactId>
+                                       </exclusion>
+                               </exclusions>
                        </dependency>
                        <dependency>
                                <groupId>org.nuxeo.ecm.core</groupId>
                                                <artifactId>jersey-servlet</artifactId>
                                                <groupId>com.sun.jersey</groupId>
                                        </exclusion>
+                                       <exclusion>
+                                               <groupId>org.slf4j</groupId>
+                                               <artifactId>slf4j-log4j12</artifactId>
+                                       </exclusion>
                                </exclusions>
                        </dependency>
                        <dependency>
index b9a07c102a826b385d317face742b1c0c4c9132b..cbacd6c448e4b03e94f7124914499c2c8b5fce59 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
         <!-- CollectionObject dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index c10d34da02c56af85099594df7c045fcecdd4b2c..4e7478dd2bcdf79f319e0a5305f851193689eb93 100644 (file)
                        <version>6.6.1</version>
                </dependency>
 
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <version>1.2.14</version>
-            <scope>provided</scope>
-        </dependency>
-        <!-- somewhere dependency is added 1.6.1 unnecessarily -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-simple</artifactId>
-            <version>1.6.1</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>jcl-over-slf4j</artifactId>
-            <version>1.6.1</version>
-            <scope>test</scope>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.authorization.service</artifactId>
             <version>${project.version}</version>
-            <exclusions>
-               <exclusion>
-                       <artifactId>jboss-logging-log4j</artifactId>
-                       <groupId>org.jboss.logging</groupId>
-               </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
                        <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.authorization-mgt.service</artifactId>
             <version>${project.version}</version>
                        <exclusions>
-               <exclusion>
-                       <artifactId>jboss-logging-log4j</artifactId>
-                       <groupId>org.jboss.logging</groupId>
-               </exclusion>
                 <exclusion>
                     <groupId>org.collectionspace.services</groupId>
                     <artifactId>org.collectionspace.services.authorization-mgt.import</artifactId>
         <dependency>
             <groupId>org.nuxeo.ecm.core</groupId>
             <artifactId>nuxeo-core</artifactId>
-                       <exclusions>
-                <exclusion>
-                    <groupId>xerces</groupId>
-                    <artifactId>xercesImpl</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.nuxeo.ecm.core</groupId>
index deebd4a439212b7831c25944d0021fd76700b1b6..0a4c10c9ee4d7d0e8671ec62ba73eceb2b433660 100644 (file)
@@ -1,101 +1,5 @@
-#
-# The default logging level
-#
-log4j.rootLogger=WARN, error, cspace_appender
+log4j.rootLogger=ERROR, stdout
 
-#
-# The stdout appender
-#
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-# Pattern to output the caller's file name and line number.
 log4j.appender.stdout.layout.ConversionPattern=%d %-5p [%t] [%c:%L] %m%n
-
-#
-# An appender that shows just ERROR log messsages
-#
-log4j.appender.error=org.apache.log4j.ConsoleAppender
-log4j.appender.error.layout=org.apache.log4j.PatternLayout
-# Pattern to output the caller's file name and line number.
-log4j.appender.error.layout.ConversionPattern=%d %-5p [%t] [%c:%L] %m%n
-log4j.appender.error.Threshold=WARN
-
-#
-# The "cspace_appender" appender - the standout CollectionSpace services log file appender
-#
-log4j.appender.cspace_appender=org.apache.log4j.RollingFileAppender
-log4j.appender.cspace_appender.File=${catalina.base}/logs/cspace-services.log
-log4j.appender.cspace_appender.MaxFileSize=5000KB
-# Keep ten backup files
-log4j.appender.cspace_appender.MaxBackupIndex=10
-log4j.appender.cspace_appender.layout=org.apache.log4j.PatternLayout
-log4j.appender.cspace_appender.layout.ConversionPattern=%d %-5p [%t] [%c:%L] %m%n
-
-#
-# CollectionSpace Services Performance appender
-#
-log4j.appender.cspace_perf_appender=org.apache.log4j.RollingFileAppender
-log4j.appender.cspace_perf_appender.File=${catalina.base}/logs/cspace-services-perf.log
-log4j.appender.cspace_perf_appender.MaxFileSize=5000KB
-# Keep ten backup files
-log4j.appender.cspace_perf_appender.MaxBackupIndex=10
-log4j.appender.cspace_perf_appender.layout=org.apache.log4j.PatternLayout
-log4j.appender.cspace_perf_appender.layout.ConversionPattern=%d %-5p [%t] [%c:%L] %m%n
-
-#
-# This logger uses the "cspace_perf_appender" appender to log performance profiling information.
-#
-log4j.logger.perf.collectionspace=WARN, cspace_perf_appender, stdout
-# send the logs only to our appender -no inheritence.
-log4j.additivity.perf.collectionspace=false
-
-#
-# CollectionSpace loggers and default levels - all loggers using the rootLogger if not otherwise specified
-#
-log4j.logger.org.collectionspace=DEBUG
-#log4j.logger.org.collectionspace.services.common.query.nuxeo.QueryManagerNuxeoImpl=TRACE
-log4j.logger.org.collectionspace.services.authorization.spring.SpringPermissionManager=ERROR
-log4j.logger.org.collectionspace.services.listener.AbstractUpdateObjectLocationValues=INFO
-log4j.logger.org.collectionspace.services.common.context.AbstractServiceContextImpl=ERROR
-log4j.logger.org.collectionspace.services.common.ServiceMain=INFO
-log4j.logger.org.collectionspace.authentication.realm.db.CSpaceDbRealm=ERROR
-log4j.logger.org.collectionspace.services.nuxeo.client.java.CoreSessionWrapper=ERROR
-log4j.logger.org.collectionspace.services.nuxeo.client.java.NuxeoConnectorEmbedded=ERROR
-log4j.logger.org.collectionspace.services.common.authorization_mgt.AuthorizationCommon=ERROR
-log4j.logger.org.collectionspace.services.nuxeo.client.java.TenantRepository=ERROR
-log4j.logger.org.collectionspace.services.common.init=ERROR
-log4j.logger.org.collectionspace.services.common.config.ServiceConfigUtils=ERROR
-log4j.logger.org.collectionspace.services.report.nuxeo.ReportPostInitHandler=ERROR
-log4j.logger.org.collectionspace.services.client.AbstractServiceClientImpl=ERROR
-#log4j.logger.org.collectionspace.services.nuxeo.client.java.RepositoryClientImpl=ERROR
-log4j.logger.org.collectionspace.services.common.security.SecurityInterceptor=ERROR
-#log4j.logger.org.collectionspace.services.nuxeo.client.java.RemoteDocumentModelHandlerImpl=DEBUG
-#log4j.logger.org.collectionspace.services.nuxeo.client.java=ERROR
-log4j.logger.org.collectionspace.services.common.storage.JDBCTools=ERROR
-#log4j.logger.org.collectionspace.services.common.profile.CSpaceFilter=ERROR
-
-#log4j.logger.org.collectionspace.services.common.vocabulary.nuxeo=TRACE
-
-#
-# Nuxeo loggers, levels, and associated appenders
-#
-log4j.logger.org.nuxeo=WARN
-log4j.logger.org.nuxeo.elasticsearch=INFO
-#log4j.logger.org.nuxeo.ecm.core.storage.sql=TRACE
-
-#
-# Misc loggers, levels
-#
-log4j.logger.org.apache=WARN
-log4j.logger.httpclient=WARN
-log4j.logger.org.jboss.resteasy=ERROR
-log4j.logger.org.apache.catalina.core=WARN
-log4j.logger.org.springframework=ERROR
-log4j.logger.org.springframework.security=ERROR
-log4j.logger.org.jboss.security=ERROR
-log4j.logger.org.apache.catalina.realm=ERROR
-log4j.logger.org.hibernate=ERROR
-log4j.logger.ch.elca.el4j.services.xmlmerge=WARN
-log4j.logger.net.sf.jmimemagic.MagicParser=WARN
-log4j.logger.com.mchange.v2.resourcepool.BasicResourcePool=ERROR
-
diff --git a/services/JaxRsServiceProvider/src/main/resources/log4j2.xml b/services/JaxRsServiceProvider/src/main/resources/log4j2.xml
new file mode 100644 (file)
index 0000000..90ec075
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="WARN">
+       <Appenders>
+               <Console name="ConsoleAppender" target="SYSTEM_OUT">
+                       <PatternLayout pattern="%d %-5p [%t] [%c:%L] %m%n" />
+               </Console>
+       </Appenders>
+
+       <Loggers>
+               <Root level="ERROR">
+                       <AppenderRef ref="ConsoleAppender"/>
+               </Root>
+
+               <Logger name="org.collectionspace" level="DEBUG" additivity="false">
+                       <AppenderRef ref="ConsoleAppender" />
+               </Logger>
+
+               <Logger name="org.collectionspace.services.authorization.spring.SpringPermissionManager" level="ERROR" />
+               <Logger name="org.collectionspace.services.listener.AbstractUpdateObjectLocationValues" level="INFO" />
+               <Logger name="org.collectionspace.services.common.context.AbstractServiceContextImpl" level="ERROR" />
+               <Logger name="org.collectionspace.services.common.ServiceMain" level="INFO" />
+               <Logger name="org.collectionspace.authentication.realm.db.CSpaceDbRealm" level="ERROR" />
+               <Logger name="org.collectionspace.services.nuxeo.client.java.CoreSessionWrapper" level="ERROR" />
+               <Logger name="org.collectionspace.services.nuxeo.client.java.NuxeoConnectorEmbedded" level="ERROR" />
+               <Logger name="org.collectionspace.services.common.authorization_mgt.AuthorizationCommon" level="ERROR" />
+               <Logger name="org.collectionspace.services.nuxeo.client.java.TenantRepository" level="ERROR" />
+               <Logger name="org.collectionspace.services.common.init" level="ERROR" />
+               <Logger name="org.collectionspace.services.common.config.ServiceConfigUtils" level="ERROR" />
+               <Logger name="org.collectionspace.services.report.nuxeo.ReportPostInitHandler" level="ERROR" />
+               <Logger name="org.collectionspace.services.client.AbstractServiceClientImpl" level="ERROR" />
+               <Logger name="org.collectionspace.services.common.security.SecurityInterceptor" level="ERROR" />
+               <Logger name="org.collectionspace.services.common.storage.JDBCTools" level="ERROR" />
+
+               <Logger name="org.nuxeo" level="WARN" />
+               <Logger name="org.nuxeo.elasticsearch" level="INFO" />
+
+               <Logger name="org.apache" level="WARN" />
+               <Logger name="httpclient" level="WARN" />
+               <Logger name="org.jboss.resteasy" level="ERROR" />
+               <Logger name="org.apache.catalina.core" level="WARN" />
+               <Logger name="org.springframework" level="ERROR" />
+               <Logger name="org.springframework.security" level="ERROR" />
+               <Logger name="org.jboss.security" level="ERROR" />
+               <Logger name="org.apache.catalina.realm" level="ERROR" />
+               <Logger name="org.hibernate" level="ERROR" />
+               <Logger name="ch.elca.el4j.services.xmlmerge" level="WARN" />
+               <Logger name="net.sf.jmimemagic.MagicParser" level="WARN" />
+               <Logger name="com.mchange.v2.resourcepool.BasicResourcePool" level="ERROR" />
+       </Loggers>
+</Configuration>
index 5096cd3508a1c72981e8761c6265f0bccc5084b8..32899a68c3535847ba9861638f2c6a9dcc47e08f 100644 (file)
     <name>services.PerformanceTests</name>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 8ba54169bb57301b08584f00e2153363b4519eb7..5e9960a498f57b5b5e2541998aaff2bd800cc56b 100644 (file)
     <name>services.account.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>provided</scope>
-        </dependency>
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.account.jaxb</artifactId>
index 159b33ce3ce7416adc64ea96c5c41b2f05046e6d..a3c5122b61cc7a95f911cb4060b2cd20d7687667 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
         <!-- CollectionSpace Dependencies -->
 
         <dependency>
             <artifactId>commons-beanutils</artifactId>
             <version>1.6.1</version>
         </dependency>
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1</version>
-        </dependency>
 
         <!-- javax -->
 
index 15318c7612fdf868f77073436ad57830f70d4565..cad445429397d42e38ba34f640fc80f517e9664e 100644 (file)
@@ -46,12 +46,12 @@ import org.slf4j.LoggerFactory;
 
 /**
  *
- * @author 
+ * @author
  */
 public class TenantDocumentHandler
         extends JpaDocumentHandler<Tenant, TenantsList, Tenant, List> {
 
-    private final Logger logger = LoggerFactory.getLogger(AccountDocumentHandler.class);
+    private final Logger logger = LoggerFactory.getLogger(TenantDocumentHandler.class);
     private Tenant tenant;
     private TenantsList tenantList;
 
@@ -66,7 +66,7 @@ public class TenantDocumentHandler
         // If marked as metadata immutable, do not do update
                merge(tenantReceived, tenantFound);
     }
-    
+
     /**
      * merge manually merges the from account to the to account
      * -this method is created due to inefficiency of JPA EM merge
index 2a5b61e05ee5b7b5c38e132a76dad90264b074df..f0ce092344cb22cd31e457c76bf3eee25b02ab25 100644 (file)
@@ -67,11 +67,11 @@ import org.slf4j.LoggerFactory;
 
 /**
  *
- * @author 
+ * @author
  */
 public class TenantValidatorHandler implements ValidatorHandler {
 
-    final Logger logger = LoggerFactory.getLogger(AccountValidatorHandler.class);
+    final Logger logger = LoggerFactory.getLogger(TenantValidatorHandler.class);
 
     @Override
     public void validate(Action action, ServiceContext ctx)
index 7c2bd15e3e2a692b33a5671f3bfd3551d2a4be8f..e7872662bb49222599beeef4c0acf6d4b85cfc84 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
         <!-- CollectionSpace Dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 19c50476ea13f843b5bc4855eb2e67495b166eb6..34cbe284d0a148b3bfc9a4d43a5d515c65bd2679 100644 (file)
     <modelVersion>4.0.0</modelVersion>
     <artifactId>org.collectionspace.services.authentication.client</artifactId>
     <name>services.authentication.client</name>
-    
+
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
@@ -68,4 +57,3 @@
     </build>
 
 </project>
-
index 35ae314bd241d0a816669d2f56a91bea7df7dd90..4fea7a4d8161202aa4a7b5d3c235c31925fc69bc 100644 (file)
     </properties>
 
     <dependencies>
-
-        <!-- slf4j not available due to classloading issues running in system classpath  -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1.1</version>
-        </dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
             <version>3.2.1</version>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <version>1.2.14</version>
-            <scope>provided</scope>
-        </dependency>
         <!-- utilities -->
         <dependency>
             <groupId>junit</groupId>
             <version>1.0.01</version>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>org.jboss.logging</groupId>
-            <artifactId>jboss-logging</artifactId>
-            <version>3.1.4.GA</version>
-        </dependency>
         <dependency>
                        <groupId>org.apache.tomcat</groupId>
                        <artifactId>tomcat-catalina</artifactId>
index b617dfc1810a29a5993006ea0a869bf863024bea..d2a9c59d14215b0f432089020ba4480b071aea94 100644 (file)
     <packaging>pom</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <version>1.2.14</version>
-            <scope>provided</scope>
-        </dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-jexl</artifactId>
index 5bdbf56eae43be93603bb1b2b72666d87889ebc3..8bb8049894c68579f54195b813e4b627642ae7ae 100644 (file)
 
                <!-- Utilities -->
 
-               <dependency>
-                       <groupId>org.slf4j</groupId>
-                       <artifactId>slf4j-api</artifactId>
-                       <scope>provided</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.slf4j</groupId>
-                       <artifactId>slf4j-log4j12</artifactId>
-                       <scope>provided</scope>
-               </dependency>
-               <dependency>
-                       <groupId>log4j</groupId>
-                       <artifactId>log4j</artifactId>
-                       <version>1.2.14</version>
-                       <scope>provided</scope>
-               </dependency>
                <dependency>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>commons-jexl</artifactId>
index d083dc02b586c24756cfdc881ebe6a24dd7284c8..01f694982832d0275d6e941f889471cf8ae557db 100644 (file)
@@ -30,14 +30,14 @@ import org.slf4j.LoggerFactory;
 
 @SuppressWarnings("rawtypes")
 public class AuthorityServiceUtils {
-    private static final Logger logger = LoggerFactory.getLogger(AuthorityIdentifierUtils.class);
+    private static final Logger logger = LoggerFactory.getLogger(AuthorityServiceUtils.class);
     //
     // Used to keep track if an authority item's is deprecated
     public static final String DEFAULT_REMOTECLIENT_CONFIG_NAME = "default";
     public static final String IS_DEPRECATED_PROPERTY = "IS_DEPRECATED_PROPERTY";
     public static final Boolean DEPRECATED = true;
     public static final Boolean NOT_DEPRECATED = !DEPRECATED;
-    
+
     // Used to keep track if an authority item's rev number should be updated
     public static final String SHOULD_UPDATE_REV_PROPERTY = "SHOULD_UPDATE_REV_PROPERTY";
     public static final boolean UPDATE_REV = true;
@@ -55,15 +55,15 @@ public class AuthorityServiceUtils {
     /*
      * Try to find a named remote client configuration in the current tenant bindings.  If the value of the incoming param 'remoteClientConfigName' is
      * blank or null, we'll try to find a name in the authority service's bindings.  If we can't find a name there, we'll try using the default name.
-     * 
+     *
      * If the incoming param 'remoteClientConfigName' is not null, we'll look through all the named remote client configurations in the tenant's binding
      * to find the configuration.  If we can't find the named configuration, we'll throw an exception.
-     * 
+     *
      * If there are no remote client configurations in the tenant's bindings, we'll throw an exception.
      */
        public static final RemoteClientConfig getRemoteClientConfig(ServiceContext ctx, String remoteClientConfigName) throws Exception {
        RemoteClientConfig result = null;
-       
+
        TenantBindingType tenantBinding = ServiceMain.getInstance().getTenantBindingConfigReader().getTenantBinding(ctx.getTenantId());
        RemoteClientConfigurations remoteClientConfigurations = tenantBinding.getRemoteClientConfigurations();
        if (remoteClientConfigurations != null) {
@@ -79,7 +79,7 @@ public class AuthorityServiceUtils {
                if (Tools.isEmpty(remoteClientConfigName) == true) {
                        remoteClientConfigName = DEFAULT_REMOTECLIENT_CONFIG_NAME;
                }
-               
+
                List<RemoteClientConfig> remoteClientConfigList = remoteClientConfigurations.getRemoteClientConfig();
                for (RemoteClientConfig config : remoteClientConfigList) {
                        if (config.getName().equalsIgnoreCase(remoteClientConfigName)) {
@@ -93,20 +93,20 @@ public class AuthorityServiceUtils {
                logger.error(errMsg);
                throw new Exception(errMsg);
        }
-       
+
        if (result == null) {
                String errMsg = String.format("Could not find a remote client configuration named '%s' in the tenant bindings for tenant named '%s'",
                                remoteClientConfigName, ctx.getTenantName());
                logger.error(errMsg);
                throw new Exception(errMsg);
        }
-       
+
        return result;
     }
-    
+
     /**
      * Make a request to the SAS Server for an authority payload.
-     * 
+     *
      * @param ctx
      * @param specifier
      * @param responseType
@@ -115,15 +115,15 @@ public class AuthorityServiceUtils {
      */
     static public PoxPayloadIn requestPayloadInFromRemoteServer(ServiceContext ctx, String remoteClientConfigName, Specifier specifier, Class responseType) throws Exception {
        PoxPayloadIn result = null;
-       
+
        RemoteClientConfig remoteClientConfig = getRemoteClientConfig(ctx, remoteClientConfigName);
         AuthorityClient client = (AuthorityClient) ctx.getClient(remoteClientConfig);
-        
+
         Response res = client.read(specifier.getURNValue());
         try {
                int statusCode = res.getStatus();
                if (statusCode == org.apache.commons.httpclient.HttpStatus.SC_OK) {
-                   result = new PoxPayloadIn((String)res.readEntity(responseType)); // Get the entire response!                                        
+                   result = new PoxPayloadIn((String)res.readEntity(responseType)); // Get the entire response!
                } else {
                        String errMsg = String.format("Could not retrieve authority information for '%s' on remote server '%s'.  Server returned status code %d",
                                        specifier.getURNValue(), remoteClientConfig.getUrl(), statusCode);
@@ -135,27 +135,27 @@ public class AuthorityServiceUtils {
         } finally {
                res.close();
         }
-       
+
        return result;
     }
-    
+
     //
     // Makes a call to the remote SAS server for a authority item payload
-    //    
+    //
     static public PoxPayloadIn requestPayloadInFromRemoteServer(
-               AuthorityItemSpecifier specifier, 
-               String remoteClientConfigName, 
-               String serviceName, 
-               Class responseType, 
+               AuthorityItemSpecifier specifier,
+               String remoteClientConfigName,
+               String serviceName,
+               Class responseType,
                boolean syncHierarchicalRelationships) throws Exception {
        PoxPayloadIn result = null;
-       
+
        ServiceContext authorityCtx = new MultipartServiceContextImpl(serviceName);
        RemoteClientConfig remoteClientConfig = getRemoteClientConfig(authorityCtx, remoteClientConfigName);
         AuthorityClient client = (AuthorityClient) authorityCtx.getClient(remoteClientConfig);
         Response res = client.readItem(specifier.getParentSpecifier().getURNValue(), specifier.getItemSpecifier().getURNValue(),
                        AuthorityClient.INCLUDE_DELETED_ITEMS, syncHierarchicalRelationships);
-        
+
         try {
                int statusCode = res.getStatus();
                if (statusCode == org.apache.commons.httpclient.HttpStatus.SC_OK) {
@@ -167,27 +167,27 @@ public class AuthorityServiceUtils {
                            logger.debug(errMsg);
                        }
                        throw new DocumentException(statusCode, errMsg);
-               }               
+               }
         } finally {
                res.close();
         }
-       
+
        return result;
     }
-    
+
     static public boolean setAuthorityItemDeprecated(ServiceContext ctx,
                DocumentModel docModel, String authorityItemCommonSchemaName, Boolean flag) throws Exception {
        boolean result = false;
-       
+
        docModel.setProperty(authorityItemCommonSchemaName, AuthorityItemJAXBSchema.DEPRECATED,
                        new Boolean(flag));
        CoreSessionInterface repoSession = (CoreSessionInterface) ctx.getCurrentRepositorySession();
        repoSession.saveDocument(docModel);
        result = true;
-       
+
        return result;
     }
-    
+
     /*
      * The domain name part of refnames on SAS may not match that of local refnames, so we need to update all the payload's
      * refnames with the correct domain name
@@ -196,7 +196,7 @@ public class AuthorityServiceUtils {
                        PoxPayloadIn payload) throws org.dom4j.DocumentException {
                PoxPayloadIn result = null;
 
-               
+
                String payloadStr = payload.getXmlPayload();
                Pattern p = Pattern.compile("(urn:cspace:)(([a-z]{1,}\\.?)*)"); // matches the domain name part of a RefName.  For example, matches "core.collectionspace.org" of RefName urn:cspace:core.collectionspace.org:personauthorities:name(person):item:name(BigBird1461101206103)'Big Bird'
                Matcher m = p.matcher(payloadStr);
@@ -217,17 +217,17 @@ public class AuthorityServiceUtils {
 
                return result;
        }
-    
+
     /**
      * Mark the authority item as deprecated.
-     * 
+     *
      * @param ctx
      * @param itemInfo
      * @throws Exception
      */
     static public boolean markAuthorityItemAsDeprecated(ServiceContext ctx, String authorityItemCommonSchemaName, AuthorityItemSpecifier authorityItemSpecifier) throws Exception {
        boolean result = false;
-       
+
        try {
                DocumentModel docModel = NuxeoUtils.getDocFromSpecifier(ctx, (CoreSessionInterface)ctx.getCurrentRepositorySession(),
                                authorityItemCommonSchemaName, authorityItemSpecifier);
@@ -236,7 +236,7 @@ public class AuthorityServiceUtils {
                logger.warn(String.format("Could not mark item '%s' as deprecated.", authorityItemSpecifier.getItemSpecifier().getURNValue()), e);
                throw e;
        }
-       
+
        return result;
     }
-}
\ No newline at end of file
+}
index 6d037664470d1b4457b06eb6748ea2548b6658e8..b27d99fab90559079dd5a61a35b63a8fc04cada1 100644 (file)
@@ -11,7 +11,7 @@
     <name>services.authorization-common</name>
     <packaging>jar</packaging>
     <dependencies>
-    
+
     <!-- CollectionSpace dependencies -->
         <dependency>
                        <groupId>org.collectionspace.services</groupId>
@@ -27,7 +27,7 @@
                        <groupId>org.collectionspace.services</groupId>
                        <artifactId>org.collectionspace.services.hyperjaxb</artifactId>
                        <version>${project.version}</version>
-        </dependency>        
+        </dependency>
         <dependency>
                        <groupId>org.collectionspace.services</groupId>
                        <artifactId>org.collectionspace.services.config</artifactId>
                        <version>${project.version}</version>
         </dependency>
     <!-- 3rd Pary dependencies -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>provided</scope>
-        </dependency>
         <dependency>
             <groupId>org.testng</groupId>
             <artifactId>testng</artifactId>
@@ -61,4 +51,3 @@
         </dependency>
     </dependencies>
 </project>
-
index 8a450b7ca245ff42f3cb3ad1e75b98b7854766ca..700dded3014ea031f8d774fbf7d084d50ef18357 100644 (file)
     <name>services.authorization-mgt.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.authentication.service</artifactId>
index c4aa2b47fa029364b3cbe9d9e0329c447dd60cff..cdd1f62a0c1ac13773f96844bc79215c0964880b 100644 (file)
        </properties>
 
        <dependencies>
-               <!-- keep slf4j dependencies on the top -->
-               <dependency>
-                       <groupId>org.slf4j</groupId>
-                       <artifactId>slf4j-api</artifactId>
-               </dependency>
-               <dependency>
-                       <groupId>org.slf4j</groupId>
-                       <artifactId>slf4j-log4j12</artifactId>
-               </dependency>
                <!-- CollectionSpace dependencies -->
                <dependency>
                        <groupId>org.collectionspace.services</groupId>
                <dependency>
                        <groupId>ch.elca.el4j.modules</groupId>
                        <artifactId>module-xml_merge-common</artifactId>
-                       <version>3.1</version>
-                       <exclusions>
-                               <exclusion>
-                                       <groupId>commons-codec</groupId>
-                                       <artifactId>commons-codec</artifactId>
-                               </exclusion>
-                               <exclusion>
-                                       <groupId>xml-apis</groupId>
-                                       <artifactId>xml-apis</artifactId>
-                               </exclusion>
-                       </exclusions>
                </dependency>
                <dependency>
                        <groupId>org.collectionspace.services</groupId>
index e96b77a68acec329cfee0a9cc1279eeef6c28dc8..006e0a8528accf8e4419946ac0e50f25ce530f3d 100644 (file)
 
         <!-- utilities -->
 
-        <!-- slf4j not available due to classloading issues running in system classpath
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1.1</version>
-        </dependency>
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <version>1.2.14</version>
-            <scope>provided</scope>
-        </dependency> -->
-
-        <!-- slf4j used for testing only -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
         </dependency>
 
         <!-- jboss -->
-        <dependency>
-            <groupId>org.jboss.logging</groupId>
-            <artifactId>jboss-logging-log4j</artifactId>
-            <version>2.1.0.GA</version>
-        </dependency>
         <dependency>
             <groupId>jboss</groupId>
             <artifactId>jbosssx</artifactId>
index 1b6cb1be55b697dfa694252e2a17cf7d63b893e3..fb0dc78b1a6ad52c444d7410a4a869d9473dd9e3 100644 (file)
 
         <!-- utilities -->
 
-        <!-- slf4j not available due to classloading issues running in system classpath -->
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1.1</version>
-        </dependency>
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <version>1.2.14</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <!-- slf4j used for testing only -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
         </dependency>
 
         <!-- jboss -->
-        <dependency>
-            <groupId>org.jboss.logging</groupId>
-            <artifactId>jboss-logging</artifactId>
-            <version>3.1.4.GA</version>
-        </dependency>
         <dependency>
             <groupId>jboss</groupId>
             <artifactId>jbosssx</artifactId>
index d37156b860ea10fbb1be53a0d3ed11063e5bcfb4..1d18a994e40969b4d39c492d6350c01b6335e7c4 100644 (file)
@@ -26,15 +26,15 @@ package org.collectionspace.services.authorization;
 
 import java.util.HashSet;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.collectionspace.authentication.AuthN;
 import org.collectionspace.authentication.CSpaceTenant;
 import org.collectionspace.authentication.CSpaceUser;
 import org.collectionspace.services.authorization.perms.ActionType;
 import org.collectionspace.services.authorization.spi.CSpaceAuthorizationProvider;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 import org.springframework.security.core.Authentication;
@@ -45,7 +45,7 @@ import org.springframework.transaction.TransactionStatus;
 
 /**
  * AuthZ is the authorization service singleton used by the services runtime
- * @author 
+ * @author
  */
 public class AuthZ {
 
@@ -54,7 +54,7 @@ public class AuthZ {
      */
     private static volatile AuthZ self = new AuthZ();
     private CSpaceAuthorizationProvider provider;
-    final Log logger = LogFactory.getLog(AuthZ.class);
+    final Logger logger = LoggerFactory.getLogger(AuthZ.class);
 
     private AuthZ() {
         setupProvider();
@@ -67,10 +67,10 @@ public class AuthZ {
     public final static AuthZ get() {
         return self;
     }
-    
+
     public static String getMethod(ActionType actionType) {
        String result = null;
-       
+
        switch (actionType) {
        case CREATE:
                result = "POST";
@@ -94,10 +94,10 @@ public class AuthZ {
                throw new RuntimeException(String.format("Encountered unexpected action type '%s'.",
                                actionType.value()));
        }
-       
+
        return result;
     }
-    
+
     private void setupProvider() {
         String beanConfig = "applicationContext-authorization.xml";
         //system property is only set in test environment
@@ -133,7 +133,7 @@ public class AuthZ {
         } catch (Throwable t) {
                provider.rollbackTransaction(status);
                throw t;
-        }        
+        }
     }
 
     /**
@@ -158,7 +158,7 @@ public class AuthZ {
      */
     public void deletePermissionsFromRoles(CSpaceResource[] resources, String[] principals) // FIXME: # Can tx move one level up?
             throws PermissionNotFoundException, PermissionException {
-       
+
         TransactionStatus status = provider.beginTransaction("deletePermssions");
         try {
                for (CSpaceResource res : resources) {
@@ -247,38 +247,38 @@ public class AuthZ {
     public boolean isAccessAllowed(CSpaceResource res, CSpaceAction action) {
         return provider.getPermissionEvaluator().hasPermission(res, action);
     }
-    
+
     //
     // Login as the admin of no specific tenant
     //
     public void login() {
        String user = AuthN.SPRING_ADMIN_USER;
        String password = AuthN.SPRING_ADMIN_PASSWORD;
-       
+
         HashSet<GrantedAuthority> gauths = new HashSet<GrantedAuthority>();
         gauths.add(new SimpleGrantedAuthority(AuthN.ROLE_SPRING_ADMIN_NAME)); //NOTE: Must match with value in applicationContext-authorization-test.xml (aka SPRING_SECURITY_METADATA));
-        
+
         Authentication authRequest = new UsernamePasswordAuthenticationToken(user, password, gauths);
         SecurityContextHolder.getContext().setAuthentication(authRequest);
         if (logger.isDebugEnabled()) {
             logger.debug("Spring Security login successful for user=" + user);
         }
     }
-    
+
     //
     // Login as the admin for a specific tenant
     //
     public void login(CSpaceTenant tenant) {
        String user = AuthN.SPRING_ADMIN_USER;
        String password = AuthN.SPRING_ADMIN_PASSWORD;
-               
+
        HashSet<GrantedAuthority> grantedAuthorities = new HashSet<GrantedAuthority>();
        grantedAuthorities.add(new SimpleGrantedAuthority(AuthN.ROLE_SPRING_ADMIN_NAME));
-       
+
        HashSet<CSpaceTenant> tenantSet = new HashSet<CSpaceTenant>();
        tenantSet.add(tenant);
        CSpaceUser principal = new CSpaceUser(user, password, null, tenantSet, grantedAuthorities);
-       
+
         Authentication authRequest = new UsernamePasswordAuthenticationToken(principal, password, grantedAuthorities);
         SecurityContextHolder.getContext().setAuthentication(authRequest);
         if (logger.isDebugEnabled()) {
index 5afd0f01aa0fff0c99268997a1656300e30a7b7c..bfbd3826f6fd8dbfea7996b9af12f6aa52e87753 100644 (file)
 package org.collectionspace.services.authorization.spring;
 
 import java.util.ArrayList;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.collectionspace.services.authorization.CSpaceAction;
 import org.collectionspace.services.authorization.CSpaceResource;
 import org.collectionspace.services.authorization.spi.CSpaceAuthorizationProvider;
 import org.collectionspace.services.authorization.spi.CSpacePermissionEvaluator;
 import org.collectionspace.services.authorization.spi.CSpacePermissionManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jdbc.datasource.DataSourceTransactionManager;
 import org.springframework.security.access.PermissionEvaluator;
@@ -48,11 +48,11 @@ import org.springframework.transaction.support.DefaultTransactionDefinition;
 
 /**
  * SpringAuthorizationProvider Spring Security provider
- * @author 
+ * @author
  */
 public class SpringAuthorizationProvider implements CSpaceAuthorizationProvider {
 
-    final Log log = LogFactory.getLog(SpringAuthorizationProvider.class);
+    final Logger log = LoggerFactory.getLogger(SpringAuthorizationProvider.class);
     @Autowired
     private MutableAclService providerAclService;
     @Autowired
index c04449e0e009f9cacea8d0491491d319ece4169c..9407d4dfecddae0c3545fdb73bc1d98a5702a7fa 100644 (file)
@@ -26,11 +26,11 @@ package org.collectionspace.services.authorization.spring;
 import java.util.List;
 import java.io.Serializable;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.collectionspace.services.authorization.CSpaceAction;
 import org.collectionspace.services.authorization.spi.CSpacePermissionEvaluator;
 import org.collectionspace.services.authorization.CSpaceResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.security.access.PermissionEvaluator;
 import org.springframework.security.acls.model.Permission;
 import org.springframework.security.core.Authentication;
@@ -39,11 +39,11 @@ import org.springframework.security.core.context.SecurityContextHolder;
 
 /**
  * SpringPermissionEvaluator evaluates permissions in Spring Security
- * @author 
+ * @author
  */
 public class SpringPermissionEvaluator implements CSpacePermissionEvaluator {
 
-    final Log log = LogFactory.getLog(SpringPermissionEvaluator.class);  //FIXEME: REM - Use SLF4J interfaces instead of directly using Apache Commons Logging.
+    final Logger log = LoggerFactory.getLogger(SpringPermissionEvaluator.class);
     private SpringAuthorizationProvider provider;
 
     SpringPermissionEvaluator(SpringAuthorizationProvider provider) {
@@ -53,14 +53,14 @@ public class SpringPermissionEvaluator implements CSpacePermissionEvaluator {
     @Override
     public boolean hasPermission(CSpaceResource res, CSpaceAction action) {
        boolean result = false;
-       
+
        try {
                Permission perm = SpringAuthorizationProvider.getPermission(action);
                Authentication authToken = SecurityContextHolder.getContext().getAuthentication();
                Serializable objectIdId = SpringAuthorizationProvider.getObjectIdentityIdentifier(res);
                String objectIdType = SpringAuthorizationProvider.getObjectIdentityType(res);
                PermissionEvaluator eval = provider.getProviderPermissionEvaluator();
-               
+
                debug(res, authToken, objectIdId, objectIdType, perm);
                result = eval.hasPermission(authToken,
                        objectIdId, objectIdType, perm);
@@ -73,10 +73,10 @@ public class SpringPermissionEvaluator implements CSpacePermissionEvaluator {
                }
                log.error("Unexpected exception encountered while evaluating permissions.", e);
        }
-        
+
         return result;
     }
-    
+
     private void debug(CSpaceResource res,
                Authentication authToken,
                Serializable objectIdId,
@@ -95,7 +95,7 @@ public class SpringPermissionEvaluator implements CSpacePermissionEvaluator {
                System.out.println("");
        }
     }
-    
+
        public static boolean exceptionChainContainsNetworkError(Throwable exceptionChain) {
                boolean result = false;
                Throwable cause = exceptionChain;
@@ -105,13 +105,13 @@ public class SpringPermissionEvaluator implements CSpacePermissionEvaluator {
                                result = true;
                                break;
                        }
-                       
+
                        cause = cause.getCause();
                }
 
                return result;
        }
-       
+
        private static boolean isCauseNetworkRelated(Throwable cause) {
                boolean result = false;
 
@@ -122,5 +122,5 @@ public class SpringPermissionEvaluator implements CSpacePermissionEvaluator {
 
                return result;
        }
-    
+
 }
index ef2b1074f1ae94a2330ba17f47b978ec99efe3c3..d95d0bf34b430a294c90018c8eb6e1d5d0c16b8a 100644 (file)
@@ -27,15 +27,15 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.collectionspace.services.authorization.CSpaceAction;
 import org.collectionspace.services.authorization.spi.CSpacePermissionManager;
 import org.collectionspace.services.authorization.CSpaceResource;
 import org.collectionspace.services.authorization.PermissionException;
 import org.collectionspace.services.authorization.PermissionNotFoundException;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import org.springframework.security.acls.model.AccessControlEntry;
 import org.springframework.security.acls.model.AclDataAccessException;
 import org.springframework.security.acls.model.AlreadyExistsException;
@@ -47,11 +47,11 @@ import org.springframework.security.acls.model.Sid;
 
 /**
  * Manages permissions in Spring Security
- * @author 
+ * @author
  */
 public class SpringPermissionManager implements CSpacePermissionManager {
 
-    final Log log = LogFactory.getLog(SpringPermissionManager.class);
+    final Logger log = LoggerFactory.getLogger(SpringPermissionManager.class);
     private SpringAuthorizationProvider provider;
 
     SpringPermissionManager(SpringAuthorizationProvider provider) {
@@ -195,7 +195,7 @@ public class SpringPermissionManager implements CSpacePermissionManager {
     @Override
     public void deletePermissions(CSpaceResource res, CSpaceAction action)
             throws PermissionNotFoundException, PermissionException {
-       
+
         ObjectIdentity oid = SpringAuthorizationProvider.getObjectIdentity(res);
         Permission p = SpringAuthorizationProvider.getPermission(action);
         try {
@@ -298,7 +298,7 @@ public class SpringPermissionManager implements CSpacePermissionManager {
             }
             acl = provider.getProviderAclService().createAcl(oid);
         }
-        // Need to see if there is already an entry, so we do not duplicate (e.g., 
+        // Need to see if there is already an entry, so we do not duplicate (e.g.,
         // when we run our permission-roles init more than once.
         List<AccessControlEntry> aceEntries = acl.getEntries();
         if (aceListHasEntry(aceEntries, permission, sid, grant)) {
@@ -308,7 +308,7 @@ public class SpringPermissionManager implements CSpacePermissionManager {
                         + " sid=" + sid.toString()
                         + " grant=" + grant);
             }
-               
+
         } else {
             acl.insertAce(acl.getEntries().size(), permission, sid, grant);
             provider.getProviderAclService().updateAcl(acl);
@@ -321,7 +321,7 @@ public class SpringPermissionManager implements CSpacePermissionManager {
             }
         }
     }
-    
+
     private boolean aceListHasEntry(List<AccessControlEntry> aceEntries, Permission permission,
             Sid sid, boolean grant) {
        for(AccessControlEntry entry : aceEntries) {
@@ -368,14 +368,14 @@ public class SpringPermissionManager implements CSpacePermissionManager {
             }
             i++;
         }
-        
+
         boolean updateNeeded = false;
         for (int j = foundAces.size() - 1; j >= 0; j--) {
             //the following operation does not work while iterating in the while loop
             acl.deleteAce(foundAces.get(j)); //autobox
             updateNeeded = true;
         }
-        
+
         if (updateNeeded) {
                provider.getProviderAclService().updateAcl(acl);
         }
index edbbfb9fdcc76958145be346ad9bfc8da794bb16..8e977d900d0391ee5f5e87cfcb70d2a2fd335649 100644 (file)
     <name>services.batch.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index eb5f6dcae0a4423975196a1d776a84b4c5dab57e..aba3397d7fa66be27c11ba6a74752e6d23f61786 100644 (file)
 
     <dependencies>
         <dependency>
-                       <groupId>org.nuxeo.ecm.core</groupId>
-                       <artifactId>nuxeo-core-storage-sql-management</artifactId>
-                       <version>${nuxeo.general.release}</version>
+            <groupId>org.nuxeo.ecm.core</groupId>
+            <artifactId>nuxeo-core-storage-sql-management</artifactId>
+            <version>${nuxeo.general.release}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
 
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 7baeb2f6b62205e7bbc2fa6f8938d3b66ad6466b..054911d6618199ea000d82b89f9d621ace6ed3e2 100644 (file)
     <name>services.citation.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 9c03e907f699cda2e2e8f64b711eb0052c8fbf46..ce323600316589d3ee6ae002c1c909d29687aa3b 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>commons-beanutils</artifactId>
             <version>1.6.1</version>
         </dependency>
-        <!-- use explict 1.1 version to prevent errors coming from Nuxeo client -->
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1</version>
-        </dependency>
         <!-- javax -->
 
 
index 7c053f0c0413f62407d084b847d08a525d774261..4115c51d5fef31fd9178bb835468199b50cff80e 100644 (file)
     <name>services.claim.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>provided</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 010f256bde1694a576f3d3235893a91fd90e1252..64fea04c339b847a080c6102190c80afed689356 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
 <!-- CollectionSpace dependencies -->
 
         <dependency>
             <groupId>org.jboss.resteasy</groupId>
             <artifactId>resteasy-multipart-provider</artifactId>
         </dependency>
-        <dependency>
-                       <groupId>org.jboss.logging</groupId>
-                       <artifactId>jboss-logging</artifactId>
-                       <version>3.1.4.GA</version>
-                       <scope>runtime</scope>
-        </dependency>
         <!-- Set TestNG scope to default (compile), rather than test -->
         <!-- to allow import(s) in AbstractServiceTest class -->
         <dependency>
index be355ba219fa6237dee2058c7c7c58f5ae337e0a..6661db2273f371137250e3e2a7b4c74118a88f5c 100644 (file)
@@ -35,51 +35,51 @@ import org.slf4j.LoggerFactory;
  *
  * @param <PT> the generic type
  */
-public abstract class PoxPayload<PT extends PayloadPart> {     
-       
+public abstract class PoxPayload<PT extends PayloadPart> {
+
        /** The Constant logger. */
-       protected static final Logger logger = LoggerFactory.getLogger(PayloadPart.class);      
-       
+       protected static final Logger logger = LoggerFactory.getLogger(PoxPayload.class);
+
        /** String constant for JAX-B root element labels */
        public static final String DOCUMENT_ROOT_ELEMENT_LABEL = "document";
        public static final String ABSTRACT_COMMON_LIST_ROOT_ELEMENT_LABEL = "abstract-common-list";
-       
+
        /** The xml text. */
        private String xmlPayload;
-       
+
        protected Document domDocument;
-       
+
        /** The payload name. */
        private String payloadName;
-       
+
        // The list of POX parts contained in the xmlText payload
        /** The parts. */
        private List<PT> parts = new ArrayList<PT>();
-       
+
        // Valid root element labels
-       private static Set<String> validRootElementLabels = new HashSet<String>(Arrays.asList(DOCUMENT_ROOT_ELEMENT_LABEL, 
+       private static Set<String> validRootElementLabels = new HashSet<String>(Arrays.asList(DOCUMENT_ROOT_ELEMENT_LABEL,
                        ABSTRACT_COMMON_LIST_ROOT_ELEMENT_LABEL));
-       
+
        /**
         * Instantiates a new pox payload.
         */
        protected PoxPayload() {
                //empty
        }
-       
+
        final protected void setPayloadName(String name) {
                this.payloadName = name;
        }
-       
+
        /**
         * Returns a list of valid root element labels for payloads.
-        * 
+        *
         * @return
         */
        public Set<String> getValidRootElementLables() {
                return validRootElementLabels;
        }
-       
+
        private void setDomDocument(Document dom) throws DocumentException {
                this.domDocument = dom;
                String label = domDocument.getRootElement().getName().toLowerCase();
@@ -91,7 +91,7 @@ public abstract class PoxPayload<PT extends PayloadPart> {
                }
                parseParts();
        }
-       
+
        /**
         * Creates and returns an XML string representation of ourself.
         *
@@ -102,27 +102,27 @@ public abstract class PoxPayload<PT extends PayloadPart> {
         Document document = createDOMFromParts();
 
         result = document.asXML();
-               
+
                if (logger.isTraceEnabled() == true) {
                        logger.trace("\n\n<<<< Payload : BEGIN <<<<\n" + result + "\n<<<< Payload : END   <<<<\n");
                }
-               
+
                return result;
        }
-       
+
        protected Document createDOMFromParts() {
                Document result = null;
-               
+
         Document document = DocumentHelper.createDocument();
         document.setXMLEncoding("UTF-8");
         document.setName(getName());
         Element root = document.addElement( "document" );
-        root.addAttribute("name", getName());        
-               
+        root.addAttribute("name", getName());
+
                Iterator<PT> it = getParts().iterator();
                while (it.hasNext() == true) {
                        PT outPart = it.next();
-                       Element element = outPart.asElement();                  
+                       Element element = outPart.asElement();
                        if (element != null) {
                                root.add(element.detach());
                        } else {
@@ -130,10 +130,10 @@ public abstract class PoxPayload<PT extends PayloadPart> {
                        }
                }
                result = document;
-                               
+
                return result;
        }
-       
+
        /**
         * Instantiates a new PoxPayload by parsing the payload into a DOM4j
         * Document instance
@@ -146,7 +146,7 @@ public abstract class PoxPayload<PT extends PayloadPart> {
                Document dom  = reader.read(new StringReader(xmlPayload));
                setDomDocument(dom);
        }
-       
+
     /**
      * Instantiates a new payload, saves the original xml, creates a DOM and parses it into parts
      *
@@ -159,8 +159,8 @@ public abstract class PoxPayload<PT extends PayloadPart> {
         SAXReader reader = new SAXReader();
         Document dom = reader.read(file);
                setDomDocument(dom);
-    }  
-       
+    }
+
        /**
         * Creates the part -either an PayloadOutputPart or a PayloadInputPart
         *
@@ -170,7 +170,7 @@ public abstract class PoxPayload<PT extends PayloadPart> {
         * @return the pT
         */
        abstract protected PT createPart(String label, Object jaxbObject, Element element);
-       
+
        /**
         * Creates the part -either an PayloadOutputPart or a PayloadInputPart
         *
@@ -178,8 +178,8 @@ public abstract class PoxPayload<PT extends PayloadPart> {
         * @param element the DOM4j element
         * @return the pT
         */
-       abstract protected PT createPart(String label, Element element);        
-       
+       abstract protected PT createPart(String label, Element element);
+
        /**
         * Parse the DOM object into schema parts.
         *
@@ -191,7 +191,7 @@ public abstract class PoxPayload<PT extends PayloadPart> {
                while (it.hasNext() == true) {
                        Element element = (Element) it.next();
                        String label = element.getName();
-                       Object jaxbObject = PoxPayload.toObject(element);                       
+                       Object jaxbObject = PoxPayload.toObject(element);
                        if (jaxbObject != null) {
                                payloadPart = createPart(label, jaxbObject, element);
                        } else {
@@ -202,7 +202,7 @@ public abstract class PoxPayload<PT extends PayloadPart> {
                        }
                }
        }
-       
+
        /**
         * Gets the name of the payload.
         *
@@ -211,7 +211,7 @@ public abstract class PoxPayload<PT extends PayloadPart> {
        public String getName() {
                return payloadName;
        }
-       
+
        /**
         * Gets the DOM object that we created at init time.  This should never be null;
         *
@@ -220,7 +220,7 @@ public abstract class PoxPayload<PT extends PayloadPart> {
        public Document getDOMDocument() {
                return this.domDocument;
        }
-               
+
        /**
         * Gets the xml text.
         *
@@ -229,7 +229,7 @@ public abstract class PoxPayload<PT extends PayloadPart> {
        public String getXmlPayload() {
                return xmlPayload;
        }
-       
+
        /**
         * Gets the POX part with name match 'label'.
         *
@@ -250,7 +250,7 @@ public abstract class PoxPayload<PT extends PayloadPart> {
                }
                return result;
        }
-       
+
     public List<PT> getParts(String label) {
         List<PT> result = new ArrayList<PT>();
         if (parts != null) {
@@ -262,10 +262,10 @@ public abstract class PoxPayload<PT extends PayloadPart> {
                 }
             }
         }
-        
+
         return result;
-    }  
-       
+    }
+
        /**
         * Gets a list of the POX parts.
         *
@@ -274,16 +274,16 @@ public abstract class PoxPayload<PT extends PayloadPart> {
        public List<PT> getParts() {
                return parts;
        }
-       
+
        /**
         * Set a new set of parts.
-        * 
+        *
         * @param newParts
         */
        public void setParts(ArrayList<PT> newParts) {
                this.parts = newParts;
        }
-               
+
        /**
         * Adds a POX part to the list of existing parts with the label 'label'.
         *
@@ -295,7 +295,7 @@ public abstract class PoxPayload<PT extends PayloadPart> {
                parts.add(entity);
                return entity;
        }
-       
+
        /**
         * Adds a POX part -assuming the part already has a label name.
         *
@@ -306,7 +306,7 @@ public abstract class PoxPayload<PT extends PayloadPart> {
                parts.add(entity);
                return entity;
        }
-       
+
        /**
         * Removes a POX part from our list of parts
         * @param entity
@@ -314,7 +314,7 @@ public abstract class PoxPayload<PT extends PayloadPart> {
        public void removePart(PT entity) {
                parts.remove(entity);
        }
-               
+
     /**
      * Gets the Java package name from the specified namespace.  This method
      * assumes the Namespace is a xjc (JAXB compiler) generate namespace from
@@ -328,7 +328,7 @@ public abstract class PoxPayload<PT extends PayloadPart> {
                String namespaceURI = namespace.getURI();
         return nc.toPackageName(namespaceURI);
     }
-      
+
     /**
      * Attempts to unmarshal a DOM4j element (for a part) into an instance of a JAXB object
      *
@@ -338,21 +338,21 @@ public abstract class PoxPayload<PT extends PayloadPart> {
     public static Object toObject(Element elementInput) {
        Object result = null;
        try {
-               Namespace namespace = elementInput.getNamespace();              
+               Namespace namespace = elementInput.getNamespace();
                String thePackage = getPackage(namespace);
                JAXBContext jc = JAXBContext.newInstance(thePackage);
                Unmarshaller um = jc.createUnmarshaller();
                result = um.unmarshal(
-                               new StreamSource(new StringReader(elementInput.asXML())));                              
+                               new StreamSource(new StringReader(elementInput.asXML())));
        } catch (Exception e) {
-               String msg = String.format("Could not unmarshal XML payload '%s' into a JAXB object.", 
+               String msg = String.format("Could not unmarshal XML payload '%s' into a JAXB object.",
                                elementInput.getName());
                logger.warn(msg);
        }
-       
+
        return result;
     }
-       
+
     /**
      * Attempts to unmarshal a JAXB object (for a part) to a DOM4j element.
      *
@@ -384,10 +384,10 @@ public abstract class PoxPayload<PT extends PayloadPart> {
                                jaxbObject.toString());
                logger.error(msg);
        }
-       
+
        return result;
     }
-    
+
     /**
      * Attempts to unmarshal a JAXB object (for a part) to a DOM4j element.
      *
@@ -399,7 +399,7 @@ public abstract class PoxPayload<PT extends PayloadPart> {
                Document doc = DocumentHelper.parseText(xmlPayload);
                result = doc.getRootElement(); //FIXME: REM - .detach();
        return result;
-    }  
-    
-       
+    }
+
+
 }
index ef96a4959d610991001c8090e41fc72d5857ac8e..cba18e106ca6e289d1427c1f375c7616b49a8c1f 100644 (file)
     <name>services.collectionobject.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 301cf8b581c292d6e78b52139051ad4306e8b447..8a79385116d8243d627785ac7e39934bdb9250e7 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>commons-beanutils</artifactId>
             <version>1.6.1</version>
         </dependency>
-        <!-- use explict 1.1 version to prevent errors coming from Nuxeo client -->
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1</version>
-        </dependency>
       <!-- javax -->
 
         <dependency>
index cf99972da64b4163c46043a3ec2c49364069a0dc..10f4ba8c740154ba73c27cf14c7077a496f7cdca 100644 (file)
             <artifactId>name-parser-api</artifactId>
             <version>3.1</version>
         </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
         <dependency>
             <groupId>org.testng</groupId>
             <artifactId>testng</artifactId>
@@ -53,4 +41,3 @@
         </dependency>
     </dependencies>
 </project>
-
index 62014254fc8069d2cba79fb881ea5277f79b79ff..4e1e06899ffb360b8a6a6bb687ed265a3139e2cb 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.jaxb</artifactId>
diff --git a/services/common/lib/slf4j/log4j-1.2.17.jar b/services/common/lib/slf4j/log4j-1.2.17.jar
deleted file mode 100644 (file)
index 1d425cf..0000000
Binary files a/services/common/lib/slf4j/log4j-1.2.17.jar and /dev/null differ
diff --git a/services/common/lib/slf4j/log4j-api-2.7.jar b/services/common/lib/slf4j/log4j-api-2.7.jar
new file mode 100644 (file)
index 0000000..b921631
Binary files /dev/null and b/services/common/lib/slf4j/log4j-api-2.7.jar differ
diff --git a/services/common/lib/slf4j/log4j-api-2.9.1.jar b/services/common/lib/slf4j/log4j-api-2.9.1.jar
deleted file mode 100644 (file)
index 04cabc8..0000000
Binary files a/services/common/lib/slf4j/log4j-api-2.9.1.jar and /dev/null differ
diff --git a/services/common/lib/slf4j/log4j-core-2.7.jar b/services/common/lib/slf4j/log4j-core-2.7.jar
new file mode 100644 (file)
index 0000000..c0feb23
Binary files /dev/null and b/services/common/lib/slf4j/log4j-core-2.7.jar differ
diff --git a/services/common/lib/slf4j/log4j-core-2.9.1.jar b/services/common/lib/slf4j/log4j-core-2.9.1.jar
deleted file mode 100644 (file)
index c4dcdb5..0000000
Binary files a/services/common/lib/slf4j/log4j-core-2.9.1.jar and /dev/null differ
diff --git a/services/common/lib/slf4j/log4j-slf4j-impl-2.7.jar b/services/common/lib/slf4j/log4j-slf4j-impl-2.7.jar
new file mode 100644 (file)
index 0000000..088263c
Binary files /dev/null and b/services/common/lib/slf4j/log4j-slf4j-impl-2.7.jar differ
diff --git a/services/common/lib/slf4j/log4j-web-2.7.jar b/services/common/lib/slf4j/log4j-web-2.7.jar
new file mode 100644 (file)
index 0000000..d142e6a
Binary files /dev/null and b/services/common/lib/slf4j/log4j-web-2.7.jar differ
diff --git a/services/common/lib/slf4j/slf4j-log4j12-1.7.21.jar b/services/common/lib/slf4j/slf4j-log4j12-1.7.21.jar
deleted file mode 100644 (file)
index ff4fddd..0000000
Binary files a/services/common/lib/slf4j/slf4j-log4j12-1.7.21.jar and /dev/null differ
index e9809df000226dbd9694ff6a0ab26bb85c770baf..7953552725453627084710cd364f0df5070f2378 100644 (file)
                        <version>1.0.7</version>
                </dependency>
 
-               <dependency>
-                       <groupId>org.slf4j</groupId>
-                       <artifactId>slf4j-api</artifactId>
-                       <scope>provided</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.slf4j</groupId>
-                       <artifactId>slf4j-log4j12</artifactId>
-                       <scope>provided</scope>
-               </dependency>
-               <dependency>
-                       <groupId>log4j</groupId>
-                       <artifactId>log4j</artifactId>
-                       <version>1.2.14</version>
-                       <scope>provided</scope>
-               </dependency>
                <dependency>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>commons-jexl</artifactId>
                <dependency>
                        <groupId>ch.elca.el4j.modules</groupId>
                        <artifactId>module-xml_merge-common</artifactId>
-                       <version>3.1</version>
-                       <scope>provided</scope>
                </dependency>
                <dependency>
                        <groupId>commons-io</groupId>
index a3f3b528df6be335054d4c511a6bafef8ec2a836..2d7d8dbff9ad56694dc3917af52d382a7b303275 100644 (file)
@@ -13,7 +13,7 @@
  *
  * Contributors:
  *     Thomas Roger
+
 
 package org.nuxeo.ecm.platform.picture.extension;
 
@@ -22,8 +22,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.nuxeo.common.utils.IdUtils;
 import org.nuxeo.ecm.core.api.Blob;
 import org.nuxeo.ecm.core.api.ClientException;
@@ -38,12 +36,14 @@ import org.nuxeo.ecm.platform.filemanager.utils.FileManagerUtils;
 import org.nuxeo.ecm.platform.picture.api.ImagingDocumentConstants;
 import org.nuxeo.ecm.platform.picture.api.adapters.PictureResourceAdapter;
 import org.nuxeo.ecm.platform.types.TypeManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ImagePlugin extends AbstractFileImporter {
 
     private static final long serialVersionUID = 5850210255138418118L;
 
-    private static final Log log = LogFactory.getLog(ImagePlugin.class);
+    private static final Logger logger = LoggerFactory.getLogger(ImagePlugin.class);
 
     public DocumentModel create(CoreSession documentManager, Blob content,
             String path, boolean overwrite, String fullname,
@@ -104,4 +104,4 @@ public class ImagePlugin extends AbstractFileImporter {
     }
 
 }
-*/
\ No newline at end of file
+*/
index dbdf2483a961d65002041f8fc9b6b34396e7be5f..4fb2cebab30581b21cb3fbc5f2ee98aa5358c647 100644 (file)
@@ -16,55 +16,55 @@ import org.slf4j.LoggerFactory;
 @SuppressWarnings("rawtypes")
 public class JPATransactionContext extends TransactionContext {
     /** The logger. */
-    private final Logger logger = LoggerFactory.getLogger(TransactionContext.class);
+    private final Logger logger = LoggerFactory.getLogger(JPATransactionContext.class);
 
        private int transactionRefCount = 0;
        private boolean aclTablesUpdatedFlag = false;
-       
+
        EntityManagerFactory emf;
        EntityManager em;
-       
+
        public JPATransactionContext(ServiceContext ctx) {
-        emf = JpaStorageUtils.getEntityManagerFactory();            
+        emf = JpaStorageUtils.getEntityManagerFactory();
         em = emf.createEntityManager();
         this.ctx = ctx;
        }
-       
+
        public JPATransactionContext() {
-        emf = JpaStorageUtils.getEntityManagerFactory();            
+        emf = JpaStorageUtils.getEntityManagerFactory();
         em = emf.createEntityManager();
-       }       
+       }
 
        protected EntityManagerFactory getEntityManagerFactory() {
                return emf;
        }
-       
+
        protected EntityManager getEntityManager() {
                return em;
        }
-               
+
        /**
         * Set to 'true' if (and only if) a change has been made AND successfully committed to the Spring Security tables.
-        * 
+        *
         * Since we can't include Spring Security table changes and JPA changes in a single transaction, we
         * keep track of changes to the Spring Security tables here.  We'll use this flag to log a critical error if
         * we think there is a chance the JPA tables and Spring Security tables get out of sync.
-        * 
+        *
         * @param flag
         */
        public void setAclTablesUpdateFlag(boolean flag) {
                aclTablesUpdatedFlag = flag;
        }
-       
+
        protected boolean getAclTablesUpdateFlag() {
                return aclTablesUpdatedFlag;
-       }       
-       
+       }
+
        @Override
        public ServiceContext getServiceContext() {
                return ctx;
        }
-       
+
        @Override
        public void markForRollback() {
                if (em.getTransaction().isActive() == true) {
@@ -74,7 +74,7 @@ public class JPATransactionContext extends TransactionContext {
                        logger.warn(msg);
                }
        }
-       
+
        @Override
        public void close() throws TransactionException  {
                if (em.getTransaction().isActive() == true && em.getTransaction().getRollbackOnly() == true) {
@@ -92,11 +92,11 @@ public class JPATransactionContext extends TransactionContext {
                close(); // NOTE: Recursive call.
                throw new JPATransactionException("There was an active transaction.  You must commit the active transaction prior to calling this close method.");
        }
-               
+
                em.close();
-        JpaStorageUtils.releaseEntityManagerFactory(emf);              
+        JpaStorageUtils.releaseEntityManagerFactory(emf);
        }
-       
+
        private String handleInconsistentState() throws InconsistentStateException {
                //
                // If we've modified the Spring Tables and need to rollback this JPA transaction, we now have a potentially critical inconsistent state in the system
@@ -110,7 +110,7 @@ public class JPATransactionContext extends TransactionContext {
                em.getTransaction().rollback();
                em.close();
         JpaStorageUtils.releaseEntityManagerFactory(emf);
-        
+
         return msg;
        }
 
@@ -121,44 +121,44 @@ public class JPATransactionContext extends TransactionContext {
                }
         transactionRefCount++;
        }
-       
+
        @Override
        public void persist(Object entity) {
                em.persist(entity);
        }
-       
+
        @Override
        public Object merge(Object entity) {
                return em.merge(entity);
        }
-       
+
        @SuppressWarnings("unchecked")
        @Override
        public Object find(Class entityClass, Object primaryKey) {
                return em.find(entityClass, primaryKey);
        }
-       
+
        @SuppressWarnings("unchecked")
        @Override
        public Object find(Class entityClass, String id) {
                return em.find(entityClass, id);
        }
-       
+
        @Override
        public Query createQuery(String qlString) {
                return em.createQuery(qlString);
        }
-       
+
        @Override
     public void remove(Object entity) {
                em.remove(entity);
        }
-       
+
        @Override
        public boolean isTransactionActive() {
                return em.getTransaction().isActive();
        }
-       
+
        @Override
        public void flush() {
                em.flush();
index 2ea74bc2d59db6995999ecb8fd29b67048821ce5..2458da60898119ede7a3b06d08d56dc43ac038f0 100644 (file)
@@ -1,9 +1,9 @@
 /*
  * (C) Copyright 2012 Nuxeo SA (http://nuxeo.com/) and others.
- * 
+ *
  * This code was moved into CollectionSpace to be compatible with the
  * Nuxeo 6.0-HF21 jar files.  The original code can be found on
- * 
+ *
  * GitHub.com here: https://github.com/nuxeo/nuxeo-reindex-fulltext
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -39,8 +39,6 @@ import javax.ws.rs.Path;
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Context;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.nuxeo.ecm.core.api.AbstractSession;
 import org.nuxeo.ecm.core.api.CoreSession;
 import org.nuxeo.ecm.core.api.IterableQueryResult;
@@ -62,6 +60,8 @@ import org.nuxeo.ecm.core.work.api.WorkManager.Scheduling;
 import org.nuxeo.ecm.webengine.jaxrs.session.SessionFactory;
 import org.nuxeo.runtime.api.Framework;
 import org.nuxeo.runtime.transaction.TransactionHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * JAX-RS component used to do fulltext reindexing of the whole database.
@@ -71,7 +71,7 @@ import org.nuxeo.runtime.transaction.TransactionHelper;
 @Path("reindexFulltext")
 public class ReindexFulltextRoot {
 
-    public static Log log = LogFactory.getLog(ReindexFulltextRoot.class);
+    public static Logger log = LoggerFactory.getLogger(ReindexFulltextRoot.class);
 
     protected static final String DC_TITLE = "dc:title";
 
@@ -110,7 +110,7 @@ public class ReindexFulltextRoot {
      * @param batch if present, the batch number to process instead of all
      *            batches; starts at 1
      * @return when done, ok + the total number of docs
-     * @throws StorageException 
+     * @throws StorageException
      */
     public String reindexFulltext(int batchSize, int batch, String query) throws NuxeoException {
         Principal principal = coreSession.getPrincipal();
@@ -126,7 +126,7 @@ public class ReindexFulltextRoot {
         if (batchSize <= 0) {
             batchSize = DEFAULT_BATCH_SIZE;
         }
-        
+
         //
         // A default query that gets ALL the documents
         //
@@ -198,7 +198,7 @@ public class ReindexFulltextRoot {
 
     /**
      * This has to be called once the transaction has been started.
-     * @throws StorageException 
+     * @throws StorageException
      */
     protected void getLowLevelSession() throws NuxeoException {
         try {
index fe718df22419d622c705bb4dc8fa1f0818a5ed04..9525e09204af4297dc3e81c98af4c95007ad9317 100644 (file)
     <name>services.concept.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 82a24d814abb711e0635af0ea92b0aa8b65d9a35..a09a02b2df15186ee25d9c7ef78ce43f48eb92c0 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>commons-beanutils</artifactId>
             <version>1.6.1</version>
         </dependency>
-        <!-- use explict 1.1 version to prevent errors coming from Nuxeo client -->
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1</version>
-        </dependency>
       <!-- javax -->
 
 
index b2018f225176cc23e450a3de7775c2991e6d9e34..9f58d2302c4c0ecd5e576b90d053f4d773fc64ad 100644 (file)
     <name>services.conditioncheck.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 4522d2f82c162bff8c5c9d83a9e047cc7ab6ff43..6a413d7425a74d962e3b3d38cfaf4260e9963583 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
         <dependency>
             <groupId>ch.elca.el4j.modules</groupId>
             <artifactId>module-xml_merge-common</artifactId>
-            <version>3.1</version>
-            <scope>provided</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>xml-apis</groupId>
-                    <artifactId>xml-apis</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
 
         <dependency>
index 5099ee70507fd651e01a3687e22ac2dea4205e23..2f3b35173df0de8cf918f4526ea29af43188b23d 100644 (file)
     <name>services.conservation.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 6967e5b27672eb2d2300cafea82dab0dbedd451f..5e758de77d6f626e97095e68a96eb71e37965cce 100644 (file)
     <name>services.contact.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index aecc63d93b499fe535d6b601c15a77f7d8f3af90..57e8dcc42cf74dbe6403b10cbd15f0ff162e2358 100644 (file)
     <name>services.dimension.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 2d45f59568a8bce2d7ac886d725eb975a1185bc5..d7b572dcc771661a53a56679d9cdd647b4dd2bce 100644 (file)
     <name>services.dimension</name>
     <packaging>pom</packaging>
 
-    <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
-    </dependencies>
-    
     <modules>
         <module>jaxb</module>
         <module>service</module>
         <module>3rdparty</module>
         <module>client</module>
     </modules>
-    
-</project>
 
+</project>
index 83488f2e5de33317aba94f00d8dd5b5e4916ce14..7921ae8995aef6196ca015bd2588b64db04d140e 100644 (file)
     <name>services.exhibition.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 6baeca603151a52cc5ac9211161215dece26658c..cb6bc5ce95c84d6c5840eac5be04ad60e2ece88f 100644 (file)
     <name>services.group.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 4b449d13c64c0601a8d888d3f3fd3bc70dcfbf43..e6b17faac6ed60841041039667a7dddbc953193b 100644 (file)
@@ -2,16 +2,16 @@
 
 <!--
  pom.xml
+
  A Maven 2 project file for the ID Service project.
 
  This document is a part of the source code and related artifacts
  for CollectionSpace, an open source collections management system
  for museums and related institutions:
+
  http://www.collectionspace.org
  http://wiki.collectionspace.org
+
  $LastChangedRevision: 302 $
  $LastChangedDate: 2009-06-29 15:36:29 -0700 (Mon, 29 Jun 2009) $
 -->
     <artifactId>org.collectionspace.services.main</artifactId>
     <version>${revision}</version>
   </parent>
-  
+
   <modelVersion>4.0.0</modelVersion>
   <artifactId>org.collectionspace.services.id</artifactId>
   <name>services.id</name>
   <packaging>pom</packaging>
-  
-       <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-                       <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-                       <scope>provided</scope>
-        </dependency>
-       </dependencies>
-  
+
   <modules>
     <!--module>3rdparty</module-->
     <!--module>jaxb</module-->
@@ -52,5 +39,3 @@
   </modules>
 
 </project>
-
-
index c79875f3fc3861946608466638de2881f62bec9d..e0dba3e2df7dd0686f70c2ac38512b0c267c7ee2 100644 (file)
             <version>${nuxeo.shell.version}</version>
         </dependency>
         <dependency>
-               <groupId>org.nuxeo.ecm.platform</groupId>
-                       <artifactId>nuxeo-importer-core</artifactId>
-                       <version>${nuxeo.platform.version}</version>
+            <groupId>org.nuxeo.ecm.platform</groupId>
+            <artifactId>nuxeo-importer-core</artifactId>
+            <version>${nuxeo.platform.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
                <groupId>org.nuxeo.ecm.platform</groupId>
index 361bb37a57d57738b810bd67a01d8625e791c7b5..04973aca76eaae80fafd932046449bc18ac40a96 100644 (file)
@@ -81,8 +81,8 @@ import org.xml.sax.InputSource;
 @Produces({ "application/xml" })
 @Consumes({ "application/xml" })
 public class ImportsResource extends AbstractCollectionSpaceResourceImpl<PoxPayloadIn, PoxPayloadOut> {
-    
-       private final static Logger logger = LoggerFactory.getLogger(TemplateExpander.class);
+
+       private final static Logger logger = LoggerFactory.getLogger(ImportsResource.class);
 
        public static final String SERVICE_NAME = "imports";
        public static final String SERVICE_PATH = "/" + SERVICE_NAME;
@@ -92,7 +92,7 @@ public class ImportsResource extends AbstractCollectionSpaceResourceImpl<PoxPayl
         * ASSUMPTION: All Nuxeo services of a given tenancy store their stuff in
         * a repository domain, under a "Workspaces" space within that domain.
          * (See http://doc.nuxeo.com/display/USERDOC/Document+Management+concepts)
-        * 
+        *
         * Using the tenant associated with the currently authenticated user, this
         * method returns a delimited path to the Workspaces space for that tenancy.
         */
@@ -102,7 +102,7 @@ public class ImportsResource extends AbstractCollectionSpaceResourceImpl<PoxPayl
                if (repositoryDomainList.size() == 1) {
                        String domainName = repositoryDomainList.get(0).getStorageName()
                                        .trim();
-                       result = NUXEO_SPACES_PATH_DELIMITER + domainName 
+                       result = NUXEO_SPACES_PATH_DELIMITER + domainName
                                 + NUXEO_SPACES_PATH_DELIMITER + NuxeoUtils.Workspaces;
                } else {
                         // Currently, the Imports service places all documents
@@ -117,7 +117,7 @@ public class ImportsResource extends AbstractCollectionSpaceResourceImpl<PoxPayl
                }
                return result;
        }
-        
+
         private static String getRepoName() throws ConfigurationException {
                String repoName = null;
                List<RepositoryDomainType> repositoryDomainList = getRepositoryDomainList();
@@ -130,7 +130,7 @@ public class ImportsResource extends AbstractCollectionSpaceResourceImpl<PoxPayl
                }
                return repoName;
        }
-        
+
         private static List<RepositoryDomainType> getRepositoryDomainList() throws ConfigurationException {
             TenantBindingConfigReaderImpl tReader = ServiceMain.getInstance()
                                .getTenantBindingConfigReader();
@@ -140,7 +140,7 @@ public class ImportsResource extends AbstractCollectionSpaceResourceImpl<PoxPayl
                                .getRepositoryDomain();
                 return repositoryDomainList;
         }
-        
+
 
        @Override
        public String getServiceName() {
@@ -172,7 +172,7 @@ public class ImportsResource extends AbstractCollectionSpaceResourceImpl<PoxPayl
                        _templateDir = tReader.getResourcesDir() + File.separator
                                        + "templates";
                }
-               
+
                File templateDir = new File(_templateDir);  // We need to make sure the 'templates' directory is not missing
                if (templateDir.exists() == false) {
                        throw new FileNotFoundException("The Import service's template directory is missing: " + _templateDir);
@@ -204,11 +204,11 @@ public class ImportsResource extends AbstractCollectionSpaceResourceImpl<PoxPayl
                        String xmlPayload) {
                String result = null;
                ResponseBuilder rb = Response.serverError(); // Assume we'll fail to successfully fulfill the request.
-               
+
                try {
             ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(ui);
                        int timeout = ctx.getTimeoutSecs(); // gets it from query param 'impTimout' or uses default if no query param specified
-                       
+
                        // InputSource inputSource = payloadToInputSource(xmlPayload);
                        // result = createFromInputSource(inputSource);
                        String inputFilename = payloadToFilename(xmlPayload);
@@ -221,7 +221,7 @@ public class ImportsResource extends AbstractCollectionSpaceResourceImpl<PoxPayl
                result = e.getMessage();
                logger.error(result);
                }
-               
+
         return rb.build();
        }
 
@@ -337,18 +337,18 @@ public class ImportsResource extends AbstractCollectionSpaceResourceImpl<PoxPayl
        /**
         * Encodes each ampersand ('&') in the incoming XML payload by replacing it
         * with the predefined XML entity for an ampersand ('&amp;').
-        * 
+        *
         * This is a workaround for the issue described in CSPACE-3911. Its intended
         * effect is to have these added ampersand XML entities being resolved to
         * 'bare' ampersands during the initial parse, thus preserving any XML
         * entities in the payload, which will then be resolved correctly during the
         * second parse.
-        * 
+        *
         * (This is not designed to compensate for instances where the incoming XML
         * payload contains 'bare' ampersands - that is, used in any other context
         * than as the initial characters in XML entities. In those cases, the
         * payload may not be a legal XML document.)
-        * 
+        *
         * @param xmlPayload
         * @return The original XML payload, with each ampersand replaced by the
         *         predefined XML entity for an ampersand.
@@ -374,7 +374,7 @@ public class ImportsResource extends AbstractCollectionSpaceResourceImpl<PoxPayl
        /**
         * This method may be called statically from outside this class; there is a
         * test call in org.collectionspace.services.test.ImportsServiceTest
-        * 
+        *
         * @param inputSource
         *            A wrapper around a request file, either a local file or a
         *            stream; the file has a specific format, you can look at:
@@ -412,15 +412,15 @@ public class ImportsResource extends AbstractCollectionSpaceResourceImpl<PoxPayl
                        @Context HttpServletRequest req, MultipartFormDataInput partFormData) {
                Response response = null;
                StringBuffer resultBuf = new StringBuffer();
-               
+
                try {
             ServiceContext<PoxPayloadIn, PoxPayloadOut> ctx = createServiceContext(ui);
                        int timeout = ctx.getTimeoutSecs(); // gets it from query param 'impTimout' or uses default if no query param specified
-                       
+
                        InputStream fileStream = null;
                        String preamble = partFormData.getPreamble();
                        logger.trace("Preamble type is:" + preamble);
-                        
+
                        Map<String, List<InputPart>> partsMap = partFormData.getFormDataMap();
                        List<InputPart> fileParts = partsMap.get("file");
                        for (InputPart part : fileParts) {
@@ -470,14 +470,14 @@ public class ImportsResource extends AbstractCollectionSpaceResourceImpl<PoxPayl
                                        continue;
                                }
                        }
-                       
+
                        Response.ResponseBuilder rb = Response.ok();
                        rb.entity(resultBuf.toString());
                        response = rb.build();
                } catch (Exception e) {
                        throw bigReThrow(e, ServiceMessages.CREATE_FAILED);
                }
-               
+
                return response;
        }
 
index 793220aec96c1fa99de7cde4c5e6da8d0ab13c9a..08ea979cdc7197a7fd062d9ca20b1c039e93aca8 100644 (file)
     <name>services.index.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 5aff6ee785029afaf6019c3c9ec8c9b5ed4ae214..e066409ce6c4585ea39f7c0eed50ace13ca04818 100644 (file)
     <name>services.intake.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index e1d3b0b5010fe514e1ada7a9137c85b182a3c01f..494d55510e3d4f9476cb181337fdeb074953f914 100644 (file)
     <name>services.loanin.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 2ec8bc1dbaa439e7812abf7cbbe6ae83e9154f27..53875c5b46b17caf8cbb68286a851e822611f933 100644 (file)
     <name>services.loanout.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 11515a9e40d405e61948212769ba954a4ffbe0df..7f6a1120cd56dc821213d208be79893b75ab62df 100644 (file)
     <name>services.location.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index d5809cfc93161aa9f5052169c37408363d8b6275..bff1a3974dd249f4ab290ba2f7dedf87bd7747a4 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>commons-beanutils</artifactId>
             <version>1.6.1</version>
         </dependency>
-        <!-- use explict 1.1 version to prevent errors coming from Nuxeo client -->
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1</version>
-        </dependency>
       <!-- javax -->
 
 
index 0a30eb1000ee17191d2a6351a14d2b417465d2f6..2399a75ca4541386f00d57c2d49346217106dbcb 100644 (file)
     <name>services.material.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 0ffefa3cfa9cdfddcb0b01d9fac145f100580328..da1b95b0171613ae3861b4f0480555a8ba0bfe64 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>commons-beanutils</artifactId>
             <version>1.6.1</version>
         </dependency>
-        <!-- use explict 1.1 version to prevent errors coming from Nuxeo client -->
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1</version>
-        </dependency>
       <!-- javax -->
 
 
index bd82c68fcd6bc6214385e84f7c06e44a4f6c5e53..638fd70432cf1350024d5dad8755e9a47e8b2b59 100644 (file)
     <name>services.media.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 061ac16e575b09d748721271003a0751ec15ff53..9bbb016ea4f09f908740b37c3927caa27226c747 100644 (file)
     <name>services.movement.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>provided</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 18cfef5d18e72b274d9c976f40fbeebe3b44b974..ada93e07a45f7383bfd48df65173a83b34a95af6 100644 (file)
     <name>services.note.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 4b48f494b2a541d90dc5749a3d01cb04f1a7fa7d..d4b5c625f7e12b7bed0c4c3eeb8c252111b23393 100644 (file)
     <name>services.objectexit.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 7bac49ec0fc49bd5d7474a1083fef85dad6e2322..9bb867652143b9147767d7a0e40345590d4ffece 100644 (file)
     <name>services.organization.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>provided</scope>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 433160f1c2b4abd5614fe992e92ff6f7721d9015..96e83888a06e4674b3a5fc70b29e107ade596ba2 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>commons-beanutils</artifactId>
             <version>1.6.1</version>
         </dependency>
-        <!-- use explict 1.1 version to prevent errors coming from Nuxeo client -->
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1</version>
-        </dependency>
       <!-- javax -->
 
 
index 7eab78bba9a120e3b77141ee74561c5234067a84..e72244beccf32266e5e12cb51a0f76891c459bc3 100644 (file)
     <name>services.osteology.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 160a2ef576d8bfe6a9816b1225f5d297115ad2e5..4b423940faa5728483773467d314ae978ee3f6f7 100644 (file)
     <name>services.person.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index f46078178eac833404eb8b42924710e491c3a35a..eab328713766e1d153d8f7d3ebf04f268bf9b765 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>commons-beanutils</artifactId>
             <version>1.6.1</version>
         </dependency>
-        <!-- use explict 1.1 version to prevent errors coming from Nuxeo client -->
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1</version>
-        </dependency>
       <!-- javax -->
 
 
index 9284740ceae7ba5af61786080d5dd992eb9fcd74..95f8b4d3a58dc98d192504ad053a9e912644aef3 100644 (file)
     <name>services.place.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 4e0e5b99cfaf58919603b726557b811257560b60..4fc72012eaceb3d0d1c67b845cb7bcc36b5a8900 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>commons-beanutils</artifactId>
             <version>1.6.1</version>
         </dependency>
-        <!-- use explict 1.1 version to prevent errors coming from Nuxeo client -->
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1</version>
-        </dependency>
 
                <!-- javax -->
 
index e1616f449ceb45a9fdb771def7a829ebabf59205..1865c8c6b5750855f3f4e61d18304448774bdf4a 100644 (file)
                        <artifactId>testng</artifactId>
                        <scope>test</scope>
                </dependency>
+               <dependency>
+                       <groupId>org.slf4j</groupId>
+                       <artifactId>slf4j-api</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.logging.log4j</groupId>
+                       <artifactId>log4j-slf4j-impl</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.logging.log4j</groupId>
+                       <artifactId>log4j-api</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.apache.logging.log4j</groupId>
+                       <artifactId>log4j-core</artifactId>
+               </dependency>
        </dependencies>
 
-       <repositories></repositories>
-
-       <pluginRepositories>
-       </pluginRepositories>
-
        <build>
                <pluginManagement>
                        <plugins>
index 618bedfd0259c1e2d9e7055894ce8846e4a50870..18cc3e5548f30467f2ca2d7a67df70822418b139 100644 (file)
     <name>services.pottag.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index a95f5577bf8d80d7be7b4e7567ed747ebacac1f4..802774a8597d3aae83907558ba20bdb2f42c4b21 100644 (file)
     <name>services.propagation.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 992dc68ff051c5a07496e9259e03a3ea7b962947..5eef9a36566e3a2dbd56f56e8ec039613d453e7a 100644 (file)
     <name>services.publicitem.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 203666981432ebb1ed000dbe1cdf833bb6b46028..116181ec5867d028cd8f7e3d92ee6f331b0f6a59 100644 (file)
     <name>services.query.service</name>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>org.collectionspace.services.common</artifactId>
             <artifactId>commons-beanutils</artifactId>
             <version>1.6.1</version>
         </dependency>
-        <!-- use explict 1.1 version to prevent errors coming from Nuxeo client -->
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1</version>
-        </dependency>
-
         <!-- RESTEasy -->
 
         <dependency>
index 64d0d6252a7061f4ce84f2bbe1a33fd63c7b2ecd..96e89ab94984349a2ef636c499de84bf0ea401d4 100644 (file)
     <name>services.relation.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>provided</scope>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index bdea4a4fd004420be56a4536ed702e71b9207b47..c14b8d63533f3b84aee48fb55d1c54981dd1287d 100644 (file)
     <name>services.report.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 5b8f57ff58d2a4e860c7dcdbe3022779f3009eb5..e7dee9f82cd277e9e4d7fdd316c8ca576b890836 100644 (file)
     <name>services.security.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 1f07479ec2ba17c52de0a090502adb2dd4572dd0..14f5d3db5a883688f0e914d4a35944f08c7a53f0 100644 (file)
     <name>services.servicegroup.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index ff1cbbca0a706f638280183b3630987266b75f3c..278020446ed93f807c6a06c6213848566d3877c0 100644 (file)
     <name>services.structureddate.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
-
     <!-- CollectionSpace dependencies -->
 
         <dependency>
index 51f51a8916096cb6a03adb57dd0337abe1a83544..5109f32153afa819db67a32c254b4f5f7dfd6fdb 100644 (file)
        <packaging>jar</packaging>
 
        <dependencies>
-               <dependency>
-                       <groupId>org.slf4j</groupId>
-                       <artifactId>slf4j-api</artifactId>
-                       <scope>provided</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.slf4j</groupId>
-                       <artifactId>slf4j-log4j12</artifactId>
-                       <scope>provided</scope>
-               </dependency>
                <dependency>
                        <groupId>org.testng</groupId>
                        <artifactId>testng</artifactId>
index b8d34468418fbd9a239af0e6d62049eab758038d..8d200e0fbd3fd60ee96873116cfec93f3bfabb02 100644 (file)
     <name>services.systeminfo.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
-
     <!-- CollectionSpace dependencies -->
 
         <dependency>
index 137b90bfc6544aaf90e0f9ba20bbc78159ff8315..4f49883c928bd386ce884755ea06e224782dfe84 100644 (file)
     <name>services.taxonomy.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index b88a199089608737cd33a529ecaf3764d4adb54d..5e63fa43c27721c8a055e72987cfadc9906f81f0 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>commons-beanutils</artifactId>
             <version>1.6.1</version>
         </dependency>
-        <!-- use explict 1.1 version to prevent errors coming from Nuxeo client -->
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1</version>
-        </dependency>
       <!-- javax -->
 
 
index 8f5310f19eedea19329286b5d80b4894150435d8..05e8bd37a1fb53801de110651c38fe5c80b0abcf 100644 (file)
     <name>services.uoc.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 057606781a414c1ffbeaa2b4572c739137856ccb..55372ae4b0938e5a633a0d2d16496bf59c4df65d 100644 (file)
     <name>services.valuationcontrol.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index e3b9a5eafd3d091777beee79c576bca76ca34030..88bfddf698840fc6d741d52159d10bd6d01c9bc9 100644 (file)
     <name>services.vocabulary.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index a9e28b2d61e1508a9174666953ffa21d2fa66153..6b13d244df96b817b0bdbb5619442e09e0541524 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>commons-beanutils</artifactId>
             <version>1.6.1</version>
         </dependency>
-        <!-- use explict 1.1 version to prevent errors coming from Nuxeo client -->
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1</version>
-        </dependency>
       <!-- javax -->
 
 
index d2f445a2ce809d409bb737a847bef3d722a3f7b5..0de9ea9374950f5724f1724e6db211cd5349f0c2 100644 (file)
     <name>services.work.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
         <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
index 2472ff268683b511bf700839c0c60f18d6545ca4..4f59cab7bb1d7040dad8db7f8649d0ce713e62db 100644 (file)
     <packaging>jar</packaging>
 
     <dependencies>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>
             <artifactId>commons-beanutils</artifactId>
             <version>1.6.1</version>
         </dependency>
-        <!-- use explict 1.1 version to prevent errors coming from Nuxeo client -->
-        <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging</artifactId>
-            <version>1.1</version>
-        </dependency>
       <!-- javax -->
 
 
index 76fc820083765d6dae8d872d7e50de13cf66a18a..e4c171da457908cde77328e5df9592f5d36a2fd9 100644 (file)
     <name>services.workflow.client</name>
 
     <dependencies>
-        <!-- keep slf4j dependencies on the top -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <scope>test</scope>
-        </dependency>
 <!-- CollectionSpace dependencies -->
         <dependency>
             <groupId>org.collectionspace.services</groupId>