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 AbstractParameter
Parameters 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 boolean
addConstraint(ParameterConstraint item)
Add a newParameterConstraint
item to the underlying collection.boolean
addGuideline(ParameterGuideline item)
Add a newParameterGuideline
item to the underlying collection.boolean
addLink(Link item)
Add a newLink
item to the underlying collection.boolean
addProp(Property item)
Add a newProperty
item to the underlying collection.boolean
addValue(String item)
Add a newString
item to the underlying collection.String
getClazz()
List<ParameterConstraint>
getConstraints()
String
getDependsOn()
List<ParameterGuideline>
getGuidelines()
String
getId()
gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine
getLabel()
List<Link>
getLinks()
List<Property>
getProps()
gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline
getRemarks()
ParameterSelection
getSelect()
gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline
getUsage()
List<String>
getValues()
boolean
removeConstraint(ParameterConstraint item)
Remove the first matchingParameterConstraint
item from the underlying collection.boolean
removeGuideline(ParameterGuideline item)
Remove the first matchingParameterGuideline
item from the underlying collection.boolean
removeLink(Link item)
Remove the first matchingLink
item from the underlying collection.boolean
removeProp(Property item)
Remove the first matchingProperty
item from the underlying collection.boolean
removeValue(String item)
Remove the first matchingString
item from the underlying collection.void
setClazz(String value)
void
setConstraints(List<ParameterConstraint> value)
void
setDependsOn(String value)
void
setGuidelines(List<ParameterGuideline> value)
void
setId(String value)
void
setLabel(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine value)
void
setLinks(List<Link> value)
void
setProps(List<Property> value)
void
setRemarks(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline value)
void
setSelect(ParameterSelection value)
void
setUsage(gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline value)
void
setValues(List<String> value)
String
toString()
-
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 newProperty
item to the underlying collection.- Parameters:
item
- the item to add- Returns:
true
-
removeProp
public boolean removeProp(Property item)
Remove the first matchingProperty
item from the underlying collection.- Parameters:
item
- the item to remove- Returns:
true
if the item was removed orfalse
otherwise
-
addLink
public boolean addLink(Link item)
Add a newLink
item to the underlying collection.- Parameters:
item
- the item to add- Returns:
true
-
removeLink
public boolean removeLink(Link item)
Remove the first matchingLink
item from the underlying collection.- Parameters:
item
- the item to remove- Returns:
true
if the item was removed orfalse
otherwise
-
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 newParameterConstraint
item to the underlying collection.- Parameters:
item
- the item to add- Returns:
true
-
removeConstraint
public boolean removeConstraint(ParameterConstraint item)
Remove the first matchingParameterConstraint
item from the underlying collection.- Parameters:
item
- the item to remove- Returns:
true
if the item was removed orfalse
otherwise
-
getGuidelines
public List<ParameterGuideline> getGuidelines()
-
setGuidelines
public void setGuidelines(List<ParameterGuideline> value)
-
addGuideline
public boolean addGuideline(ParameterGuideline item)
Add a newParameterGuideline
item to the underlying collection.- Parameters:
item
- the item to add- Returns:
true
-
removeGuideline
public boolean removeGuideline(ParameterGuideline item)
Remove the first matchingParameterGuideline
item from the underlying collection.- Parameters:
item
- the item to remove- Returns:
true
if the item was removed orfalse
otherwise
-
addValue
public boolean addValue(String item)
Add a newString
item to the underlying collection.- Parameters:
item
- the item to add- Returns:
true
-
removeValue
public boolean removeValue(String item)
Remove the first matchingString
item from the underlying collection.- Parameters:
item
- the item to remove- Returns:
true
if the item was removed orfalse
otherwise
-
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)
-
-