Class PortRange

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

@MetaschemaAssembly(formalName="Port Range", description="Where applicable this is the transport layer protocol port range an IPv4-based or IPv6-based service uses.", name="port-range", moduleClass=OscalImplementationCommonModule.class, remarks="To be validated as a natural number (integer \\>= 1). A single port uses the same value for start and end. Use multiple \'port-range\' entries for non-contiguous ranges.", valueConstraints=@Expect(id="oscal-component-protocol-port-range-has-start",level=WARNING,test="exists(@start)",message="A port range should have a start port given.") @Expect(id="oscal-component-protocol-port-range-has-end",level=WARNING,test="exists(@end)",message="A port range should have an end port given. To define a single port, the start and end should be the same value.") @Expect(id="oscal-component-protocol-port-range-starts-before-end",level=WARNING,test="not(@start > @end)",message="The port range start should not be after its end.")) public class PortRange extends Object implements dev.metaschema.core.model.IBoundObject
Where applicable this is the transport layer protocol port range an IPv4-based or IPv6-based service uses.
  • Constructor Details

    • PortRange

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

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

      @Nullable public BigInteger getStart()
      Get the "Start".

      Indicates the starting port number in a port range for a transport layer protocol

      Returns:
      the start value, or null if not set
    • setStart

      public void setStart(@Nullable BigInteger value)
      Set the "Start".

      Indicates the starting port number in a port range for a transport layer protocol

      Parameters:
      value - the start value to set, or null to clear
    • getEnd

      @Nullable public BigInteger getEnd()
      Get the "End".

      Indicates the ending port number in a port range for a transport layer protocol

      Returns:
      the end value, or null if not set
    • setEnd

      public void setEnd(@Nullable BigInteger value)
      Set the "End".

      Indicates the ending port number in a port range for a transport layer protocol

      Parameters:
      value - the end value to set, or null to clear
    • getTransport

      @Nullable public String getTransport()
      Get the "Transport".

      Indicates the transport type.

      Returns:
      the transport value, or null if not set
    • setTransport

      public void setTransport(@Nullable String value)
      Set the "Transport".

      Indicates the transport type.

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

      public String toString()
      Overrides:
      toString in class Object