Class Modify.Alter

java.lang.Object
dev.metaschema.oscal.lib.model.Modify.Alter
All Implemented Interfaces:
dev.metaschema.core.model.IBoundObject
Enclosing class:
Modify

@MetaschemaAssembly(formalName="Alteration", description="Specifies changes to be made to an included control when a profile is resolved.", name="alter", moduleClass=OscalProfileModule.class, remarks="Use `@control-id` to indicate the scope of alteration.\n\nIt is an error for two `alter` elements to apply to the same control. In practice, multiple alterations can be applied (together), but it creates confusion.\n\nAt present, no provision is made for altering many controls at once (for example, to systematically remove properties or add global properties); extending this element to match multiple control IDs could provide for this.") public static class Modify.Alter extends Object implements dev.metaschema.core.model.IBoundObject
Specifies changes to be made to an included control when a profile is resolved.
  • Constructor Details

    • Alter

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

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

      @NonNull public String getControlId()
      Get the "Control Identifier Reference".

      A reference to a control with a corresponding id value. When referencing an externally defined control, the Control Identifier Reference must be used in the context of the external / imported OSCAL instance (e.g., uri-reference).

      Returns:
      the control-id value
    • setControlId

      public void setControlId(@NonNull String value)
      Set the "Control Identifier Reference".

      A reference to a control with a corresponding id value. When referencing an externally defined control, the Control Identifier Reference must be used in the context of the external / imported OSCAL instance (e.g., uri-reference).

      Parameters:
      value - the control-id value to set
    • getRemoves

      @NonNull public List<Modify.Alter.Remove> getRemoves()
      Get the "Removal".

      Specifies objects to be removed from a control based on specific aspects of the object that must all match.

      Returns:
      the remove value
    • setRemoves

      public void setRemoves(@NonNull List<Modify.Alter.Remove> value)
      Set the "Removal".

      Specifies objects to be removed from a control based on specific aspects of the object that must all match.

      Parameters:
      value - the remove value to set
    • addRemove

      public boolean addRemove(Modify.Alter.Remove item)
      Add a new Modify.Alter.Remove item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeRemove

      public boolean removeRemove(Modify.Alter.Remove item)
      Remove the first matching Modify.Alter.Remove item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • getAdds

      @NonNull public List<Modify.Alter.Add> getAdds()
      Get the "Addition".

      Specifies contents to be added into controls, in resolution.

      Returns:
      the add value
    • setAdds

      public void setAdds(@NonNull List<Modify.Alter.Add> value)
      Set the "Addition".

      Specifies contents to be added into controls, in resolution.

      Parameters:
      value - the add value to set
    • addAdd

      public boolean addAdd(Modify.Alter.Add item)
      Add a new Modify.Alter.Add item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeAdd

      public boolean removeAdd(Modify.Alter.Add item)
      Remove the first matching Modify.Alter.Add 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