Package gov.nist.secauto.oscal.lib.model
Class Parameter
- java.lang.Object
-
- gov.nist.secauto.oscal.lib.model.control.AbstractParameter
-
- gov.nist.secauto.oscal.lib.model.Parameter
-
- All Implemented Interfaces:
IParameter
@MetaschemaAssembly(formalName="Parameter", description="Parameters provide a mechanism for the dynamic assignment of value(s) in a control.", name="parameter", metaschema=OscalControlCommonMetaschema.class, remarks="In a catalog, a parameter is typically used as a placeholder for the future assignment of a parameter value, although the OSCAL model allows for the direct assignment of a value if desired by the control author. The `value` may be optionally used to specify one or more values. If no value is provided, then it is expected that the value will be provided at the Profile or Implementation layer.\n\nA parameter can include a variety of metadata options that support the future solicitation of one or more values. A `label` provides a textual placeholder that can be used in a tool to solicit parameter value input, or to display in catalog documentation. The `desc` provides a short description of what the parameter is used for, which can be used in tooling to help a user understand how to use the parameter. A `constraint` can be used to provide criteria for the allowed values. A `guideline` provides a recommendation for the use of a parameter.") @ValueConstraints(allowedValues={@AllowedValues(level=ERROR,target="prop[has-oscal-namespace(\'http://csrc.nist.gov/ns/oscal\')]/@name",values={@AllowedValue(value="label",description="A human-readable label for the parent context, which may be rendered in place of the actual identifier for some use cases."),@AllowedValue(value="sort-id",description="An alternative identifier, whose value is easily sortable among other such values in the document."),@AllowedValue(value="alt-identifier",description="An alternate or aliased identifier for the parent context."),@AllowedValue(value="alt-label",description="An alternate to the value provided by the parameter\'s label. This will typically be qualified by a class.")}),@AllowedValues(level=ERROR,target="prop[has-oscal-namespace(\'http://csrc.nist.gov/ns/rmf\')]/@name",values=@AllowedValue(value="aggregates",description="The parent parameter provides an aggregation of two or more other parameters, each described by this property."))},expect=@Expect(level=ERROR,test="not(exists(@depends-on))",message="depends-on is deprecated")) public class Parameter extends AbstractParameterParameters provide a mechanism for the dynamic assignment of value(s) in a control.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nist.secauto.oscal.lib.model.control.AbstractParameter
AbstractParameter.Builder
-
-
Constructor Summary
Constructors Constructor Description Parameter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddConstraint(ParameterConstraint item)Add a newParameterConstraintitem to the underlying collection.booleanaddGuideline(ParameterGuideline item)Add a newParameterGuidelineitem to the underlying collection.booleanaddLink(Link item)Add a newLinkitem to the underlying collection.booleanaddProp(Property item)Add a newPropertyitem to the underlying collection.booleanaddValue(String item)Add a newStringitem to the underlying collection.StringgetClazz()List<ParameterConstraint>getConstraints()StringgetDependsOn()List<ParameterGuideline>getGuidelines()StringgetId()gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLinegetLabel()List<Link>getLinks()List<Property>getProps()gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultilinegetRemarks()ParameterSelectiongetSelect()gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultilinegetUsage()List<String>getValues()booleanremoveConstraint(ParameterConstraint item)Remove the first matchingParameterConstraintitem from the underlying collection.booleanremoveGuideline(ParameterGuideline item)Remove the first matchingParameterGuidelineitem from the underlying collection.booleanremoveLink(Link item)Remove the first matchingLinkitem from the underlying collection.booleanremoveProp(Property item)Remove the first matchingPropertyitem from the underlying collection.booleanremoveValue(String item)Remove the first matchingStringitem from the underlying collection.voidsetClazz(String value)voidsetConstraints(List<ParameterConstraint> value)voidsetDependsOn(String value)voidsetGuidelines(List<ParameterGuideline> value)voidsetId(String value)voidsetLabel(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine value)voidsetLinks(List<Link> value)voidsetProps(List<Property> value)voidsetRemarks(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline value)voidsetSelect(ParameterSelection value)voidsetUsage(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline value)voidsetValues(List<String> value)StringtoString()-
Methods inherited from class gov.nist.secauto.oscal.lib.model.control.AbstractParameter
builder, getParameterReferences
-
-
-
-
Constructor Detail
-
Parameter
public Parameter()
-
-
Method Detail
-
getDependsOn
public String getDependsOn()
-
setDependsOn
public void setDependsOn(String value)
-
addProp
public boolean addProp(Property item)
Add a newPropertyitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeProp
public boolean removeProp(Property item)
Remove the first matchingPropertyitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
addLink
public boolean addLink(Link item)
Add a newLinkitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeLink
public boolean removeLink(Link item)
Remove the first matchingLinkitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getLabel
public gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine getLabel()
-
setLabel
public void setLabel(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine value)
-
getUsage
public gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline getUsage()
-
setUsage
public void setUsage(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline value)
-
getConstraints
public List<ParameterConstraint> getConstraints()
-
setConstraints
public void setConstraints(List<ParameterConstraint> value)
-
addConstraint
public boolean addConstraint(ParameterConstraint item)
Add a newParameterConstraintitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeConstraint
public boolean removeConstraint(ParameterConstraint item)
Remove the first matchingParameterConstraintitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getGuidelines
public List<ParameterGuideline> getGuidelines()
-
setGuidelines
public void setGuidelines(List<ParameterGuideline> value)
-
addGuideline
public boolean addGuideline(ParameterGuideline item)
Add a newParameterGuidelineitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeGuideline
public boolean removeGuideline(ParameterGuideline item)
Remove the first matchingParameterGuidelineitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
addValue
public boolean addValue(String item)
Add a newStringitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeValue
public boolean removeValue(String item)
Remove the first matchingStringitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getSelect
public ParameterSelection getSelect()
-
setSelect
public void setSelect(ParameterSelection value)
-
getRemarks
public gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline getRemarks()
-
setRemarks
public void setRemarks(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline value)
-
-