Package dev.metaschema.oscal.lib.model
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA test expression which is expected to be evaluated by a tool. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newdev.metaschema.oscal.lib.model.ParameterConstraintinstance with no metadata.ParameterConstraint(dev.metaschema.core.model.IMetaschemaData data) Constructs a newdev.metaschema.oscal.lib.model.ParameterConstraintinstance with the specified metadata. -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd a newParameterConstraint.Testitem to the underlying collection.dev.metaschema.core.datatype.markup.MarkupMultilineGet the "Constraint Description".dev.metaschema.core.model.IMetaschemaDatagetTests()Get the "Constraint Test".booleanRemove the first matchingParameterConstraint.Testitem from the underlying collection.voidsetDescription(dev.metaschema.core.datatype.markup.MarkupMultiline value) Set the "Constraint Description".voidsetTests(List<ParameterConstraint.Test> value) Set the "Constraint Test".toString()
-
Constructor Details
-
ParameterConstraint
public ParameterConstraint()Constructs a newdev.metaschema.oscal.lib.model.ParameterConstraintinstance with no metadata. -
ParameterConstraint
Constructs a newdev.metaschema.oscal.lib.model.ParameterConstraintinstance with the specified metadata.- Parameters:
data- the metaschema data, ornullif none
-
-
Method Details
-
getMetaschemaData
- Specified by:
getMetaschemaDatain interfacedev.metaschema.core.model.IBoundObject
-
getDescription
Get the "Constraint Description".A textual summary of the constraint to be applied.
- Returns:
- the description value, or
nullif not set
-
setDescription
Set the "Constraint Description".A textual summary of the constraint to be applied.
- Parameters:
value- the description value to set, ornullto clear
-
getTests
Get the "Constraint Test".A test expression which is expected to be evaluated by a tool.
- Returns:
- the test value
-
setTests
Set the "Constraint Test".A test expression which is expected to be evaluated by a tool.
- Parameters:
value- the test value to set
-
addTest
Add a newParameterConstraint.Testitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeTest
Remove the first matchingParameterConstraint.Testitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
toString
-