Commit aaf13b99 authored by cdanger's avatar cdanger

Fixed javadoc comments

parent 28fd3dd0
......@@ -42,6 +42,7 @@ import org.ow2.authzforce.core.pdp.impl.value.DatatypeConstants;
* @since 1.0
* @author Steve Hanna
* @author Seth Proctor
* @version $Id: $
*/
public final class NotFunction extends FirstOrderFunction.SingleParameterTyped<BooleanValue, BooleanValue>
{
......@@ -61,6 +62,7 @@ public final class NotFunction extends FirstOrderFunction.SingleParameterTyped<B
super(NAME_NOT, DatatypeConstants.BOOLEAN.TYPE, false, Collections.singletonList(DatatypeConstants.BOOLEAN.TYPE));
}
/** {@inheritDoc} */
@Override
public FirstOrderFunctionCall<BooleanValue> newCall(List<Expression<?>> argExpressions, Datatype<?>... remainingArgTypes) throws IllegalArgumentException
{
......
......@@ -28,6 +28,9 @@ import java.util.Objects;
/**
* This class represents a port range as specified in the <code>dnsName</code> and <code>ipAddress</code> datatypes. The range may have upper and lower bounds,
* be specified by a single port number, or may be unbound.
*
* @author cdangerv
* @version $Id: $
*/
public final class PortRange
{
......@@ -69,10 +72,8 @@ public final class PortRange
*
* @param value
* a <code>String</code> representing the range
*
* @return a new <code>PortRange</code>
*
* @throws NumberFormatException
* @throws java.lang.NumberFormatException
* if a port value isn't an integer
*/
public static PortRange getInstance(String value)
......@@ -179,6 +180,7 @@ public final class PortRange
private transient volatile int hashCode = 0; // Effective Java - Item 9
/** {@inheritDoc} */
@Override
public int hashCode()
{
......@@ -191,12 +193,9 @@ public final class PortRange
}
/**
* Returns true if the input is an instance of this class and if its value equals the value contained in this class.
* {@inheritDoc}
*
* @param o
* the object to compare
*
* @return true if this object and the input represent the same value
* Returns true if the input is an instance of this class and if its value equals the value contained in this class.
*/
@Override
public boolean equals(Object o)
......@@ -216,8 +215,9 @@ public final class PortRange
}
/**
* @return encoded port range
* <p>encode</p>
*
* @return encoded port range
*/
public String encode()
{
......
......@@ -46,6 +46,7 @@ import org.ow2.authzforce.core.pdp.impl.value.StringValue;
* @since 1.0
* @author Steve Hanna
* @author Seth Proctor
* @version $Id: $
*/
public final class StringNormalizeFunction extends FirstOrderFunction.SingleParameterTyped<StringValue, StringValue>
{
......@@ -145,6 +146,7 @@ public final class StringNormalizeFunction extends FirstOrderFunction.SinglePara
*
* @see com.thalesgroup.authzforce.core.func.FirstOrderFunction#getFunctionCall(java.util.List, com.thalesgroup.authzforce.core.eval.DatatypeDef[])
*/
/** {@inheritDoc} */
@Override
public FirstOrderFunctionCall<StringValue> newCall(List<Expression<?>> argExpressions, Datatype<?>... remainingArgTypes) throws IllegalArgumentException
{
......
......@@ -48,6 +48,7 @@ import org.ow2.authzforce.core.pdp.impl.value.TimeValue;
*
* @since 2.0
* @author seth proctor
* @version $Id: $
*/
public final class TimeInRangeFunction extends FirstOrderFunction.SingleParameterTyped<BooleanValue, TimeValue>
{
......@@ -193,6 +194,7 @@ public final class TimeInRangeFunction extends FirstOrderFunction.SingleParamete
}
}
/** {@inheritDoc} */
@Override
public FirstOrderFunctionCall<BooleanValue> newCall(List<Expression<?>> argExpressions, Datatype<?>... remainingArgTypes) throws IllegalArgumentException
{
......
......@@ -28,6 +28,7 @@ package com.sun.xacml;
*
* @since 1.0
* @author Seth Proctor
* @version $Id: $
*/
public class UnknownIdentifierException extends Exception
{
......
......@@ -29,6 +29,8 @@ import org.slf4j.LoggerFactory;
/**
* XACML AllOf evaluator
*
* @author cdangerv
* @version $Id: $
*/
public class AllOfEvaluator
{
......@@ -49,7 +51,7 @@ public class AllOfEvaluator
* XPath compiler corresponding to enclosing policy(set) default XPath version
* @param expFactory
* Expression factory
* @throws IllegalArgumentException
* @throws java.lang.IllegalArgumentException
* one of the child Match elements is invalid
*/
public AllOfEvaluator(AllOf jaxbAllOf, XPathCompiler xPathCompiler, ExpressionFactory expFactory) throws IllegalArgumentException
......@@ -89,9 +91,8 @@ public class AllOfEvaluator
*
* @param context
* the representation of the request
*
* @return true iff Match, else No match
* @throws IndeterminateEvaluationException
* @throws org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException
* Indeterminate
*/
public boolean match(EvaluationContext context) throws IndeterminateEvaluationException
......
......@@ -32,6 +32,8 @@ import org.slf4j.LoggerFactory;
/**
* AnyOf evaluator
*
* @author cdangerv
* @version $Id: $
*/
public class AnyOfEvaluator
{
......@@ -52,8 +54,7 @@ public class AnyOfEvaluator
* XPath compiler corresponding to enclosing policy(set) default XPath version
* @param expFactory
* Expression factory
*
* @throws IllegalArgumentException
* @throws java.lang.IllegalArgumentException
* if one of the child AllOf elements is invalid
*/
public AnyOfEvaluator(AnyOf jaxbAnyOf, XPathCompiler xPathCompiler, ExpressionFactory expFactory) throws IllegalArgumentException
......@@ -96,9 +97,8 @@ public class AnyOfEvaluator
*
* @param context
* the representation of the request
*
* @return true if and only if Match (else No-match)
* @throws IndeterminateEvaluationException
* @throws org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException
* if Indeterminate
*/
public boolean match(EvaluationContext context) throws IndeterminateEvaluationException
......
......@@ -39,6 +39,8 @@ import org.slf4j.LoggerFactory;
/**
* XACML AttributeAssignmentExpression evaluator
*
* @author cdangerv
* @version $Id: $
*/
public class AttributeAssignmentExpressionEvaluator extends AttributeAssignmentExpression
{
......@@ -54,6 +56,7 @@ public class AttributeAssignmentExpressionEvaluator extends AttributeAssignmentE
*
* @see oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeAssignmentExpression#getExpression()
*/
/** {@inheritDoc} */
@Override
public final JAXBElement<? extends ExpressionType> getExpression()
{
......@@ -65,6 +68,7 @@ public class AttributeAssignmentExpressionEvaluator extends AttributeAssignmentE
*
* @see oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeAssignmentExpression#setExpression(javax .xml.bind.JAXBElement)
*/
/** {@inheritDoc} */
@Override
public final void setExpression(JAXBElement<? extends ExpressionType> value)
{
......@@ -81,7 +85,7 @@ public class AttributeAssignmentExpressionEvaluator extends AttributeAssignmentE
* XPath compiler corresponding to enclosing policy(set) default XPath version
* @param expFactory
* expression factory for parsing the AttributeAssignmentExpression's expression
* @throws IllegalArgumentException
* @throws java.lang.IllegalArgumentException
* invalid AttributeAssignmentExpression's Expression
*/
public AttributeAssignmentExpressionEvaluator(AttributeAssignmentExpression jaxbAttrAssignExp, XPathCompiler xPathCompiler, ExpressionFactory expFactory)
......@@ -109,7 +113,7 @@ public class AttributeAssignmentExpressionEvaluator extends AttributeAssignmentE
* @param context
* evaluation context
* @return non-null AttributeAssignments; empty if no AttributeValue resulting from evaluation of the Expression
* @throws IndeterminateEvaluationException
* @throws org.ow2.authzforce.core.pdp.api.IndeterminateEvaluationException
* if evaluation of the Expression in this context fails (Indeterminate)
*/
public List<AttributeAssignment> evaluate(EvaluationContext context) throws IndeterminateEvaluationException
......
......@@ -32,6 +32,8 @@ import org.ow2.authzforce.core.pdp.api.PepActions;
/**
* Base implementation of DecisionResult
*
* @author cdangerv
* @version $Id: $
*/
public final class BaseDecisionResult implements DecisionResult
{
......@@ -121,7 +123,6 @@ public final class BaseDecisionResult implements DecisionResult
* <li>{@link DecisionType#NOT_APPLICABLE} is the default value and means the decision is not
* Indeterminate, and therefore any extended Indeterminate value should be ignored</li>
* </ul>
*
* @param status
* reason/code for Indeterminate
*/
......@@ -159,6 +160,7 @@ public final class BaseDecisionResult implements DecisionResult
private transient volatile int hashCode = 0;
/** {@inheritDoc} */
@Override
public int hashCode()
{
......@@ -171,6 +173,7 @@ public final class BaseDecisionResult implements DecisionResult
return hashCode;
}
/** {@inheritDoc} */
@Override
public boolean equals(Object obj)
{
......@@ -224,9 +227,9 @@ public final class BaseDecisionResult implements DecisionResult
}
/**
* Get identifiers of policies found applicable for the decision request
* {@inheritDoc}
*
* @return identifiers of policies found applicable for the decision request
* Get identifiers of policies found applicable for the decision request
*/
@Override
public List<JAXBElement<IdReferenceType>> getApplicablePolicyIdList()
......@@ -235,9 +238,9 @@ public final class BaseDecisionResult implements DecisionResult
}
/**
* Get XACML Decision
* {@inheritDoc}
*
* @return decision
* Get XACML Decision
*/
@Override
public DecisionType getDecision()
......@@ -246,9 +249,9 @@ public final class BaseDecisionResult implements DecisionResult
}
/**
* Get PEP actions (Obligations/Advices)
* {@inheritDoc}
*
* @return PEP actions
* Get PEP actions (Obligations/Advices)
*/
@Override
public PepActions getPepActions()
......@@ -257,9 +260,9 @@ public final class BaseDecisionResult implements DecisionResult
}
/**
* Status code/message/detail
* {@inheritDoc}
*
* @return status
* Status code/message/detail
*/
@Override
public Status getStatus()
......@@ -268,13 +271,10 @@ public final class BaseDecisionResult implements DecisionResult
}
/**
* {@inheritDoc}
*
* Merge extra PEP actions and/or matched policy identifiers. Used when combining results from child Rules of Policy
* or child Policies of PolicySet
*
* @param newPepActions
* new PEP actions
* @param newMatchedPolicyIdList
* new matched policy identifiers
*/
@Override
public void merge(PepActions newPepActions, List<JAXBElement<IdReferenceType>> newMatchedPolicyIdList)
......@@ -290,6 +290,7 @@ public final class BaseDecisionResult implements DecisionResult
}
}
/** {@inheritDoc} */
@Override
public String toString()
{
......@@ -297,6 +298,7 @@ public final class BaseDecisionResult implements DecisionResult
+ ", applicablePolicyIdList=" + applicablePolicyIdList + "]";
}
/** {@inheritDoc} */
@Override
public DecisionType getExtendedIndeterminate()
{
......
......@@ -27,6 +27,8 @@ import org.slf4j.LoggerFactory;
*
* @param <T>
* type of extension in this registry
* @author cdangerv
* @version $Id: $
*/
public class BasePdpExtensionRegistry<T extends PdpExtension> implements PdpExtensionRegistry<T>
{
......@@ -70,7 +72,6 @@ public class BasePdpExtensionRegistry<T extends PdpExtension> implements PdpExte
*
* @param extensionClass
* extension class
*
* @param extensions
* extensions
*/
......@@ -122,6 +123,7 @@ public class BasePdpExtensionRegistry<T extends PdpExtension> implements PdpExte
this(extensionClass, baseRegistry == null ? new HashMap<String, T>() : new HashMap<>(baseRegistry.extensionsById));
}
/** {@inheritDoc} */
@Override
public void addExtension(T extension) throws IllegalArgumentException
{
......@@ -136,6 +138,7 @@ public class BasePdpExtensionRegistry<T extends PdpExtension> implements PdpExte
LOGGER.debug("Added PDP extension of {} to registry: {}", extClass, extension);
}
/** {@inheritDoc} */
@Override
public T getExtension(String identity)
{
......
......@@ -30,6 +30,8 @@ import org.ow2.authzforce.core.pdp.api.PepActions;
/**
* Base PEP actions (obligations/advice)
*
* @author cdangerv
* @version $Id: $
*/
public final class BasePepActions implements PepActions
{
......@@ -96,9 +98,9 @@ public final class BasePepActions implements PepActions
}
/**
* Get the internal obligation list
* {@inheritDoc}
*
* @return obligations; empty if no obligation (always non-null)
* Get the internal obligation list
*/
@Override
public List<Obligation> getObligations()
......@@ -107,9 +109,9 @@ public final class BasePepActions implements PepActions
}
/**
* Get the internal advice list
* {@inheritDoc}
*
* @return advice; empty if no obligation (always non-null)
* Get the internal advice list
*/
@Override
public List<Advice> getAdvices()
......@@ -119,6 +121,7 @@ public final class BasePepActions implements PepActions
private transient volatile int hashCode = 0;
/** {@inheritDoc} */
@Override
public int hashCode()
{
......@@ -130,6 +133,7 @@ public final class BasePepActions implements PepActions
return hashCode;
}
/** {@inheritDoc} */
@Override
public boolean equals(Object obj)
{
......@@ -148,13 +152,9 @@ public final class BasePepActions implements PepActions
}
/**
* Merge extra PEP actions. Used when combining results from child Rules of Policy or child Policies of PolicySet
*
* @param newObligations
* new obligation list
* @param newAdvices
* new advice list
* {@inheritDoc}
*
* Merge extra PEP actions. Used when combining results from child Rules of Policy or child Policies of PolicySet
*/
@Override
public void merge(List<Obligation> newObligations, List<Advice> newAdvices)
......@@ -171,10 +171,9 @@ public final class BasePepActions implements PepActions
}
/**
* Merge extra PEP actions. Used when combining results from child Rules of Policy or child Policies of PolicySet
* {@inheritDoc}
*
* @param pepActions
* PEP actions
* Merge extra PEP actions. Used when combining results from child Rules of Policy or child Policies of PolicySet
*/
@Override
public void merge(PepActions pepActions)
......@@ -187,6 +186,7 @@ public final class BasePepActions implements PepActions
merge(pepActions.getObligations(), pepActions.getAdvices());
}
/** {@inheritDoc} */
@Override
public String toString()
{
......
......@@ -38,6 +38,8 @@ import org.ow2.authzforce.xmlns.pdp.ext.AbstractAttributeProvider;
* you are required to call {@link #close()} when you no longer need an instance - especially before replacing with a new instance (with different modules) - in
* order to make sure these resources are released properly by each underlying module (e.g. close the attribute caches).
*
* @author cdangerv
* @version $Id: $
*/
public final class CloseableAttributeProvider extends ModularAttributeProvider implements Closeable
{
......@@ -133,15 +135,14 @@ public final class CloseableAttributeProvider extends ModularAttributeProvider i
*
* @param attributeFactory
* (mandatory) attribute value factory
*
* @param jaxbAttributeProviderConfs
* (optional) XML/JAXB configurations of Attribute Providers for AttributeDesignator/AttributeSelector evaluation; may be null for static
* expression evaluation (out of context), in which case AttributeSelectors/AttributeDesignators are not supported
* @return instance of this class
* @throws IllegalArgumentException
* @throws java.lang.IllegalArgumentException
* If any of attribute Provider modules created from {@code jaxbAttributeProviderConfs} does not provide any attribute; or it is in conflict
* with another one already registered to provide the same or part of the same attributes.
* @throws IOException
* @throws java.io.IOException
* error closing the attribute Provider modules created from {@code jaxbAttributeProviderConfs}, when and before an
* {@link IllegalArgumentException} is raised
*/
......@@ -211,6 +212,7 @@ public final class CloseableAttributeProvider extends ModularAttributeProvider i
return new CloseableAttributeProvider(modulesByAttributeId, moduleCloserSet);
}
/** {@inheritDoc} */
@Override
public void close() throws IOException
{
......
......@@ -24,6 +24,8 @@ import org.springframework.util.PropertyPlaceholderHelper;
/**
* Default implementation of PDP configuration parser's environment properties.
*
* @author cdangerv
* @version $Id: $
*/
public final class DefaultEnvironmentProperties implements EnvironmentProperties
{
......@@ -66,6 +68,7 @@ public final class DefaultEnvironmentProperties implements EnvironmentProperties
}
}
/** {@inheritDoc} */
@Override
public String replacePlaceholders(String input)
{
......
......@@ -35,6 +35,8 @@ import oasis.names.tc.xacml._3_0.core.schema.wd_17.Attributes;
/**
* Default Request filter for Individual Decision Requests only (no support of Multiple Decision Profile in particular)
*
* @author cdangerv
* @version $Id: $
*/
public final class DefaultRequestFilter extends BaseRequestFilter
{
......@@ -98,6 +100,7 @@ public final class DefaultRequestFilter extends BaseRequestFilter
super(datatypeFactoryRegistry, strictAttributeIssuerMatch, allowAttributeDuplicates, requireContentForXPath, xmlProcessor);
}
/** {@inheritDoc} */
@Override
public List<? extends IndividualDecisionRequest> filter(List<Attributes> attributesList, JaxbXACMLAttributesParser xacmlAttrsParser, boolean isApplicablePolicyIdListReturned, boolean combinedDecision, XPathCompiler xPathCompiler, Map<String, String> namespaceURIsByPrefix) throws IndeterminateEvaluationException
{
......
......@@ -39,6 +39,8 @@ import org.slf4j.LoggerFactory;
* An {@link EvaluationContext} associated to an XACML Individual Decision Request, i.e. for evaluation to a single authorization decision Result (see Multiple
* Decision Profile spec for more information on Individual Decision Request as opposed to Multiple Decision Request).
*
* @author cdangerv
* @version $Id: $
*/
public class IndividualDecisionRequestContext implements EvaluationContext
{
......@@ -80,7 +82,6 @@ public class IndividualDecisionRequestContext implements EvaluationContext
* extra contents by attribute category (equivalent to XACML Attributes/Content elements); null iff no Content in the attribute category.
* @param returnApplicablePolicyIdList
* true iff list of IDs of policies matched during evaluation must be returned
*
*/
public IndividualDecisionRequestContext(Map<AttributeGUID, Bag<?>> namedAttributeMap, Map<String, XdmNode> extraContentsByAttributeCategory,
boolean returnApplicablePolicyIdList)
......@@ -103,6 +104,7 @@ public class IndividualDecisionRequestContext implements EvaluationContext
.isApplicablePolicyIdentifiersReturned());
}
/** {@inheritDoc} */
@Override
public <AV extends AttributeValue> Bag<AV> getAttributeDesignatorResult(AttributeGUID attributeGUID, Datatype<AV> attributeDatatype)
throws IndeterminateEvaluationException
......@@ -134,6 +136,7 @@ public class IndividualDecisionRequestContext implements EvaluationContext
return (Bag<AV>) bagResult;
}
/** {@inheritDoc} */
@Override
public boolean putAttributeDesignatorResultIfAbsent(AttributeGUID attributeGUID, Bag<?> result)
{
......@@ -154,12 +157,14 @@ public class IndividualDecisionRequestContext implements EvaluationContext
return namedAttributes.put(attributeGUID, result) == null;
}
/** {@inheritDoc} */
@Override
public XdmNode getAttributesContent(String category)
{
return extraContentsByAttributeCategory == null ? null : extraContentsByAttributeCategory.get(category);
}
/** {@inheritDoc} */
@Override
public <V extends Value> V getVariableValue(String variableId, Datatype<V> expectedDatatype) throws IndeterminateEvaluationException
{
......@@ -179,6 +184,7 @@ public class IndividualDecisionRequestContext implements EvaluationContext
}
}
/** {@inheritDoc} */
@Override
public boolean putVariableIfAbsent(String variableId, Value value)
{
......@@ -191,12 +197,14 @@ public class IndividualDecisionRequestContext implements EvaluationContext
return varValsById.put(variableId, value) == null;
}
/** {@inheritDoc} */
@Override
public Value removeVariable(String variableId)
{
return varValsById.remove(variableId);
}
/** {@inheritDoc} */
@Override
public <AV extends AttributeValue> Bag<AV> getAttributeSelectorResult(AttributeSelectorId id, Datatype<AV> datatype)
throws IndeterminateEvaluationException
......@@ -233,6 +241,7 @@ public class IndividualDecisionRequestContext implements EvaluationContext
return (Bag<AV>) bagResult;
}
/** {@inheritDoc} */
@Override
public boolean putAttributeSelectorResultIfAbsent(AttributeSelectorId id, Bag<?> result) throws IndeterminateEvaluationException
{
......@@ -250,30 +259,35 @@ public class IndividualDecisionRequestContext implements EvaluationContext