Interface IExpectConstraint
-
- All Superinterfaces:
IConstraint
- All Known Implementing Classes:
DefaultExpectConstraint
public interface IExpectConstraint extends IConstraint
Represents a rule requiring a Metaschema assembly, field, or flag data instance to pass a Metapath-based test.A custom message can be used to indicate what a test failure signifies.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface gov.nist.secauto.metaschema.core.model.constraint.IConstraint
IConstraint.ExternalModelSource, IConstraint.ExternalSource, IConstraint.InternalModelSource, IConstraint.ISource, IConstraint.Level
-
-
Field Summary
-
Fields inherited from interface gov.nist.secauto.metaschema.core.model.constraint.IConstraint
DEFAULT_LEVEL, DEFAULT_TARGET, DEFAULT_TARGET_METAPATH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CharSequence
generateMessage(INodeItem item, DynamicContext context)
String
getMessage()
A message to emit when the constraint is violated.MetapathExpression
getTest()
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.constraint.IConstraint
accept, getDescription, getFormalName, getId, getLevel, getProperties, getRemarks, getSource, getTarget, matchTargets, matchTargets
-
-
-
-
Method Detail
-
getTest
@NonNull MetapathExpression getTest()
-
getMessage
String getMessage()
A message to emit when the constraint is violated. Allows embedded Metapath expressions using the syntax\{path\}
.- Returns:
- the message if defined or
null
otherwise
-
generateMessage
CharSequence generateMessage(@NonNull INodeItem item, @NonNull DynamicContext context)
-
-