Class ParameterConstraint

java.lang.Object
dev.metaschema.oscal.lib.model.ParameterConstraint
All Implemented Interfaces:
dev.metaschema.core.model.IBoundObject

@MetaschemaAssembly(formalName="Constraint", description="A formal or informal expression of a constraint or test.", name="parameter-constraint", moduleClass=OscalControlCommonModule.class) public class ParameterConstraint extends Object implements dev.metaschema.core.model.IBoundObject
A formal or informal expression of a constraint or test.
  • Constructor Details

    • ParameterConstraint

      Constructs a new dev.metaschema.oscal.lib.model.ParameterConstraint instance with no metadata.
    • ParameterConstraint

      public ParameterConstraint(dev.metaschema.core.model.IMetaschemaData data)
      Constructs a new dev.metaschema.oscal.lib.model.ParameterConstraint instance with the specified metadata.
      Parameters:
      data - the metaschema data, or null if none
  • Method Details

    • getMetaschemaData

      public dev.metaschema.core.model.IMetaschemaData getMetaschemaData()
      Specified by:
      getMetaschemaData in interface dev.metaschema.core.model.IBoundObject
    • getDescription

      @Nullable public dev.metaschema.core.datatype.markup.MarkupMultiline getDescription()
      Get the "Constraint Description".

      A textual summary of the constraint to be applied.

      Returns:
      the description value, or null if not set
    • setDescription

      public void setDescription(@Nullable dev.metaschema.core.datatype.markup.MarkupMultiline value)
      Set the "Constraint Description".

      A textual summary of the constraint to be applied.

      Parameters:
      value - the description value to set, or null to clear
    • getTests

      Get the "Constraint Test".

      A test expression which is expected to be evaluated by a tool.

      Returns:
      the test value
    • setTests

      public void setTests(@NonNull List<ParameterConstraint.Test> value)
      Set the "Constraint Test".

      A test expression which is expected to be evaluated by a tool.

      Parameters:
      value - the test value to set
    • addTest

      public boolean addTest(ParameterConstraint.Test item)
      Add a new ParameterConstraint.Test item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeTest

      public boolean removeTest(ParameterConstraint.Test item)
      Remove the first matching ParameterConstraint.Test item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object