Commit de896e21 authored by cdanger's avatar cdanger

- Fixed issues report by Codacy

parent c00bee7a
......@@ -41,6 +41,13 @@ import org.ow2.authzforce.core.pdp.impl.BaseDecisionResult;
*/
public final class DenyOverridesAlg extends BaseCombiningAlg<Decidable>
{
/**
* The standard URIs used to identify this algorithm
*/
private static final String[] SUPPORTED_IDENTIFIERS = { "urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-overrides",
"urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-overrides", "urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:ordered-deny-overrides",
"urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:ordered-deny-overrides" };
private static class Evaluator implements CombiningAlg.Evaluator
{
......@@ -155,12 +162,10 @@ public final class DenyOverridesAlg extends BaseCombiningAlg<Decidable>
}
}
/**
* The standard URIs used to identify this algorithm
*/
private static final String[] SUPPORTED_IDENTIFIERS = { "urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-overrides",
"urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-overrides", "urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:ordered-deny-overrides",
"urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:ordered-deny-overrides" };
private DenyOverridesAlg(String algId)
{
super(algId, Decidable.class);
}
/**
* Supported algorithms
......@@ -177,11 +182,6 @@ public final class DenyOverridesAlg extends BaseCombiningAlg<Decidable>
SET = new CombiningAlgSet(algSet);
}
private DenyOverridesAlg(String algId)
{
super(algId, Decidable.class);
}
/** {@inheritDoc} */
@Override
public CombiningAlg.Evaluator getInstance(List<CombiningAlgParameter<? extends Decidable>> params, List<? extends Decidable> combinedElements) throws UnsupportedOperationException,
......
......@@ -38,6 +38,11 @@ import org.ow2.authzforce.core.pdp.impl.BaseDecisionResult;
*/
public final class DenyUnlessPermitAlg extends BaseCombiningAlg<Decidable>
{
/**
* The standard URIs used to identify this algorithm; first one is for policy combinging, second one for rule combining.
*/
private static final String[] SUPPORTED_IDENTIFIERS = { "urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-unless-permit",
"urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-unless-permit" };
private static class Evaluator implements CombiningAlg.Evaluator
{
......@@ -90,12 +95,6 @@ public final class DenyUnlessPermitAlg extends BaseCombiningAlg<Decidable>
return new Evaluator(combinedElements);
}
/**
* The standard URIs used to identify this algorithm; first one is for policy combinging, second one for rule combining.
*/
private static final String[] SUPPORTED_IDENTIFIERS = { "urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:deny-unless-permit",
"urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:deny-unless-permit" };
/**
* Supported algorithms
*/
......
......@@ -42,6 +42,14 @@ import org.ow2.authzforce.core.pdp.impl.BaseDecisionResult;
*/
public final class PermitOverridesAlg extends BaseCombiningAlg<Decidable>
{
/**
* The standard URN used to identify this algorithm
*/
private static final String[] SUPPORTED_IDENTIFIERS = { "urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:permit-overrides",
"urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-overrides", "urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:ordered-permit-overrides",
"urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:ordered-permit-overrides" };
private static class Evaluator implements CombiningAlg.Evaluator
{
......@@ -166,13 +174,6 @@ public final class PermitOverridesAlg extends BaseCombiningAlg<Decidable>
return new Evaluator(combinedElements);
}
/**
* The standard URN used to identify this algorithm
*/
private static final String[] SUPPORTED_IDENTIFIERS = { "urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:permit-overrides",
"urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-overrides", "urn:oasis:names:tc:xacml:3.0:policy-combining-algorithm:ordered-permit-overrides",
"urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:ordered-permit-overrides" };
/**
* Supported algorithms
*/
......
......@@ -51,7 +51,6 @@ public final class LogicalAndFunction extends SingleParameterTypedFirstOrderFunc
* XACML standard identifier for the "and" logical function
*/
public static final String NAME_AND = XACML_NS_1_0 + "and";
private static final String INVALID_ARG_TYPE_MESSAGE_PREFIX = "Function " + NAME_AND + ": Invalid type (expected = " + StandardDatatypes.BOOLEAN_FACTORY.getDatatype() + ") of arg#";
private static final String INDETERMINATE_ARG_MESSAGE_PREFIX = "Function " + NAME_AND + ": Indeterminate arg #";
......
......@@ -60,11 +60,6 @@ import org.ow2.authzforce.core.pdp.api.value.YearMonthDurationValue;
*/
public final class StandardEqualTypeMatchFunctions
{
private StandardEqualTypeMatchFunctions()
{
// empty private constructor to prevent instantiation
}
/**
* Standard identifier for the string-equal function.
*/
......@@ -314,4 +309,9 @@ public final class StandardEqualTypeMatchFunctions
//
new EqualTypeMatchFunction<>(NAME_STRING_REGEXP_MATCH, StandardDatatypes.STRING_FACTORY.getDatatype(), STRING_REGEXP_MATCH_CALL_FACTORY_BUILDER));
private StandardEqualTypeMatchFunctions()
{
// empty private constructor to prevent instantiation
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment