org.fosstrak.llrp.commander.util
Class LLRPConstraints

java.lang.Object
  extended by org.fosstrak.llrp.commander.util.LLRPConstraints

public class LLRPConstraints
extends java.lang.Object

This class states additional LLRP constraints which are not modeled in llrp-1x0-def.xml.

Author:
Ulrich Etter, ETHZ

Field Summary
static LLRPArrayConstraint[] arrayConstraints
          An array of array constraints that are not modeled in llrpdef.xml
static java.lang.String EMPTY_LIST_ERROR_MESSAGE
          Error message that gets shown when a list that must not be empty is empty
static java.lang.String MISSING_PARAMETER_ERROR_MESSAGE
          Error message that gets shown when a mandatory parameter is not set
static java.lang.String NULL_FIELD_ERROR_MESSAGE
          Error message that gets shown when a field is null
static LLRPPresenceConstraint[] presenceConstraints
          An array of presence constraints that are not modeled in llrpdef.xml
static LLRPRangeConstraint[] rangeConstraints
          An array of range constraints that are not modeled in llrpdef.xml
 
Constructor Summary
LLRPConstraints()
           
 
Method Summary
static LLRPArrayConstraint getArrayConstraint(java.lang.Object messageOrParameter, java.lang.String fieldName, LLRPTreeMaintainer treeMaintainer)
          Returns the array constraint that is specified for the given field, or null if there is no such constraint.
static LLRPRangeConstraint getRangeConstraint(java.lang.Object messageOrParameter, java.lang.String fieldName, LLRPTreeMaintainer treeMaintainer)
          Returns the range constraint that is specified for the given field, or null if there is no such constraint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MISSING_PARAMETER_ERROR_MESSAGE

public static final java.lang.String MISSING_PARAMETER_ERROR_MESSAGE
Error message that gets shown when a mandatory parameter is not set

See Also:
Constant Field Values

NULL_FIELD_ERROR_MESSAGE

public static final java.lang.String NULL_FIELD_ERROR_MESSAGE
Error message that gets shown when a field is null

See Also:
Constant Field Values

EMPTY_LIST_ERROR_MESSAGE

public static final java.lang.String EMPTY_LIST_ERROR_MESSAGE
Error message that gets shown when a list that must not be empty is empty

See Also:
Constant Field Values

rangeConstraints

public static LLRPRangeConstraint[] rangeConstraints
An array of range constraints that are not modeled in llrpdef.xml


presenceConstraints

public static LLRPPresenceConstraint[] presenceConstraints
An array of presence constraints that are not modeled in llrpdef.xml


arrayConstraints

public static LLRPArrayConstraint[] arrayConstraints
An array of array constraints that are not modeled in llrpdef.xml

Constructor Detail

LLRPConstraints

public LLRPConstraints()
Method Detail

getRangeConstraint

public static LLRPRangeConstraint getRangeConstraint(java.lang.Object messageOrParameter,
                                                     java.lang.String fieldName,
                                                     LLRPTreeMaintainer treeMaintainer)
Returns the range constraint that is specified for the given field, or null if there is no such constraint. The constraint is only returned if the given field matches the constraints precondition.

Parameters:
messageOrParameter -
fieldName -
treeMaintainer -
Returns:
a range constraint for a given field if exists, null otherwise.

getArrayConstraint

public static LLRPArrayConstraint getArrayConstraint(java.lang.Object messageOrParameter,
                                                     java.lang.String fieldName,
                                                     LLRPTreeMaintainer treeMaintainer)
Returns the array constraint that is specified for the given field, or null if there is no such constraint.

Parameters:
messageOrParameter -
fieldName -
treeMaintainer -
Returns:
llrp constraint if there is a constraint, null otherwise.


Copyright © 2009. All Rights Reserved.