mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Fixed major issues ("Loose coupling") reported in Sonar
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@71960 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -23,6 +23,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import net.sf.acegisecurity.Authentication;
|
import net.sf.acegisecurity.Authentication;
|
||||||
import net.sf.acegisecurity.ConfigAttribute;
|
import net.sf.acegisecurity.ConfigAttribute;
|
||||||
@@ -59,7 +60,7 @@ public class RMEntryVoter extends RMSecurityCommon
|
|||||||
private CapabilityService capabilityService;
|
private CapabilityService capabilityService;
|
||||||
|
|
||||||
/** Policy map */
|
/** Policy map */
|
||||||
private HashMap<String, Policy> policies = new HashMap<String, Policy>();
|
private Map<String, Policy> policies = new HashMap<String, Policy>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param capabilityService capability service
|
* @param capabilityService capability service
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
package org.alfresco.module.org_alfresco_module_rm.capability.policy;
|
package org.alfresco.module.org_alfresco_module_rm.capability.policy;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import net.sf.acegisecurity.ConfigAttribute;
|
import net.sf.acegisecurity.ConfigAttribute;
|
||||||
@@ -40,19 +41,19 @@ public class ConfigAttributeDefinition
|
|||||||
public static final String RM_CAP = "RM_CAP";
|
public static final String RM_CAP = "RM_CAP";
|
||||||
public static final String RM_ABSTAIN = "RM_ABSTAIN";
|
public static final String RM_ABSTAIN = "RM_ABSTAIN";
|
||||||
public static final String RM_QUERY = "RM_QUERY";
|
public static final String RM_QUERY = "RM_QUERY";
|
||||||
|
|
||||||
private String typeString;
|
private String typeString;
|
||||||
|
|
||||||
private String policyName;
|
private String policyName;
|
||||||
|
|
||||||
private SimplePermissionReference required;
|
private SimplePermissionReference required;
|
||||||
|
|
||||||
private HashMap<Integer, Integer> parameters = new HashMap<Integer, Integer>(2, 1.0f);
|
private Map<Integer, Integer> parameters = new HashMap<Integer, Integer>(2, 1.0f);
|
||||||
|
|
||||||
private boolean parent = false;
|
private boolean parent = false;
|
||||||
|
|
||||||
public ConfigAttributeDefinition(ConfigAttribute attr, NamespacePrefixResolver namespacePrefixResolver)
|
public ConfigAttributeDefinition(ConfigAttribute attr, NamespacePrefixResolver namespacePrefixResolver)
|
||||||
{
|
{
|
||||||
StringTokenizer st = new StringTokenizer(attr.getAttribute(), ".", false);
|
StringTokenizer st = new StringTokenizer(attr.getAttribute(), ".", false);
|
||||||
if (st.countTokens() < 1)
|
if (st.countTokens() < 1)
|
||||||
{
|
{
|
||||||
@@ -97,27 +98,27 @@ public class ConfigAttributeDefinition
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTypeString()
|
public String getTypeString()
|
||||||
{
|
{
|
||||||
return typeString;
|
return typeString;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPolicyName()
|
public String getPolicyName()
|
||||||
{
|
{
|
||||||
return policyName;
|
return policyName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimplePermissionReference getRequired()
|
public SimplePermissionReference getRequired()
|
||||||
{
|
{
|
||||||
return required;
|
return required;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<Integer, Integer> getParameters()
|
public Map<Integer, Integer> getParameters()
|
||||||
{
|
{
|
||||||
return parameters;
|
return parameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isParent()
|
public boolean isParent()
|
||||||
{
|
{
|
||||||
return parent;
|
return parent;
|
||||||
|
@@ -20,6 +20,7 @@ package org.alfresco.module.org_alfresco_module_rm.fileplan;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Deque;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
@@ -375,7 +376,7 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* Helper method to build a <b>NodeRef</b> path from the node to the RM root
|
* Helper method to build a <b>NodeRef</b> path from the node to the RM root
|
||||||
*/
|
*/
|
||||||
private void getNodeRefPathRecursive(NodeRef nodeRef, LinkedList<NodeRef> nodeRefPath)
|
private void getNodeRefPathRecursive(NodeRef nodeRef, Deque<NodeRef> nodeRefPath)
|
||||||
{
|
{
|
||||||
if (!isFilePlanComponent(nodeRef))
|
if (!isFilePlanComponent(nodeRef))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user