Class DefaultExpectConstraint
- java.lang.Object
-
- gov.nist.secauto.metaschema.core.model.constraint.AbstractConstraint
-
- gov.nist.secauto.metaschema.core.model.constraint.DefaultExpectConstraint
-
- All Implemented Interfaces:
IConstraint
,IExpectConstraint
public final class DefaultExpectConstraint extends AbstractConstraint implements IExpectConstraint
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultExpectConstraint.Builder
-
Nested classes/interfaces inherited from class gov.nist.secauto.metaschema.core.model.constraint.AbstractConstraint
AbstractConstraint.AbstractConstraintBuilder<T extends AbstractConstraint.AbstractConstraintBuilder<T,R>,R extends AbstractConstraint>
-
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 Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T,R>
Raccept(IConstraintVisitor<T,R> visitor, T state)
static DefaultExpectConstraint.Builder
builder()
CharSequence
generateMessage(INodeItem item, DynamicContext context)
String
getMessage()
A message to emit when the constraint is violated.MetapathExpression
getTest()
-
Methods inherited from class gov.nist.secauto.metaschema.core.model.constraint.AbstractConstraint
getDescription, getFormalName, getId, getLevel, getProperties, getRemarks, getSource, getTarget
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.constraint.IConstraint
getDescription, getFormalName, getId, getLevel, getProperties, getRemarks, getSource, getTarget, matchTargets, matchTargets
-
-
-
-
Method Detail
-
getTest
public MetapathExpression getTest()
- Specified by:
getTest
in interfaceIExpectConstraint
-
getMessage
public String getMessage()
Description copied from interface:IExpectConstraint
A message to emit when the constraint is violated. Allows embedded Metapath expressions using the syntax\{path\}
.- Specified by:
getMessage
in interfaceIExpectConstraint
- Returns:
- the message if defined or
null
otherwise
-
generateMessage
public CharSequence generateMessage(@NonNull INodeItem item, @NonNull DynamicContext context)
- Specified by:
generateMessage
in interfaceIExpectConstraint
-
accept
public <T,R> R accept(IConstraintVisitor<T,R> visitor, T state)
- Specified by:
accept
in interfaceIConstraint
-
builder
@NonNull public static DefaultExpectConstraint.Builder builder()
-
-