From: Ray Lee Date: Sat, 6 Jul 2019 04:39:51 +0000 (-0700) Subject: DRYD-645: Upgrade logging to log4j2 over slf4j. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=4fd4ce86a8f5fd791690784d8034e342a6f531e1;p=tmp%2Fjakarta-migration.git DRYD-645: Upgrade logging to log4j2 over slf4j. --- diff --git a/3rdparty/nuxeo/nuxeo-platform-elasticsearch/pom.xml b/3rdparty/nuxeo/nuxeo-platform-elasticsearch/pom.xml index 574cfe837..d6cb6e71a 100644 --- a/3rdparty/nuxeo/nuxeo-platform-elasticsearch/pom.xml +++ b/3rdparty/nuxeo/nuxeo-platform-elasticsearch/pom.xml @@ -24,7 +24,6 @@ org.nuxeo.ecm.automation nuxeo-automation-io - ${nuxeo.core.version} org.collectionspace.services diff --git a/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/pom.xml b/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/pom.xml index 8af09b050..755a5a4d6 100644 --- a/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/pom.xml +++ b/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/pom.xml @@ -20,7 +20,6 @@ org.nuxeo.ecm.core nuxeo-core-storage-sql - ${nuxeo.core.version} org.nuxeo.ecm.platform diff --git a/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/CreateVersionListener.java b/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/CreateVersionListener.java index a30c848e7..6424df4e6 100644 --- a/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/CreateVersionListener.java +++ b/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/CreateVersionListener.java @@ -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 +} diff --git a/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/DeleteDeadLocationListener.java b/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/DeleteDeadLocationListener.java index 45436ad9b..4590b3f06 100644 --- a/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/DeleteDeadLocationListener.java +++ b/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/DeleteDeadLocationListener.java @@ -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 +} diff --git a/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateAccessCodeListener.java b/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateAccessCodeListener.java index 64989d1ad..a90f6ed59 100644 --- a/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateAccessCodeListener.java +++ b/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateAccessCodeListener.java @@ -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 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 deletedTaxonNames = null; Set 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 previousTaxonNames = Arrays.asList((String[]) context.getProperty(PREVIOUS_TAXON_NAMES_PROPERTY_NAME)); List 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 getTaxonNames(DocumentModel doc) { - List> taxonomicIdentGroupList = (List>) doc.getProperty(CollectionObjectBotGardenConstants.TAXON_SCHEMA_NAME, + List> taxonomicIdentGroupList = (List>) doc.getProperty(CollectionObjectBotGardenConstants.TAXON_SCHEMA_NAME, TAXONOMIC_IDENT_GROUP_LIST_FIELD_NAME); List taxonNames = new ArrayList(); @@ -318,29 +318,29 @@ public class UpdateAccessCodeListener extends AbstractCSEventListenerImpl { private Set findDeletedTaxonNames(List previousTaxonNames, List currentTaxonNames) { Set currentTaxonNameSet = new HashSet(currentTaxonNames); Set deletedTaxonNameSet = new HashSet(); - + for (String previousTaxonName : previousTaxonNames) { if (!currentTaxonNameSet.contains(previousTaxonName)) { deletedTaxonNameSet.add(previousTaxonName); } } - + return deletedTaxonNameSet; } - + private Set findAddedTaxonNames(List previousTaxonNames, List currentTaxonNames) { Set previousTaxonNameSet = new HashSet(previousTaxonNames); Set addedTaxonNameSet = new HashSet(); - + 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 +} diff --git a/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateDeadFlagListener.java b/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateDeadFlagListener.java index 58c61f25e..b25bd7a33 100644 --- a/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateDeadFlagListener.java +++ b/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateDeadFlagListener.java @@ -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 +} diff --git a/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateLocationListener.java b/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateLocationListener.java index 49e2f3aca..b537c6a90 100644 --- a/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateLocationListener.java +++ b/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateLocationListener.java @@ -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. - * + * *
    *
  • If the plant is dead, set currentLocation to none
  • *
  • Set the previousLocation field to the previous value of the currentLocation field
  • @@ -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 +} diff --git a/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateRareFlagListener.java b/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateRareFlagListener.java index 1f04c5320..6a342b802 100644 --- a/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateRareFlagListener.java +++ b/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateRareFlagListener.java @@ -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> plantAttributesGroupList = (List>) 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 plantAttributesGroup = plantAttributesGroupList.get(0); String conservationCategory = (String) plantAttributesGroup.get(CONSERVATION_CATEGORY_FIELD_NAME); - + if (UpdateRareFlagBatchJob.isRare(conservationCategory)) { hasRareConservationCategory = true; } } - + // for (Map 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 +} diff --git a/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateStyledNameListener.java b/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateStyledNameListener.java index 1952efc32..c9656ea9f 100644 --- a/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateStyledNameListener.java +++ b/3rdparty/nuxeo/nuxeo-platform-listener/botgarden/src/main/java/org/collectionspace/services/listener/botgarden/UpdateStyledNameListener.java @@ -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 +} diff --git a/3rdparty/nuxeo/nuxeo-platform-listener/naturalhistory/pom.xml b/3rdparty/nuxeo/nuxeo-platform-listener/naturalhistory/pom.xml index d2399e978..e441c1940 100644 --- a/3rdparty/nuxeo/nuxeo-platform-listener/naturalhistory/pom.xml +++ b/3rdparty/nuxeo/nuxeo-platform-listener/naturalhistory/pom.xml @@ -20,7 +20,6 @@ org.nuxeo.ecm.core nuxeo-core-storage-sql - ${nuxeo.core.version} org.nuxeo.ecm.platform diff --git a/3rdparty/nuxeo/nuxeo-platform-listener/naturalhistory/src/main/java/org/collectionspace/services/listener/naturalhistory/UpdateFormattedDisplayNameListener.java b/3rdparty/nuxeo/nuxeo-platform-listener/naturalhistory/src/main/java/org/collectionspace/services/listener/naturalhistory/UpdateFormattedDisplayNameListener.java index fcf6a4a69..d2ddc1940 100644 --- a/3rdparty/nuxeo/nuxeo-platform-listener/naturalhistory/src/main/java/org/collectionspace/services/listener/naturalhistory/UpdateFormattedDisplayNameListener.java +++ b/3rdparty/nuxeo/nuxeo-platform-listener/naturalhistory/src/main/java/org/collectionspace/services/listener/naturalhistory/UpdateFormattedDisplayNameListener.java @@ -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 previousDisplayNames = getDisplayNames(previousDoc); TaxonFormatter formatter = new TaxonFormatter(); @@ -76,24 +76,24 @@ public class UpdateFormattedDisplayNameListener extends AbstractCSEventListenerI for (Map 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 updateMap = new HashMap(); updateMap.put(TERM_GROUP_LIST_FIELD_NAME, termGroupList); - + doc.setProperties(TaxonConstants.DISPLAY_NAME_SCHEMA_NAME, updateMap); } - + /* private Set getDisplayNames(DocumentModel doc) throws ClientException { Set displayNames = new HashSet(); @@ -101,13 +101,13 @@ public class UpdateFormattedDisplayNameListener extends AbstractCSEventListenerI for (Map 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 +} diff --git a/3rdparty/nuxeo/nuxeo-platform-listener/pom.xml b/3rdparty/nuxeo/nuxeo-platform-listener/pom.xml index 125bba755..ef2bea300 100644 --- a/3rdparty/nuxeo/nuxeo-platform-listener/pom.xml +++ b/3rdparty/nuxeo/nuxeo-platform-listener/pom.xml @@ -30,7 +30,6 @@ org.nuxeo.ecm.core nuxeo-core-storage-sql - ${nuxeo.core.version} org.nuxeo.ecm.platform diff --git a/3rdparty/nuxeo/nuxeo-platform-listener/updateimagederivatives/src/main/java/org/collectionspace/services/listener/UpdateImageDerivatives.java b/3rdparty/nuxeo/nuxeo-platform-listener/updateimagederivatives/src/main/java/org/collectionspace/services/listener/UpdateImageDerivatives.java index 2d2164e12..e04a63615 100644 --- a/3rdparty/nuxeo/nuxeo-platform-listener/updateimagederivatives/src/main/java/org/collectionspace/services/listener/UpdateImageDerivatives.java +++ b/3rdparty/nuxeo/nuxeo-platform-listener/updateimagederivatives/src/main/java/org/collectionspace/services/listener/UpdateImageDerivatives.java @@ -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 +} diff --git a/3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/src/main/java/org/collectionspace/services/listener/AbstractUpdateObjectLocationValues.java b/3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/src/main/java/org/collectionspace/services/listener/AbstractUpdateObjectLocationValues.java index 2cb7f22df..1d60b06ca 100644 --- a/3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/src/main/java/org/collectionspace/services/listener/AbstractUpdateObjectLocationValues.java +++ b/3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/src/main/java/org/collectionspace/services/listener/AbstractUpdateObjectLocationValues.java @@ -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; } diff --git a/3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/src/main/java/org/collectionspace/services/listener/UpdateObjectLocationAndCrateOnMove.java b/3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/src/main/java/org/collectionspace/services/listener/UpdateObjectLocationAndCrateOnMove.java index cd593de64..03e708619 100644 --- a/3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/src/main/java/org/collectionspace/services/listener/UpdateObjectLocationAndCrateOnMove.java +++ b/3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/src/main/java/org/collectionspace/services/listener/UpdateObjectLocationAndCrateOnMove.java @@ -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 +} diff --git a/3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/src/main/java/org/collectionspace/services/listener/UpdateObjectLocationOnMove.java b/3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/src/main/java/org/collectionspace/services/listener/UpdateObjectLocationOnMove.java index 819197a65..600481927 100644 --- a/3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/src/main/java/org/collectionspace/services/listener/UpdateObjectLocationOnMove.java +++ b/3rdparty/nuxeo/nuxeo-platform-listener/updateobjectlocationonmove/src/main/java/org/collectionspace/services/listener/UpdateObjectLocationOnMove.java @@ -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 +} diff --git a/3rdparty/nuxeo/nuxeo-platform-listener/updaterelationsondelete/src/main/java/org/collectionspace/services/listener/UpdateRelationsOnDelete.java b/3rdparty/nuxeo/nuxeo-platform-listener/updaterelationsondelete/src/main/java/org/collectionspace/services/listener/UpdateRelationsOnDelete.java index dbf63645e..bc54278a2 100644 --- a/3rdparty/nuxeo/nuxeo-platform-listener/updaterelationsondelete/src/main/java/org/collectionspace/services/listener/UpdateRelationsOnDelete.java +++ b/3rdparty/nuxeo/nuxeo-platform-listener/updaterelationsondelete/src/main/java/org/collectionspace/services/listener/UpdateRelationsOnDelete.java @@ -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 workflowStatesToFilter = new ArrayList(); @@ -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; } } diff --git a/3rdparty/nuxeo/nuxeo-platform-quote/pom.xml b/3rdparty/nuxeo/nuxeo-platform-quote/pom.xml index 6be78d041..60f2b9172 100644 --- a/3rdparty/nuxeo/nuxeo-platform-quote/pom.xml +++ b/3rdparty/nuxeo/nuxeo-platform-quote/pom.xml @@ -36,6 +36,12 @@ org.nuxeo.ecm.core nuxeo-core-event ${nuxeo.core.version} + + + org.slf4j + slf4j-log4j12 + + org.nuxeo.ecm.core @@ -76,21 +82,8 @@ org.jboss.javaee - jboss-javaee + jboss-javaee - - - commons-logging - commons-logging - 1.1.1 - - - log4j - log4j - 1.2.14 - provided - - @@ -129,7 +122,7 @@ test - + @@ -147,6 +140,6 @@ - + diff --git a/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/impl/QuoteManagerImpl.java b/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/impl/QuoteManagerImpl.java index 91a02d0d7..1c35eeb07 100644 --- a/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/impl/QuoteManagerImpl.java +++ b/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/impl/QuoteManagerImpl.java @@ -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 George Lefter * */ 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; } diff --git a/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/listener/AbstractQuoteListener.java b/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/listener/AbstractQuoteListener.java index fe4157b5b..ca7aa521f 100644 --- a/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/listener/AbstractQuoteListener.java +++ b/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/listener/AbstractQuoteListener.java @@ -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) { diff --git a/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/listener/DocumentRemovedQuoteEventListener.java b/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/listener/DocumentRemovedQuoteEventListener.java index 7983d1d16..b39968d7d 100644 --- a/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/listener/DocumentRemovedQuoteEventListener.java +++ b/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/listener/DocumentRemovedQuoteEventListener.java @@ -18,18 +18,13 @@ */ /* - * 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, diff --git a/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/listener/QuoteRemovedEventListener.java b/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/listener/QuoteRemovedEventListener.java index a1a662e4c..321e87a2f 100644 --- a/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/listener/QuoteRemovedEventListener.java +++ b/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/listener/QuoteRemovedEventListener.java @@ -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, diff --git a/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/service/QuoteService.java b/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/service/QuoteService.java index 4030da17e..5ee3ba3b4 100644 --- a/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/service/QuoteService.java +++ b/3rdparty/nuxeo/nuxeo-platform-quote/src/main/java/org/collectionspace/ecm/platform/quote/service/QuoteService.java @@ -19,11 +19,12 @@ 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; diff --git a/3rdparty/nuxeo/nuxeo-platform-thumbnail/pom.xml b/3rdparty/nuxeo/nuxeo-platform-thumbnail/pom.xml index 36aec2296..f8b76a51b 100644 --- a/3rdparty/nuxeo/nuxeo-platform-thumbnail/pom.xml +++ b/3rdparty/nuxeo/nuxeo-platform-thumbnail/pom.xml @@ -19,7 +19,6 @@ org.nuxeo.ecm.core nuxeo-core-storage-sql - ${nuxeo.core.version} org.nuxeo.ecm.platform diff --git a/3rdparty/nuxeo/nuxeo-platform-thumbnail/src/main/java/org/collectionspace/services/nuxeo/extension/thumbnail/AddThumbnailUnrestricted.java b/3rdparty/nuxeo/nuxeo-platform-thumbnail/src/main/java/org/collectionspace/services/nuxeo/extension/thumbnail/AddThumbnailUnrestricted.java index f43c46722..bc52169c5 100644 --- a/3rdparty/nuxeo/nuxeo-platform-thumbnail/src/main/java/org/collectionspace/services/nuxeo/extension/thumbnail/AddThumbnailUnrestricted.java +++ b/3rdparty/nuxeo/nuxeo-platform-thumbnail/src/main/java/org/collectionspace/services/nuxeo/extension/thumbnail/AddThumbnailUnrestricted.java @@ -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; } - + } diff --git a/3rdparty/nuxeo/nuxeo-platform-thumbnail/src/main/java/org/collectionspace/services/nuxeo/extension/thumbnail/ThumbnailConverter.java b/3rdparty/nuxeo/nuxeo-platform-thumbnail/src/main/java/org/collectionspace/services/nuxeo/extension/thumbnail/ThumbnailConverter.java index b8e23e59d..bfeb4fd4d 100644 --- a/3rdparty/nuxeo/nuxeo-platform-thumbnail/src/main/java/org/collectionspace/services/nuxeo/extension/thumbnail/ThumbnailConverter.java +++ b/3rdparty/nuxeo/nuxeo-platform-thumbnail/src/main/java/org/collectionspace/services/nuxeo/extension/thumbnail/ThumbnailConverter.java @@ -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 diff --git a/3rdparty/nuxeo/nuxeo-server/7.10-HF17/bundles/pom.xml b/3rdparty/nuxeo/nuxeo-server/7.10-HF17/bundles/pom.xml index 06198c118..7351efa45 100644 --- a/3rdparty/nuxeo/nuxeo-server/7.10-HF17/bundles/pom.xml +++ b/3rdparty/nuxeo/nuxeo-server/7.10-HF17/bundles/pom.xml @@ -39,14 +39,6 @@ org.nuxeo.ecm.platform nuxeo-platform-ws-sun-jaxws - - org.slf4j - jcl-over-slf4j - - - log4j - log4j - org.elasticsearch elasticsearch diff --git a/pom.xml b/pom.xml index 42f1adc2d..fe6fb810d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,6 +23,7 @@ 4.1.1.RELEASE 2.0.10.RELEASE 1.7.4 + 2.12.0 @@ -460,27 +461,69 @@ - - junit - junit - 4.1 - test - + + org.slf4j slf4j-api - 1.6.1 + 1.7.21 + provided - org.slf4j - slf4j-log4j12 - 1.6.1 + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j.version} + provided + + + org.apache.logging.log4j + log4j-api + ${log4j.version} + provided + + + org.apache.logging.log4j + log4j-core + ${log4j.version} + provided + + + + commons-logging + commons-logging + provided + + + + ch.elca.el4j.modules + module-xml_merge-common + 3.1 + provided + + + commons-codec + commons-codec + + + org.slf4j + slf4j-log4j12 + + + xml-apis + xml-apis + + + + + junit + junit + 4.1 + test org.testng testng 6.1.1 - test @@ -553,12 +596,26 @@ com.sun.jersey jersey-servlet + + org.slf4j + slf4j-log4j12 + org.nuxeo.ecm.core nuxeo-core ${nuxeo.core.version} + + + org.slf4j + slf4j-log4j12 + + + xerces + xercesImpl + + org.nuxeo.ecm.core @@ -569,10 +626,6 @@ com.sun.jersey jersey-servlet - @@ -614,6 +667,12 @@ org.nuxeo.ecm.core nuxeo-core-storage-sql ${nuxeo.core.version} + + + org.slf4j + slf4j-log4j12 + + org.nuxeo.ecm.core @@ -653,6 +712,10 @@ jersey-servlet com.sun.jersey + + org.slf4j + slf4j-log4j12 + diff --git a/services/IntegrationTests/pom.xml b/services/IntegrationTests/pom.xml index b9a07c102..cbacd6c44 100644 --- a/services/IntegrationTests/pom.xml +++ b/services/IntegrationTests/pom.xml @@ -12,16 +12,6 @@ jar - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/JaxRsServiceProvider/pom.xml b/services/JaxRsServiceProvider/pom.xml index c10d34da0..4e7478dd2 100644 --- a/services/JaxRsServiceProvider/pom.xml +++ b/services/JaxRsServiceProvider/pom.xml @@ -53,46 +53,11 @@ 6.6.1 - - org.slf4j - slf4j-api - provided - - - org.slf4j - slf4j-log4j12 - provided - - - log4j - log4j - 1.2.14 - provided - - - - org.slf4j - slf4j-simple - 1.6.1 - test - - - org.slf4j - jcl-over-slf4j - 1.6.1 - test - org.collectionspace.services org.collectionspace.services.authorization.service ${project.version} - - - jboss-logging-log4j - org.jboss.logging - - org.collectionspace.services @@ -197,10 +162,6 @@ org.collectionspace.services.authorization-mgt.service ${project.version} - - jboss-logging-log4j - org.jboss.logging - org.collectionspace.services org.collectionspace.services.authorization-mgt.import @@ -613,12 +574,6 @@ org.nuxeo.ecm.core nuxeo-core - - - xerces - xercesImpl - - org.nuxeo.ecm.core diff --git a/services/JaxRsServiceProvider/src/main/resources/log4j.properties b/services/JaxRsServiceProvider/src/main/resources/log4j.properties index deebd4a43..0a4c10c9e 100644 --- a/services/JaxRsServiceProvider/src/main/resources/log4j.properties +++ b/services/JaxRsServiceProvider/src/main/resources/log4j.properties @@ -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 index 000000000..90ec075f4 --- /dev/null +++ b/services/JaxRsServiceProvider/src/main/resources/log4j2.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/services/PerformanceTests/pom.xml b/services/PerformanceTests/pom.xml index 5096cd350..32899a68c 100644 --- a/services/PerformanceTests/pom.xml +++ b/services/PerformanceTests/pom.xml @@ -12,16 +12,6 @@ services.PerformanceTests - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/account/client/pom.xml b/services/account/client/pom.xml index 8ba54169b..5e9960a49 100644 --- a/services/account/client/pom.xml +++ b/services/account/client/pom.xml @@ -13,17 +13,6 @@ services.account.client - - - org.slf4j - slf4j-api - provided - - - org.slf4j - slf4j-log4j12 - provided - org.collectionspace.services org.collectionspace.services.account.jaxb diff --git a/services/account/service/pom.xml b/services/account/service/pom.xml index 159b33ce3..a3c5122b6 100644 --- a/services/account/service/pom.xml +++ b/services/account/service/pom.xml @@ -12,17 +12,6 @@ jar - - org.slf4j - slf4j-api - provided - - - org.slf4j - slf4j-log4j12 - provided - - @@ -74,11 +63,6 @@ commons-beanutils 1.6.1 - - commons-logging - commons-logging - 1.1 - diff --git a/services/account/service/src/main/java/org/collectionspace/services/account/storage/TenantDocumentHandler.java b/services/account/service/src/main/java/org/collectionspace/services/account/storage/TenantDocumentHandler.java index 15318c761..cad445429 100644 --- a/services/account/service/src/main/java/org/collectionspace/services/account/storage/TenantDocumentHandler.java +++ b/services/account/service/src/main/java/org/collectionspace/services/account/storage/TenantDocumentHandler.java @@ -46,12 +46,12 @@ import org.slf4j.LoggerFactory; /** * - * @author + * @author */ public class TenantDocumentHandler extends JpaDocumentHandler { - 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 diff --git a/services/account/service/src/main/java/org/collectionspace/services/account/storage/TenantValidatorHandler.java b/services/account/service/src/main/java/org/collectionspace/services/account/storage/TenantValidatorHandler.java index 2a5b61e05..f0ce09234 100644 --- a/services/account/service/src/main/java/org/collectionspace/services/account/storage/TenantValidatorHandler.java +++ b/services/account/service/src/main/java/org/collectionspace/services/account/storage/TenantValidatorHandler.java @@ -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) diff --git a/services/acquisition/client/pom.xml b/services/acquisition/client/pom.xml index 7c2bd15e3..e7872662b 100644 --- a/services/acquisition/client/pom.xml +++ b/services/acquisition/client/pom.xml @@ -14,17 +14,6 @@ jar - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/authentication/client/pom.xml b/services/authentication/client/pom.xml index 19c50476e..34cbe284d 100644 --- a/services/authentication/client/pom.xml +++ b/services/authentication/client/pom.xml @@ -12,19 +12,8 @@ 4.0.0 org.collectionspace.services.authentication.client services.authentication.client - + - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services @@ -68,4 +57,3 @@ - diff --git a/services/authentication/service/pom.xml b/services/authentication/service/pom.xml index 35ae314bd..4fea7a4d8 100644 --- a/services/authentication/service/pom.xml +++ b/services/authentication/service/pom.xml @@ -16,33 +16,12 @@ - - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - - - commons-logging - commons-logging - 1.1.1 - org.apache.commons commons-lang3 3.2.1 provided - - log4j - log4j - 1.2.14 - provided - junit @@ -56,11 +35,6 @@ 1.0.01 provided - - org.jboss.logging - jboss-logging - 3.1.4.GA - org.apache.tomcat tomcat-catalina diff --git a/services/authority/pom.xml b/services/authority/pom.xml index b617dfc18..d2a9c59d1 100644 --- a/services/authority/pom.xml +++ b/services/authority/pom.xml @@ -14,12 +14,6 @@ pom - - log4j - log4j - 1.2.14 - provided - org.apache.commons commons-jexl diff --git a/services/authority/service/pom.xml b/services/authority/service/pom.xml index 5bdbf56ea..8bb804989 100644 --- a/services/authority/service/pom.xml +++ b/services/authority/service/pom.xml @@ -106,22 +106,6 @@ - - org.slf4j - slf4j-api - provided - - - org.slf4j - slf4j-log4j12 - provided - - - log4j - log4j - 1.2.14 - provided - org.apache.commons commons-jexl diff --git a/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityServiceUtils.java b/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityServiceUtils.java index d083dc02b..01f694982 100644 --- a/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityServiceUtils.java +++ b/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/AuthorityServiceUtils.java @@ -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 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 +} diff --git a/services/authorization-common/pom.xml b/services/authorization-common/pom.xml index 6d0376644..b27d99fab 100644 --- a/services/authorization-common/pom.xml +++ b/services/authorization-common/pom.xml @@ -11,7 +11,7 @@ services.authorization-common jar - + org.collectionspace.services @@ -27,7 +27,7 @@ org.collectionspace.services org.collectionspace.services.hyperjaxb ${project.version} - + org.collectionspace.services org.collectionspace.services.config @@ -44,16 +44,6 @@ ${project.version} - - org.slf4j - slf4j-api - provided - - - org.slf4j - slf4j-log4j12 - provided - org.testng testng @@ -61,4 +51,3 @@ - diff --git a/services/authorization-mgt/client/pom.xml b/services/authorization-mgt/client/pom.xml index 8a450b7ca..700dded30 100644 --- a/services/authorization-mgt/client/pom.xml +++ b/services/authorization-mgt/client/pom.xml @@ -13,15 +13,6 @@ services.authorization-mgt.client - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services org.collectionspace.services.authentication.service diff --git a/services/authorization-mgt/import/pom.xml b/services/authorization-mgt/import/pom.xml index c4aa2b47f..cdd1f62a0 100644 --- a/services/authorization-mgt/import/pom.xml +++ b/services/authorization-mgt/import/pom.xml @@ -15,15 +15,6 @@ - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services @@ -155,17 +146,6 @@ ch.elca.el4j.modules module-xml_merge-common - 3.1 - - - commons-codec - commons-codec - - - xml-apis - xml-apis - - org.collectionspace.services diff --git a/services/authorization-mgt/service/pom.xml b/services/authorization-mgt/service/pom.xml index e96b77a68..006e0a852 100644 --- a/services/authorization-mgt/service/pom.xml +++ b/services/authorization-mgt/service/pom.xml @@ -26,28 +26,6 @@ - - - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - junit junit @@ -67,11 +45,6 @@ - - org.jboss.logging - jboss-logging-log4j - 2.1.0.GA - jboss jbosssx diff --git a/services/authorization/service/pom.xml b/services/authorization/service/pom.xml index 1b6cb1be5..fb0dc78b1 100644 --- a/services/authorization/service/pom.xml +++ b/services/authorization/service/pom.xml @@ -22,30 +22,6 @@ - - - commons-logging - commons-logging - 1.1.1 - - - log4j - log4j - 1.2.14 - provided - - - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - junit junit @@ -65,11 +41,6 @@ - - org.jboss.logging - jboss-logging - 3.1.4.GA - jboss jbosssx diff --git a/services/authorization/service/src/main/java/org/collectionspace/services/authorization/AuthZ.java b/services/authorization/service/src/main/java/org/collectionspace/services/authorization/AuthZ.java index d37156b86..1d18a994e 100644 --- a/services/authorization/service/src/main/java/org/collectionspace/services/authorization/AuthZ.java +++ b/services/authorization/service/src/main/java/org/collectionspace/services/authorization/AuthZ.java @@ -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 gauths = new HashSet(); 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 grantedAuthorities = new HashSet(); grantedAuthorities.add(new SimpleGrantedAuthority(AuthN.ROLE_SPRING_ADMIN_NAME)); - + HashSet tenantSet = new HashSet(); 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()) { diff --git a/services/authorization/service/src/main/java/org/collectionspace/services/authorization/spring/SpringAuthorizationProvider.java b/services/authorization/service/src/main/java/org/collectionspace/services/authorization/spring/SpringAuthorizationProvider.java index 5afd0f01a..bfbd3826f 100644 --- a/services/authorization/service/src/main/java/org/collectionspace/services/authorization/spring/SpringAuthorizationProvider.java +++ b/services/authorization/service/src/main/java/org/collectionspace/services/authorization/spring/SpringAuthorizationProvider.java @@ -24,13 +24,13 @@ 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 diff --git a/services/authorization/service/src/main/java/org/collectionspace/services/authorization/spring/SpringPermissionEvaluator.java b/services/authorization/service/src/main/java/org/collectionspace/services/authorization/spring/SpringPermissionEvaluator.java index c04449e0e..9407d4dfe 100644 --- a/services/authorization/service/src/main/java/org/collectionspace/services/authorization/spring/SpringPermissionEvaluator.java +++ b/services/authorization/service/src/main/java/org/collectionspace/services/authorization/spring/SpringPermissionEvaluator.java @@ -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; } - + } diff --git a/services/authorization/service/src/main/java/org/collectionspace/services/authorization/spring/SpringPermissionManager.java b/services/authorization/service/src/main/java/org/collectionspace/services/authorization/spring/SpringPermissionManager.java index ef2b1074f..d95d0bf34 100644 --- a/services/authorization/service/src/main/java/org/collectionspace/services/authorization/spring/SpringPermissionManager.java +++ b/services/authorization/service/src/main/java/org/collectionspace/services/authorization/spring/SpringPermissionManager.java @@ -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 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 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); } diff --git a/services/batch/client/pom.xml b/services/batch/client/pom.xml index edbbfb9fd..8e977d900 100644 --- a/services/batch/client/pom.xml +++ b/services/batch/client/pom.xml @@ -13,17 +13,6 @@ services.batch.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/blob/client/pom.xml b/services/blob/client/pom.xml index eb5f6dcae..aba3397d7 100644 --- a/services/blob/client/pom.xml +++ b/services/blob/client/pom.xml @@ -14,22 +14,17 @@ - org.nuxeo.ecm.core - nuxeo-core-storage-sql-management - ${nuxeo.general.release} + org.nuxeo.ecm.core + nuxeo-core-storage-sql-management + ${nuxeo.general.release} + + + org.slf4j + slf4j-log4j12 + + - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/citation/client/pom.xml b/services/citation/client/pom.xml index 7baeb2f6b..054911d66 100644 --- a/services/citation/client/pom.xml +++ b/services/citation/client/pom.xml @@ -13,15 +13,6 @@ services.citation.client - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services diff --git a/services/citation/service/pom.xml b/services/citation/service/pom.xml index 9c03e907f..ce3236003 100644 --- a/services/citation/service/pom.xml +++ b/services/citation/service/pom.xml @@ -12,14 +12,6 @@ jar - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services @@ -57,12 +49,6 @@ commons-beanutils 1.6.1 - - - commons-logging - commons-logging - 1.1 - diff --git a/services/claim/client/pom.xml b/services/claim/client/pom.xml index 7c053f0c0..4115c51d5 100644 --- a/services/claim/client/pom.xml +++ b/services/claim/client/pom.xml @@ -14,17 +14,6 @@ services.claim.client - - - org.slf4j - slf4j-api - provided - - - org.slf4j - slf4j-log4j12 - provided - org.collectionspace.services diff --git a/services/client/pom.xml b/services/client/pom.xml index 010f256bd..64fea04c3 100644 --- a/services/client/pom.xml +++ b/services/client/pom.xml @@ -12,17 +12,6 @@ jar - - org.slf4j - slf4j-api - provided - - - org.slf4j - slf4j-log4j12 - provided - - @@ -74,12 +63,6 @@ org.jboss.resteasy resteasy-multipart-provider - - org.jboss.logging - jboss-logging - 3.1.4.GA - runtime - diff --git a/services/client/src/main/java/org/collectionspace/services/client/PoxPayload.java b/services/client/src/main/java/org/collectionspace/services/client/PoxPayload.java index be355ba21..6661db227 100644 --- a/services/client/src/main/java/org/collectionspace/services/client/PoxPayload.java +++ b/services/client/src/main/java/org/collectionspace/services/client/PoxPayload.java @@ -35,51 +35,51 @@ import org.slf4j.LoggerFactory; * * @param the generic type */ -public abstract class PoxPayload { - +public abstract class PoxPayload { + /** 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 parts = new ArrayList(); - + // Valid root element labels - private static Set validRootElementLabels = new HashSet(Arrays.asList(DOCUMENT_ROOT_ELEMENT_LABEL, + private static Set validRootElementLabels = new HashSet(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 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 { } parseParts(); } - + /** * Creates and returns an XML string representation of ourself. * @@ -102,27 +102,27 @@ public abstract class PoxPayload { 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 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 { } } 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 { 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 { 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 { * @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 { * @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 { 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 { } } } - + /** * Gets the name of the payload. * @@ -211,7 +211,7 @@ public abstract class PoxPayload { 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 { public Document getDOMDocument() { return this.domDocument; } - + /** * Gets the xml text. * @@ -229,7 +229,7 @@ public abstract class PoxPayload { public String getXmlPayload() { return xmlPayload; } - + /** * Gets the POX part with name match 'label'. * @@ -250,7 +250,7 @@ public abstract class PoxPayload { } return result; } - + public List getParts(String label) { List result = new ArrayList(); if (parts != null) { @@ -262,10 +262,10 @@ public abstract class PoxPayload { } } } - + return result; - } - + } + /** * Gets a list of the POX parts. * @@ -274,16 +274,16 @@ public abstract class PoxPayload { public List getParts() { return parts; } - + /** * Set a new set of parts. - * + * * @param newParts */ public void setParts(ArrayList 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 { 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 { parts.add(entity); return entity; } - + /** * Removes a POX part from our list of parts * @param entity @@ -314,7 +314,7 @@ public abstract class PoxPayload { 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 { 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 { 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 { 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 { Document doc = DocumentHelper.parseText(xmlPayload); result = doc.getRootElement(); //FIXME: REM - .detach(); return result; - } - - + } + + } diff --git a/services/collectionobject/client/pom.xml b/services/collectionobject/client/pom.xml index ef96a4959..cba18e106 100644 --- a/services/collectionobject/client/pom.xml +++ b/services/collectionobject/client/pom.xml @@ -13,15 +13,6 @@ services.collectionobject.client - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services diff --git a/services/collectionobject/service/pom.xml b/services/collectionobject/service/pom.xml index 301cf8b58..8a7938511 100644 --- a/services/collectionobject/service/pom.xml +++ b/services/collectionobject/service/pom.xml @@ -12,14 +12,6 @@ jar - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services @@ -72,12 +64,6 @@ commons-beanutils 1.6.1 - - - commons-logging - commons-logging - 1.1 - diff --git a/services/common-api/pom.xml b/services/common-api/pom.xml index cf99972da..10f4ba8c7 100644 --- a/services/common-api/pom.xml +++ b/services/common-api/pom.xml @@ -27,18 +27,6 @@ name-parser-api 3.1 - - org.slf4j - slf4j-api - provided - - - - org.slf4j - slf4j-log4j12 - provided - - org.testng testng @@ -53,4 +41,3 @@ - diff --git a/services/common-test/pom.xml b/services/common-test/pom.xml index 62014254f..4e1e06899 100644 --- a/services/common-test/pom.xml +++ b/services/common-test/pom.xml @@ -14,17 +14,6 @@ jar - - org.slf4j - slf4j-api - provided - - - org.slf4j - slf4j-log4j12 - provided - - org.collectionspace.services org.collectionspace.services.jaxb 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 index 1d425cf7d..000000000 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 index 000000000..b92163197 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 index 04cabc8d2..000000000 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 index 000000000..c0feb2332 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 index c4dcdb5d1..000000000 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 index 000000000..088263c72 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 index 000000000..d142e6a58 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 index ff4fddd69..000000000 Binary files a/services/common/lib/slf4j/slf4j-log4j12-1.7.21.jar and /dev/null differ diff --git a/services/common/pom.xml b/services/common/pom.xml index e9809df00..795355272 100644 --- a/services/common/pom.xml +++ b/services/common/pom.xml @@ -129,22 +129,6 @@ 1.0.7 - - org.slf4j - slf4j-api - provided - - - org.slf4j - slf4j-log4j12 - provided - - - log4j - log4j - 1.2.14 - provided - org.apache.commons commons-jexl @@ -355,8 +339,6 @@ ch.elca.el4j.modules module-xml_merge-common - 3.1 - provided commons-io diff --git a/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/ImagePlugin.javax b/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/ImagePlugin.javax index a3f3b528d..2d7d8dbff 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/ImagePlugin.javax +++ b/services/common/src/main/java/org/collectionspace/services/common/imaging/nuxeo/ImagePlugin.javax @@ -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 +*/ diff --git a/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JPATransactionContext.java b/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JPATransactionContext.java index dbdf2483a..4fb2cebab 100644 --- a/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JPATransactionContext.java +++ b/services/common/src/main/java/org/collectionspace/services/common/storage/jpa/JPATransactionContext.java @@ -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(); diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/util/ReindexFulltextRoot.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/util/ReindexFulltextRoot.java index 2ea74bc2d..2458da608 100644 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/util/ReindexFulltextRoot.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/util/ReindexFulltextRoot.java @@ -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 { diff --git a/services/concept/client/pom.xml b/services/concept/client/pom.xml index fe718df22..9525e0920 100644 --- a/services/concept/client/pom.xml +++ b/services/concept/client/pom.xml @@ -13,15 +13,6 @@ services.concept.client - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services diff --git a/services/concept/service/pom.xml b/services/concept/service/pom.xml index 82a24d814..a09a02b2d 100644 --- a/services/concept/service/pom.xml +++ b/services/concept/service/pom.xml @@ -12,14 +12,6 @@ jar - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services @@ -62,12 +54,6 @@ commons-beanutils 1.6.1 - - - commons-logging - commons-logging - 1.1 - diff --git a/services/conditioncheck/client/pom.xml b/services/conditioncheck/client/pom.xml index b2018f225..9f58d2302 100644 --- a/services/conditioncheck/client/pom.xml +++ b/services/conditioncheck/client/pom.xml @@ -13,17 +13,6 @@ services.conditioncheck.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/config/pom.xml b/services/config/pom.xml index 4522d2f82..6a413d742 100644 --- a/services/config/pom.xml +++ b/services/config/pom.xml @@ -12,29 +12,9 @@ jar - - org.slf4j - slf4j-api - provided - - - - org.slf4j - slf4j-log4j12 - provided - - ch.elca.el4j.modules module-xml_merge-common - 3.1 - provided - - - xml-apis - xml-apis - - diff --git a/services/conservation/client/pom.xml b/services/conservation/client/pom.xml index 5099ee705..2f3b35173 100644 --- a/services/conservation/client/pom.xml +++ b/services/conservation/client/pom.xml @@ -13,17 +13,6 @@ services.conservation.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/contact/client/pom.xml b/services/contact/client/pom.xml index 6967e5b27..5e758de77 100644 --- a/services/contact/client/pom.xml +++ b/services/contact/client/pom.xml @@ -13,15 +13,6 @@ services.contact.client - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services diff --git a/services/dimension/client/pom.xml b/services/dimension/client/pom.xml index aecc63d93..57e8dcc42 100644 --- a/services/dimension/client/pom.xml +++ b/services/dimension/client/pom.xml @@ -14,15 +14,6 @@ services.dimension.client - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services diff --git a/services/dimension/pom.xml b/services/dimension/pom.xml index 2d45f5956..d7b572dcc 100644 --- a/services/dimension/pom.xml +++ b/services/dimension/pom.xml @@ -13,24 +13,11 @@ services.dimension pom - - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - - - jaxb service 3rdparty client - - + diff --git a/services/exhibition/client/pom.xml b/services/exhibition/client/pom.xml index 83488f2e5..7921ae899 100644 --- a/services/exhibition/client/pom.xml +++ b/services/exhibition/client/pom.xml @@ -14,17 +14,6 @@ services.exhibition.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/group/client/pom.xml b/services/group/client/pom.xml index 6baeca603..cb6bc5ce9 100644 --- a/services/group/client/pom.xml +++ b/services/group/client/pom.xml @@ -13,17 +13,6 @@ services.group.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/id/pom.xml b/services/id/pom.xml index 4b449d13c..e6b17faac 100644 --- a/services/id/pom.xml +++ b/services/id/pom.xml @@ -2,16 +2,16 @@ @@ -25,25 +25,12 @@ org.collectionspace.services.main ${revision} - + 4.0.0 org.collectionspace.services.id services.id pom - - - - org.slf4j - slf4j-api - provided - - - org.slf4j - slf4j-log4j12 - provided - - - + @@ -52,5 +39,3 @@ - - diff --git a/services/imports/service/pom.xml b/services/imports/service/pom.xml index c79875f3f..e0dba3e2d 100644 --- a/services/imports/service/pom.xml +++ b/services/imports/service/pom.xml @@ -92,9 +92,15 @@ ${nuxeo.shell.version} - org.nuxeo.ecm.platform - nuxeo-importer-core - ${nuxeo.platform.version} + org.nuxeo.ecm.platform + nuxeo-importer-core + ${nuxeo.platform.version} + + + org.slf4j + slf4j-log4j12 + + org.nuxeo.ecm.platform diff --git a/services/imports/service/src/main/java/org/collectionspace/services/imports/ImportsResource.java b/services/imports/service/src/main/java/org/collectionspace/services/imports/ImportsResource.java index 361bb37a5..04973aca7 100644 --- a/services/imports/service/src/main/java/org/collectionspace/services/imports/ImportsResource.java +++ b/services/imports/service/src/main/java/org/collectionspace/services/imports/ImportsResource.java @@ -81,8 +81,8 @@ import org.xml.sax.InputSource; @Produces({ "application/xml" }) @Consumes({ "application/xml" }) public class ImportsResource extends AbstractCollectionSpaceResourceImpl { - - 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 repositoryDomainList = getRepositoryDomainList(); @@ -130,7 +130,7 @@ public class ImportsResource extends AbstractCollectionSpaceResourceImpl getRepositoryDomainList() throws ConfigurationException { TenantBindingConfigReaderImpl tReader = ServiceMain.getInstance() .getTenantBindingConfigReader(); @@ -140,7 +140,7 @@ public class ImportsResource extends AbstractCollectionSpaceResourceImpl 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 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> partsMap = partFormData.getFormDataMap(); List fileParts = partsMap.get("file"); for (InputPart part : fileParts) { @@ -470,14 +470,14 @@ public class ImportsResource extends AbstractCollectionSpaceResourceImplservices.index.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/intake/client/pom.xml b/services/intake/client/pom.xml index 5aff6ee78..e066409ce 100644 --- a/services/intake/client/pom.xml +++ b/services/intake/client/pom.xml @@ -13,17 +13,6 @@ services.intake.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/loanin/client/pom.xml b/services/loanin/client/pom.xml index e1d3b0b50..494d55510 100644 --- a/services/loanin/client/pom.xml +++ b/services/loanin/client/pom.xml @@ -13,17 +13,6 @@ services.loanin.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/loanout/client/pom.xml b/services/loanout/client/pom.xml index 2ec8bc1db..53875c5b4 100644 --- a/services/loanout/client/pom.xml +++ b/services/loanout/client/pom.xml @@ -13,17 +13,6 @@ services.loanout.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/location/client/pom.xml b/services/location/client/pom.xml index 11515a9e4..7f6a1120c 100644 --- a/services/location/client/pom.xml +++ b/services/location/client/pom.xml @@ -13,15 +13,6 @@ services.location.client - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services diff --git a/services/location/service/pom.xml b/services/location/service/pom.xml index d5809cfc9..bff1a3974 100644 --- a/services/location/service/pom.xml +++ b/services/location/service/pom.xml @@ -12,14 +12,6 @@ jar - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services @@ -62,12 +54,6 @@ commons-beanutils 1.6.1 - - - commons-logging - commons-logging - 1.1 - diff --git a/services/material/client/pom.xml b/services/material/client/pom.xml index 0a30eb100..2399a75ca 100644 --- a/services/material/client/pom.xml +++ b/services/material/client/pom.xml @@ -13,15 +13,6 @@ services.material.client - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services diff --git a/services/material/service/pom.xml b/services/material/service/pom.xml index 0ffefa3cf..da1b95b01 100644 --- a/services/material/service/pom.xml +++ b/services/material/service/pom.xml @@ -12,14 +12,6 @@ jar - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services @@ -58,12 +50,6 @@ commons-beanutils 1.6.1 - - - commons-logging - commons-logging - 1.1 - diff --git a/services/media/client/pom.xml b/services/media/client/pom.xml index bd82c68fc..638fd7043 100644 --- a/services/media/client/pom.xml +++ b/services/media/client/pom.xml @@ -13,17 +13,6 @@ services.media.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/movement/client/pom.xml b/services/movement/client/pom.xml index 061ac16e5..9bbb016ea 100644 --- a/services/movement/client/pom.xml +++ b/services/movement/client/pom.xml @@ -13,17 +13,6 @@ services.movement.client - - - org.slf4j - slf4j-api - provided - - - org.slf4j - slf4j-log4j12 - provided - org.collectionspace.services diff --git a/services/note/client/pom.xml b/services/note/client/pom.xml index 18cfef5d1..ada93e07a 100644 --- a/services/note/client/pom.xml +++ b/services/note/client/pom.xml @@ -13,15 +13,6 @@ services.note.client - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services diff --git a/services/objectexit/client/pom.xml b/services/objectexit/client/pom.xml index 4b48f494b..d4b5c625f 100644 --- a/services/objectexit/client/pom.xml +++ b/services/objectexit/client/pom.xml @@ -13,17 +13,6 @@ services.objectexit.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/organization/client/pom.xml b/services/organization/client/pom.xml index 7bac49ec0..9bb867652 100644 --- a/services/organization/client/pom.xml +++ b/services/organization/client/pom.xml @@ -13,17 +13,6 @@ services.organization.client - - - org.slf4j - slf4j-api - provided - - - org.slf4j - slf4j-log4j12 - provided - org.collectionspace.services diff --git a/services/organization/service/pom.xml b/services/organization/service/pom.xml index 433160f1c..96e83888a 100644 --- a/services/organization/service/pom.xml +++ b/services/organization/service/pom.xml @@ -12,14 +12,6 @@ jar - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services @@ -63,12 +55,6 @@ commons-beanutils 1.6.1 - - - commons-logging - commons-logging - 1.1 - diff --git a/services/osteology/client/pom.xml b/services/osteology/client/pom.xml index 7eab78bba..e72244bec 100644 --- a/services/osteology/client/pom.xml +++ b/services/osteology/client/pom.xml @@ -13,17 +13,6 @@ services.osteology.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/person/client/pom.xml b/services/person/client/pom.xml index 160a2ef57..4b423940f 100644 --- a/services/person/client/pom.xml +++ b/services/person/client/pom.xml @@ -13,15 +13,6 @@ services.person.client - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services diff --git a/services/person/service/pom.xml b/services/person/service/pom.xml index f46078178..eab328713 100644 --- a/services/person/service/pom.xml +++ b/services/person/service/pom.xml @@ -12,14 +12,6 @@ jar - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services @@ -62,12 +54,6 @@ commons-beanutils 1.6.1 - - - commons-logging - commons-logging - 1.1 - diff --git a/services/place/client/pom.xml b/services/place/client/pom.xml index 9284740ce..95f8b4d3a 100644 --- a/services/place/client/pom.xml +++ b/services/place/client/pom.xml @@ -13,15 +13,6 @@ services.place.client - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services diff --git a/services/place/service/pom.xml b/services/place/service/pom.xml index 4e0e5b99c..4fc72012e 100644 --- a/services/place/service/pom.xml +++ b/services/place/service/pom.xml @@ -12,14 +12,6 @@ jar - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services @@ -58,12 +50,6 @@ commons-beanutils 1.6.1 - - - commons-logging - commons-logging - 1.1 - diff --git a/services/pom.xml b/services/pom.xml index e1616f449..1865c8c6b 100644 --- a/services/pom.xml +++ b/services/pom.xml @@ -104,13 +104,24 @@ testng test + + org.slf4j + slf4j-api + + + org.apache.logging.log4j + log4j-slf4j-impl + + + org.apache.logging.log4j + log4j-api + + + org.apache.logging.log4j + log4j-core + - - - - - diff --git a/services/pottag/client/pom.xml b/services/pottag/client/pom.xml index 618bedfd0..18cc3e554 100644 --- a/services/pottag/client/pom.xml +++ b/services/pottag/client/pom.xml @@ -14,17 +14,6 @@ services.pottag.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/propagation/client/pom.xml b/services/propagation/client/pom.xml index a95f5577b..802774a85 100644 --- a/services/propagation/client/pom.xml +++ b/services/propagation/client/pom.xml @@ -13,17 +13,6 @@ services.propagation.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/publicitem/client/pom.xml b/services/publicitem/client/pom.xml index 992dc68ff..5eef9a365 100644 --- a/services/publicitem/client/pom.xml +++ b/services/publicitem/client/pom.xml @@ -13,17 +13,6 @@ services.publicitem.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/query/service/pom.xml b/services/query/service/pom.xml index 203666981..116181ec5 100644 --- a/services/query/service/pom.xml +++ b/services/query/service/pom.xml @@ -13,14 +13,6 @@ services.query.service - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services org.collectionspace.services.common @@ -36,13 +28,6 @@ commons-beanutils 1.6.1 - - - commons-logging - commons-logging - 1.1 - - diff --git a/services/relation/client/pom.xml b/services/relation/client/pom.xml index 64d0d6252..96e89ab94 100644 --- a/services/relation/client/pom.xml +++ b/services/relation/client/pom.xml @@ -13,17 +13,6 @@ services.relation.client - - - org.slf4j - slf4j-api - provided - - - org.slf4j - slf4j-log4j12 - provided - org.collectionspace.services diff --git a/services/report/client/pom.xml b/services/report/client/pom.xml index bdea4a4fd..c14b8d635 100644 --- a/services/report/client/pom.xml +++ b/services/report/client/pom.xml @@ -13,17 +13,6 @@ services.report.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/security/client/pom.xml b/services/security/client/pom.xml index 5b8f57ff5..e7dee9f82 100644 --- a/services/security/client/pom.xml +++ b/services/security/client/pom.xml @@ -13,17 +13,6 @@ services.security.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/servicegroup/client/pom.xml b/services/servicegroup/client/pom.xml index 1f07479ec..14f5d3db5 100644 --- a/services/servicegroup/client/pom.xml +++ b/services/servicegroup/client/pom.xml @@ -13,17 +13,6 @@ services.servicegroup.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/structureddate/client/pom.xml b/services/structureddate/client/pom.xml index ff1cbbca0..278020446 100644 --- a/services/structureddate/client/pom.xml +++ b/services/structureddate/client/pom.xml @@ -13,18 +13,6 @@ services.structureddate.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - - diff --git a/services/structureddate/structureddate/pom.xml b/services/structureddate/structureddate/pom.xml index 51f51a891..5109f3215 100644 --- a/services/structureddate/structureddate/pom.xml +++ b/services/structureddate/structureddate/pom.xml @@ -12,16 +12,6 @@ jar - - org.slf4j - slf4j-api - provided - - - org.slf4j - slf4j-log4j12 - provided - org.testng testng diff --git a/services/systeminfo/client/pom.xml b/services/systeminfo/client/pom.xml index b8d344684..8d200e0fb 100644 --- a/services/systeminfo/client/pom.xml +++ b/services/systeminfo/client/pom.xml @@ -13,18 +13,6 @@ services.systeminfo.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - - diff --git a/services/taxonomy/client/pom.xml b/services/taxonomy/client/pom.xml index 137b90bfc..4f49883c9 100644 --- a/services/taxonomy/client/pom.xml +++ b/services/taxonomy/client/pom.xml @@ -13,15 +13,6 @@ services.taxonomy.client - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services diff --git a/services/taxonomy/service/pom.xml b/services/taxonomy/service/pom.xml index b88a19908..5e63fa43c 100644 --- a/services/taxonomy/service/pom.xml +++ b/services/taxonomy/service/pom.xml @@ -12,14 +12,6 @@ jar - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services @@ -57,12 +49,6 @@ commons-beanutils 1.6.1 - - - commons-logging - commons-logging - 1.1 - diff --git a/services/uoc/client/pom.xml b/services/uoc/client/pom.xml index 8f5310f19..05e8bd37a 100644 --- a/services/uoc/client/pom.xml +++ b/services/uoc/client/pom.xml @@ -13,17 +13,6 @@ services.uoc.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/valuationcontrol/client/pom.xml b/services/valuationcontrol/client/pom.xml index 057606781..55372ae4b 100644 --- a/services/valuationcontrol/client/pom.xml +++ b/services/valuationcontrol/client/pom.xml @@ -13,17 +13,6 @@ services.valuationcontrol.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services diff --git a/services/vocabulary/client/pom.xml b/services/vocabulary/client/pom.xml index e3b9a5eaf..88bfddf69 100644 --- a/services/vocabulary/client/pom.xml +++ b/services/vocabulary/client/pom.xml @@ -14,15 +14,6 @@ services.vocabulary.client - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services diff --git a/services/vocabulary/service/pom.xml b/services/vocabulary/service/pom.xml index a9e28b2d6..6b13d244d 100644 --- a/services/vocabulary/service/pom.xml +++ b/services/vocabulary/service/pom.xml @@ -12,14 +12,6 @@ jar - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services @@ -63,12 +55,6 @@ commons-beanutils 1.6.1 - - - commons-logging - commons-logging - 1.1 - diff --git a/services/work/client/pom.xml b/services/work/client/pom.xml index d2f445a2c..0de9ea937 100644 --- a/services/work/client/pom.xml +++ b/services/work/client/pom.xml @@ -13,15 +13,6 @@ services.work.client - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services diff --git a/services/work/service/pom.xml b/services/work/service/pom.xml index 2472ff268..4f59cab7b 100644 --- a/services/work/service/pom.xml +++ b/services/work/service/pom.xml @@ -12,14 +12,6 @@ jar - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - org.collectionspace.services @@ -58,12 +50,6 @@ commons-beanutils 1.6.1 - - - commons-logging - commons-logging - 1.1 - diff --git a/services/workflow/client/pom.xml b/services/workflow/client/pom.xml index 76fc82008..e4c171da4 100644 --- a/services/workflow/client/pom.xml +++ b/services/workflow/client/pom.xml @@ -13,17 +13,6 @@ services.workflow.client - - - org.slf4j - slf4j-api - test - - - org.slf4j - slf4j-log4j12 - test - org.collectionspace.services