Class ProfileSelectControlById

All Implemented Interfaces:
dev.metaschema.core.model.IBoundObject, IProfileSelectControlById

@MetaschemaAssembly(formalName="Select Control", description="Select a control or controls from an imported control set.", name="select-control-by-id", moduleClass=OscalProfileModule.class, remarks="If `with-child-controls` is \"yes\" on the call to a control, no sibling `call`elements need to be used to call any controls appearing within it. Since generally, this is how control enhancements are represented (as controls within controls), this provides a way to include controls with all their dependent controls (enhancements) without having to call them individually.") public class ProfileSelectControlById extends AbstractProfileSelectControlById implements dev.metaschema.core.model.IBoundObject
Select a control or controls from an imported control set.
  • Constructor Details

    • ProfileSelectControlById

      Constructs a new dev.metaschema.oscal.lib.model.ProfileSelectControlById instance with no metadata.
    • ProfileSelectControlById

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

      @Nullable public String getWithChildControls()
      Get the "Include Contained Controls with Control".

      When a control is included, whether its child (dependent) controls are also included.

      Specified by:
      getWithChildControls in interface IProfileSelectControlById
      Returns:
      the with-child-controls value, or null if not set
    • setWithChildControls

      public void setWithChildControls(@Nullable String value)
      Set the "Include Contained Controls with Control".

      When a control is included, whether its child (dependent) controls are also included.

      Parameters:
      value - the with-child-controls value to set, or null to clear
    • getWithIds

      @NonNull public List<String> getWithIds()
      Get the "Match Controls by Identifier".

      Selecting a control by its ID given as a literal.

      Specified by:
      getWithIds in interface IProfileSelectControlById
      Returns:
      the with-id value
    • setWithIds

      public void setWithIds(@NonNull List<String> value)
      Set the "Match Controls by Identifier".

      Selecting a control by its ID given as a literal.

      Parameters:
      value - the with-id value to set
    • addWithId

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

      public boolean removeWithId(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
    • getMatching

      @NonNull public List<ProfileMatching> getMatching()
      Get the "Match Controls by Pattern".

      Selecting a set of controls by matching their IDs with a wildcard pattern.

      Specified by:
      getMatching in interface IProfileSelectControlById
      Returns:
      the matching value
    • setMatching

      public void setMatching(@NonNull List<ProfileMatching> value)
      Set the "Match Controls by Pattern".

      Selecting a set of controls by matching their IDs with a wildcard pattern.

      Parameters:
      value - the matching value to set
    • addMatching

      public boolean addMatching(ProfileMatching item)
      Add a new ProfileMatching item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeMatching

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

      public String toString()
      Overrides:
      toString in class Object