mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Fixed major issues reported by sonar (Unused formal parameter)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@64829 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -545,7 +545,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
|||||||
// Filter out any properties to be audited if specified in the Spring configuration.
|
// Filter out any properties to be audited if specified in the Spring configuration.
|
||||||
if (!ignoredAuditProperties.isEmpty())
|
if (!ignoredAuditProperties.isEmpty())
|
||||||
{
|
{
|
||||||
removeAuditProperties(ignoredAuditProperties, propertiesBefore, propertiesAfter);
|
removeAuditProperties(propertiesBefore, propertiesAfter);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Property changes
|
// Property changes
|
||||||
@@ -581,7 +581,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
|
|||||||
*
|
*
|
||||||
* @param properties
|
* @param properties
|
||||||
*/
|
*/
|
||||||
private void removeAuditProperties(List<String> ignoredAuditProperties, Map<QName, Serializable> before, Map<QName, Serializable> after)
|
private void removeAuditProperties(Map<QName, Serializable> before, Map<QName, Serializable> after)
|
||||||
{
|
{
|
||||||
if (before != null)
|
if (before != null)
|
||||||
{
|
{
|
||||||
|
@@ -118,19 +118,18 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JSONC
|
|||||||
|
|
||||||
if (isFilePlanComponent)
|
if (isFilePlanComponent)
|
||||||
{
|
{
|
||||||
rootJSONObject.put("rmNode", setRmNodeValues(nodeRef, rootJSONObject, useShortQNames));
|
rootJSONObject.put("rmNode", setRmNodeValues(nodeRef, useShortQNames));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param nodeRef
|
* @param nodeRef
|
||||||
* @param rootJSONObject
|
|
||||||
* @param useShortQName
|
* @param useShortQName
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private JSONObject setRmNodeValues(NodeRef nodeRef, JSONObject rootJSONObject, boolean useShortQName)
|
private JSONObject setRmNodeValues(NodeRef nodeRef, boolean useShortQName)
|
||||||
{
|
{
|
||||||
JSONObject rmNodeValues = new JSONObject();
|
JSONObject rmNodeValues = new JSONObject();
|
||||||
|
|
||||||
|
@@ -79,15 +79,6 @@ public class RMv21ReportServicePatch extends RMv21PatchComponent
|
|||||||
logger.debug(" ... adding template root folder");
|
logger.debug(" ... adding template root folder");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create report dir
|
|
||||||
NodeRef templateRoot = createNode(ContentModel.TYPE_FOLDER,
|
|
||||||
RM_CONFIG_FOLDER,
|
|
||||||
"rm_report_templates",
|
|
||||||
"Records Management Report Templates",
|
|
||||||
"rm_report_templates",
|
|
||||||
"Records Management Report Templates",
|
|
||||||
"Records management report templates.");
|
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
logger.debug(" ... adding destruction report template");
|
logger.debug(" ... adding destruction report template");
|
||||||
@@ -96,7 +87,6 @@ public class RMv21ReportServicePatch extends RMv21PatchComponent
|
|||||||
// create report templates
|
// create report templates
|
||||||
NodeRef destructionTemplate = createNode(
|
NodeRef destructionTemplate = createNode(
|
||||||
ContentModel.TYPE_CONTENT,
|
ContentModel.TYPE_CONTENT,
|
||||||
templateRoot,
|
|
||||||
"rmr_destructionReport",
|
"rmr_destructionReport",
|
||||||
"report_rmr_destructionReport.html.ftl",
|
"report_rmr_destructionReport.html.ftl",
|
||||||
"report_rmr_destructionReport.html.ftl",
|
"report_rmr_destructionReport.html.ftl",
|
||||||
@@ -114,7 +104,7 @@ public class RMv21ReportServicePatch extends RMv21PatchComponent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private NodeRef createNode(QName type, NodeRef parent, String id, String name, String assocName, String title, String description)
|
private NodeRef createNode(QName type, String id, String name, String assocName, String title, String description)
|
||||||
{
|
{
|
||||||
Map<QName, Serializable> props = new HashMap<QName, Serializable>(4);
|
Map<QName, Serializable> props = new HashMap<QName, Serializable>(4);
|
||||||
props.put(ContentModel.PROP_DESCRIPTION, description);
|
props.put(ContentModel.PROP_DESCRIPTION, description);
|
||||||
|
@@ -37,7 +37,7 @@ public class RMAuthorityDAOImpl extends AuthorityDAOImpl
|
|||||||
{
|
{
|
||||||
protected void addAuthorityNameIfMatches(Set<String> authorities, String authorityName, AuthorityType type)
|
protected void addAuthorityNameIfMatches(Set<String> authorities, String authorityName, AuthorityType type)
|
||||||
{
|
{
|
||||||
if (isAuthorityNameMatching(authorities, authorityName, type))
|
if (isAuthorityNameMatching(authorityName, type))
|
||||||
{
|
{
|
||||||
authorities.add(authorityName);
|
authorities.add(authorityName);
|
||||||
}
|
}
|
||||||
@@ -45,7 +45,7 @@ public class RMAuthorityDAOImpl extends AuthorityDAOImpl
|
|||||||
|
|
||||||
protected void addAuthorityNameIfMatches(Set<String> authorities, String authorityName, AuthorityType type, Pattern pattern)
|
protected void addAuthorityNameIfMatches(Set<String> authorities, String authorityName, AuthorityType type, Pattern pattern)
|
||||||
{
|
{
|
||||||
if (isAuthorityNameMatching(authorities, authorityName, type))
|
if (isAuthorityNameMatching(authorityName, type))
|
||||||
{
|
{
|
||||||
if (pattern == null)
|
if (pattern == null)
|
||||||
{
|
{
|
||||||
@@ -69,7 +69,7 @@ public class RMAuthorityDAOImpl extends AuthorityDAOImpl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isAuthorityNameMatching(Set<String> authorities, String authorityName, AuthorityType type)
|
private boolean isAuthorityNameMatching(String authorityName, AuthorityType type)
|
||||||
{
|
{
|
||||||
boolean isMatching = false;
|
boolean isMatching = false;
|
||||||
if (type == null || AuthorityType.getAuthorityType(authorityName).equals(type) && !getAuthorityZones(authorityName).contains("APP.RM"))
|
if (type == null || AuthorityType.getAuthorityType(authorityName).equals(type) && !getAuthorityZones(authorityName).contains("APP.RM"))
|
||||||
|
@@ -75,19 +75,17 @@ public class RmClassesGet extends DictionaryWebServiceBase implements RecordsMan
|
|||||||
*/
|
*/
|
||||||
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
||||||
{
|
{
|
||||||
return executeImpl(req, status, cache, RmDictionaryWebServiceUtils.isRmSite(req, siteService));
|
return executeImpl(req, RmDictionaryWebServiceUtils.isRmSite(req, siteService));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute custom Java logic
|
* Execute custom Java logic
|
||||||
*
|
*
|
||||||
* @param req Web Script request
|
* @param req Web Script request
|
||||||
* @param status Web Script status
|
|
||||||
* @param cache Web Script cache
|
|
||||||
* @param isRM indicates whether the request comes from an RM site or not
|
* @param isRM indicates whether the request comes from an RM site or not
|
||||||
* @return custom service model
|
* @return custom service model
|
||||||
*/
|
*/
|
||||||
private Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache, boolean isRM)
|
private Map<String, Object> executeImpl(WebScriptRequest req, boolean isRM)
|
||||||
{
|
{
|
||||||
String classFilter = getValidInput(req.getParameter(REQ_URL_TEMPL_VAR_CLASS_FILTER));
|
String classFilter = getValidInput(req.getParameter(REQ_URL_TEMPL_VAR_CLASS_FILTER));
|
||||||
String namespacePrefix = getValidInput(req.getParameter(REQ_URL_TEMPL_VAR_NAMESPACE_PREFIX));
|
String namespacePrefix = getValidInput(req.getParameter(REQ_URL_TEMPL_VAR_NAMESPACE_PREFIX));
|
||||||
|
@@ -66,19 +66,17 @@ public class RmPropertiesGet extends DictionaryWebServiceBase implements Records
|
|||||||
*/
|
*/
|
||||||
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
||||||
{
|
{
|
||||||
return executeImpl(req, status, cache, RmDictionaryWebServiceUtils.isRmSite(req, siteService));
|
return executeImpl(req, RmDictionaryWebServiceUtils.isRmSite(req, siteService));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute custom Java logic
|
* Execute custom Java logic
|
||||||
*
|
*
|
||||||
* @param req Web Script request
|
* @param req Web Script request
|
||||||
* @param status Web Script status
|
|
||||||
* @param cache Web Script cache
|
|
||||||
* @param isRM indicates whether the request comes from an RM site or not
|
* @param isRM indicates whether the request comes from an RM site or not
|
||||||
* @return custom service model
|
* @return custom service model
|
||||||
*/
|
*/
|
||||||
private Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache, boolean isRM)
|
private Map<String, Object> executeImpl(WebScriptRequest req, boolean isRM)
|
||||||
{
|
{
|
||||||
QName classQName = null;
|
QName classQName = null;
|
||||||
String className = req.getServiceMatch().getTemplateVars().get(DICTIONARY_CLASS_NAME);
|
String className = req.getServiceMatch().getTemplateVars().get(DICTIONARY_CLASS_NAME);
|
||||||
|
Reference in New Issue
Block a user