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:
gov.nist.secauto.metaschema.core.model.IBoundObject,IParameter
@MetaschemaAssembly(formalName="Parameter",
description="Parameters provide a mechanism for the dynamic assignment of value(s) in a control.",
name="parameter",
moduleClass=OscalControlCommonModule.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=@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
implements gov.nist.secauto.metaschema.core.model.IBoundObject
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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd a newParameterConstraintitem to the underlying collection.booleanAdd a newParameterGuidelineitem to the underlying collection.booleanAdd a newLinkitem to the underlying collection.booleanAdd a newPropertyitem to the underlying collection.booleanAdd a newStringitem to the underlying collection.getClazz()getId()gov.nist.secauto.metaschema.core.datatype.markup.MarkupLinegetLabel()getLinks()gov.nist.secauto.metaschema.core.model.IMetaschemaDatagetProps()gov.nist.secauto.metaschema.core.datatype.markup.MarkupMultilinegov.nist.secauto.metaschema.core.datatype.markup.MarkupMultilinegetUsage()booleanRemove the first matchingParameterConstraintitem from the underlying collection.booleanRemove 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.voidvoidsetConstraints(List<ParameterConstraint> value) voidsetDependsOn(String value) voidsetGuidelines(List<ParameterGuideline> value) voidvoidsetLabel(gov.nist.secauto.metaschema.core.datatype.markup.MarkupLine value) voidvoidvoidsetRemarks(gov.nist.secauto.metaschema.core.datatype.markup.MarkupMultiline value) voidsetSelect(ParameterSelection value) voidsetUsage(gov.nist.secauto.metaschema.core.datatype.markup.MarkupMultiline value) voidtoString()Methods inherited from class gov.nist.secauto.oscal.lib.model.control.AbstractParameter
builder, getParameterReferences
-
Constructor Details
-
Parameter
public Parameter() -
Parameter
-
-
Method Details
-
getMetaschemaData
- Specified by:
getMetaschemaDatain interfacegov.nist.secauto.metaschema.core.model.IBoundObject
-
getId
-
setId
-
getClazz
-
setClazz
-
getDependsOn
-
setDependsOn
-
getProps
- Specified by:
getPropsin interfaceIParameter
-
setProps
-
addProp
Add a newPropertyitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeProp
Remove the first matchingPropertyitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getLinks
-
setLinks
-
addLink
Add a newLinkitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeLink
Remove the first matchingLinkitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getLabel
-
setLabel
-
getUsage
-
setUsage
-
getConstraints
-
setConstraints
-
addConstraint
Add a newParameterConstraintitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeConstraint
Remove the first matchingParameterConstraintitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getGuidelines
-
setGuidelines
-
addGuideline
Add a newParameterGuidelineitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeGuideline
Remove the first matchingParameterGuidelineitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getValues
-
setValues
-
addValue
Add a newStringitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeValue
Remove the first matchingStringitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
getSelect
- Specified by:
getSelectin interfaceIParameter
-
setSelect
-
getRemarks
-
setRemarks
-
toString
-