mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed major issues (Preserve Stack Trace) reported in Sonar
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@89724 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -73,7 +73,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
{
|
{
|
||||||
/** Logger */
|
/** Logger */
|
||||||
private static Log logger = LogFactory.getLog(HoldServiceImpl.class);
|
private static Log logger = LogFactory.getLog(HoldServiceImpl.class);
|
||||||
|
|
||||||
/** Audit event keys */
|
/** Audit event keys */
|
||||||
private static final String AUDIT_ADD_TO_HOLD = "addToHold";
|
private static final String AUDIT_ADD_TO_HOLD = "addToHold";
|
||||||
private static final String AUDIT_REMOVE_FROM_HOLD = "removeFromHold";
|
private static final String AUDIT_REMOVE_FROM_HOLD = "removeFromHold";
|
||||||
@@ -89,7 +89,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
|
|
||||||
/** Permission service */
|
/** Permission service */
|
||||||
private PermissionService permissionService;
|
private PermissionService permissionService;
|
||||||
|
|
||||||
/** records management audit service */
|
/** records management audit service */
|
||||||
private RecordsManagementAuditService recordsManagementAuditService;
|
private RecordsManagementAuditService recordsManagementAuditService;
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
{
|
{
|
||||||
this.permissionService = permissionService;
|
this.permissionService = permissionService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param recordsManagementAuditService records management audit service
|
* @param recordsManagementAuditService records management audit service
|
||||||
*/
|
*/
|
||||||
@@ -150,7 +150,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
{
|
{
|
||||||
this.recordsManagementAuditService = recordsManagementAuditService;
|
this.recordsManagementAuditService = recordsManagementAuditService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialise hold service
|
* Initialise hold service
|
||||||
*/
|
*/
|
||||||
@@ -256,7 +256,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
for (ChildAssociationRef holdAssoc : holdsAssocs)
|
for (ChildAssociationRef holdAssoc : holdsAssocs)
|
||||||
{
|
{
|
||||||
NodeRef hold = holdAssoc.getChildRef();
|
NodeRef hold = holdAssoc.getChildRef();
|
||||||
if (isHold(hold))
|
if (isHold(hold))
|
||||||
{
|
{
|
||||||
// add to list of holds
|
// add to list of holds
|
||||||
holds.add(hold);
|
holds.add(hold);
|
||||||
@@ -471,7 +471,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
}
|
}
|
||||||
catch (AccessDeniedException ade)
|
catch (AccessDeniedException ade)
|
||||||
{
|
{
|
||||||
throw new AlfrescoRuntimeException("Can't delete hold, because you don't have filling permissions on all the items held within the hold.");
|
throw new AlfrescoRuntimeException("Can't delete hold, because you don't have filling permissions on all the items held within the hold.", ade);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -586,7 +586,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
|
|
||||||
// Link the record to the hold
|
// Link the record to the hold
|
||||||
nodeService.addChild(hold, nodeRef, ASSOC_FROZEN_RECORDS, ASSOC_FROZEN_RECORDS);
|
nodeService.addChild(hold, nodeRef, ASSOC_FROZEN_RECORDS, ASSOC_FROZEN_RECORDS);
|
||||||
|
|
||||||
// audit item being added to the hold
|
// audit item being added to the hold
|
||||||
recordsManagementAuditService.auditEvent(nodeRef, AUDIT_ADD_TO_HOLD);
|
recordsManagementAuditService.auditEvent(nodeRef, AUDIT_ADD_TO_HOLD);
|
||||||
|
|
||||||
@@ -691,14 +691,14 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
{
|
{
|
||||||
// remove from hold
|
// remove from hold
|
||||||
nodeService.removeChild(hold, nodeRef);
|
nodeService.removeChild(hold, nodeRef);
|
||||||
|
|
||||||
// audit that the node has been remove from the hold
|
// audit that the node has been remove from the hold
|
||||||
// TODO add details of the hold that the node was removed from
|
// TODO add details of the hold that the node was removed from
|
||||||
recordsManagementAuditService.auditEvent(nodeRef, AUDIT_REMOVE_FROM_HOLD);
|
recordsManagementAuditService.auditEvent(nodeRef, AUDIT_REMOVE_FROM_HOLD);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -267,7 +267,7 @@ public final class WebScriptUtils
|
|||||||
}
|
}
|
||||||
catch (JSONException error)
|
catch (JSONException error)
|
||||||
{
|
{
|
||||||
throw new WebScriptException(Status.STATUS_BAD_REQUEST, "Could not put the key '" + key + "' with the value '" + value + "' to the json object.");
|
throw new WebScriptException(Status.STATUS_BAD_REQUEST, "Could not put the key '" + key + "' with the value '" + value + "' to the json object.", error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user