Class Protocol

java.lang.Object
dev.metaschema.oscal.lib.model.Protocol
All Implemented Interfaces:
dev.metaschema.core.model.IBoundObject

@MetaschemaAssembly(formalName="Service Protocol Information", description="Information about the protocol used to provide a service.", name="protocol", moduleClass=OscalImplementationCommonModule.class, valueConstraints=@ValueConstraints(expect=@Expect(id="oscal-component-protocol-uuid",level=WARNING,test="@uuid",message="It is a best practice to provide a UUID."))) public class Protocol extends Object implements dev.metaschema.core.model.IBoundObject
Information about the protocol used to provide a service.
  • Constructor Details

    • Protocol

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

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

      @Nullable public UUID getUuid()
      Get the "Service Protocol Information Universally Unique Identifier".

      A machine-oriented, globally unique identifier with cross-instance scope that can be used to reference this service protocol information elsewhere in this or other OSCAL instances. The locally defined UUID of the service protocol can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned per-subject, which means it should be consistently used to identify the same subject across revisions of the document.

      Returns:
      the uuid value, or null if not set
    • setUuid

      public void setUuid(@Nullable UUID value)
      Set the "Service Protocol Information Universally Unique Identifier".

      A machine-oriented, globally unique identifier with cross-instance scope that can be used to reference this service protocol information elsewhere in this or other OSCAL instances. The locally defined UUID of the service protocol can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned per-subject, which means it should be consistently used to identify the same subject across revisions of the document.

      Parameters:
      value - the uuid value to set, or null to clear
    • getName

      @Nullable public String getName()
      Get the "Protocol Name".

      The common name of the protocol, which should be the appropriate "service name" from the IANA Service Name and Transport Protocol Port Number Registry.

      Returns:
      the name value, or null if not set
    • setName

      public void setName(@Nullable String value)
      Set the "Protocol Name".

      The common name of the protocol, which should be the appropriate "service name" from the IANA Service Name and Transport Protocol Port Number Registry.

      Parameters:
      value - the name value to set, or null to clear
    • getTitle

      @Nullable public dev.metaschema.core.datatype.markup.MarkupLine getTitle()
      Get the "Protocol Title".

      A human readable name for the protocol (e.g., Transport Layer Security).

      Returns:
      the title value, or null if not set
    • setTitle

      public void setTitle(@Nullable dev.metaschema.core.datatype.markup.MarkupLine value)
      Set the "Protocol Title".

      A human readable name for the protocol (e.g., Transport Layer Security).

      Parameters:
      value - the title value to set, or null to clear
    • getPortRanges

      @NonNull public List<PortRange> getPortRanges()
      Get the "Port Range".

      Where applicable this is the transport layer protocol port range an IPv4-based or IPv6-based service uses.

      Returns:
      the port-range value
    • setPortRanges

      public void setPortRanges(@NonNull List<PortRange> value)
      Set the "Port Range".

      Where applicable this is the transport layer protocol port range an IPv4-based or IPv6-based service uses.

      Parameters:
      value - the port-range value to set
    • addPortRange

      public boolean addPortRange(PortRange item)
      Add a new PortRange item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removePortRange

      public boolean removePortRange(PortRange item)
      Remove the first matching PortRange 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