Class Parameter

All Implemented Interfaces:
dev.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(id="oscal-parameter-prop-name",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(id="oscal-rmf-parameter-prop-name",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(id="oscal-parameter-depends-on-deprecated",level=ERROR,test="not(exists(@depends-on))",message="depends-on is deprecated"))) public class Parameter extends AbstractParameter implements dev.metaschema.core.model.IBoundObject
Parameters provide a mechanism for the dynamic assignment of value(s) in a control.
  • Constructor Details

    • Parameter

      public Parameter()
      Constructs a new dev.metaschema.oscal.lib.model.Parameter instance with no metadata.
    • Parameter

      public Parameter(dev.metaschema.core.model.IMetaschemaData data)
      Constructs a new dev.metaschema.oscal.lib.model.Parameter 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
    • getId

      @NonNull public String getId()
      Get the "Parameter Identifier".

      A unique identifier for the parameter.

      Returns:
      the id value
    • setId

      public void setId(@NonNull String value)
      Set the "Parameter Identifier".

      A unique identifier for the parameter.

      Parameters:
      value - the id value to set
    • getClazz

      @Nullable public String getClazz()
      Get the "Parameter Class".

      A textual label that provides a characterization of the type, purpose, use or scope of the parameter.

      Returns:
      the class value, or null if not set
    • setClazz

      public void setClazz(@Nullable String value)
      Set the "Parameter Class".

      A textual label that provides a characterization of the type, purpose, use or scope of the parameter.

      Parameters:
      value - the class value to set, or null to clear
    • getDependsOn

      @Nullable public String getDependsOn()
      Get the "Depends on".

      (deprecated) Another parameter invoking this one. This construct has been deprecated and should not be used.

      Returns:
      the depends-on value, or null if not set
    • setDependsOn

      public void setDependsOn(@Nullable String value)
      Set the "Depends on".

      (deprecated) Another parameter invoking this one. This construct has been deprecated and should not be used.

      Parameters:
      value - the depends-on value to set, or null to clear
    • getProps

      @NonNull public List<Property> getProps()
      Get the "Property".

      An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.

      Specified by:
      getProps in interface IParameter
      Returns:
      the prop value
    • setProps

      public void setProps(@NonNull List<Property> value)
      Set the "Property".

      An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.

      Parameters:
      value - the prop value to set
    • addProp

      public boolean addProp(Property item)
      Add a new Property item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeProp

      public boolean removeProp(Property item)
      Remove the first matching Property item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getLinks

      @NonNull public List<Link> getLinks()
      Get the "Link".

      A reference to a local or remote resource, that has a specific relation to the containing object.

      Returns:
      the link value
    • setLinks

      public void setLinks(@NonNull List<Link> value)
      Set the "Link".

      A reference to a local or remote resource, that has a specific relation to the containing object.

      Parameters:
      value - the link value to set
    • addLink

      public boolean addLink(Link item)
      Add a new Link item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeLink

      public boolean removeLink(Link item)
      Remove the first matching Link item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getLabel

      @Nullable public dev.metaschema.core.datatype.markup.MarkupLine getLabel()
      Get the "Parameter Label".

      A short, placeholder name for the parameter, which can be used as a substitute for a value if no value is assigned.

      Returns:
      the label value, or null if not set
    • setLabel

      public void setLabel(@Nullable dev.metaschema.core.datatype.markup.MarkupLine value)
      Set the "Parameter Label".

      A short, placeholder name for the parameter, which can be used as a substitute for a value if no value is assigned.

      Parameters:
      value - the label value to set, or null to clear
    • getUsage

      @Nullable public dev.metaschema.core.datatype.markup.MarkupMultiline getUsage()
      Get the "Parameter Usage Description".

      Describes the purpose and use of a parameter.

      Returns:
      the usage value, or null if not set
    • setUsage

      public void setUsage(@Nullable dev.metaschema.core.datatype.markup.MarkupMultiline value)
      Set the "Parameter Usage Description".

      Describes the purpose and use of a parameter.

      Parameters:
      value - the usage value to set, or null to clear
    • getConstraints

      Get the "Constraint".

      A formal or informal expression of a constraint or test.

      Returns:
      the constraint value
    • setConstraints

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

      A formal or informal expression of a constraint or test.

      Parameters:
      value - the constraint value to set
    • addConstraint

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

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

      Get the "Guideline".

      A prose statement that provides a recommendation for the use of a parameter.

      Returns:
      the guideline value
    • setGuidelines

      public void setGuidelines(@NonNull List<ParameterGuideline> value)
      Set the "Guideline".

      A prose statement that provides a recommendation for the use of a parameter.

      Parameters:
      value - the guideline value to set
    • addGuideline

      public boolean addGuideline(ParameterGuideline item)
      Add a new ParameterGuideline item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeGuideline

      public boolean removeGuideline(ParameterGuideline item)
      Remove the first matching ParameterGuideline item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getValues

      @NonNull public List<String> getValues()
      Get the "Parameter Value".

      A parameter value or set of values.

      Returns:
      the value value
    • setValues

      public void setValues(@NonNull List<String> value)
      Set the "Parameter Value".

      A parameter value or set of values.

      Parameters:
      value - the value value to set
    • addValue

      public boolean addValue(String item)
      Add a new String item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeValue

      public boolean removeValue(String item)
      Remove the first matching String item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getSelect

      @Nullable public ParameterSelection getSelect()
      Get the "Selection".

      Presenting a choice among alternatives.

      Specified by:
      getSelect in interface IParameter
      Returns:
      the select value, or null if not set
    • setSelect

      public void setSelect(@Nullable ParameterSelection value)
      Set the "Selection".

      Presenting a choice among alternatives.

      Parameters:
      value - the select value to set, or null to clear
    • getRemarks

      @Nullable public dev.metaschema.core.datatype.markup.MarkupMultiline getRemarks()
      Get the "Remarks".

      Additional commentary about the containing object.

      Returns:
      the remarks value, or null if not set
    • setRemarks

      public void setRemarks(@Nullable dev.metaschema.core.datatype.markup.MarkupMultiline value)
      Set the "Remarks".

      Additional commentary about the containing object.

      Parameters:
      value - the remarks value to set, or null to clear
    • toString

      public String toString()
      Overrides:
      toString in class Object