Package dev.metaschema.oscal.lib.model
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEnd()Get the "End".dev.metaschema.core.model.IMetaschemaDatagetStart()Get the "Start".Get the "Transport".voidsetEnd(BigInteger value) Set the "End".voidsetStart(BigInteger value) Set the "Start".voidsetTransport(String value) Set the "Transport".toString()
-
Constructor Details
-
PortRange
public PortRange()Constructs a newdev.metaschema.oscal.lib.model.PortRangeinstance with no metadata. -
PortRange
Constructs a newdev.metaschema.oscal.lib.model.PortRangeinstance with the specified metadata.- Parameters:
data- the metaschema data, ornullif none
-
-
Method Details
-
getMetaschemaData
- Specified by:
getMetaschemaDatain interfacedev.metaschema.core.model.IBoundObject
-
getStart
Get the "Start".Indicates the starting port number in a port range for a transport layer protocol
- Returns:
- the start value, or
nullif not set
-
setStart
Set the "Start".Indicates the starting port number in a port range for a transport layer protocol
- Parameters:
value- the start value to set, ornullto clear
-
getEnd
Get the "End".Indicates the ending port number in a port range for a transport layer protocol
- Returns:
- the end value, or
nullif not set
-
setEnd
Set the "End".Indicates the ending port number in a port range for a transport layer protocol
- Parameters:
value- the end value to set, ornullto clear
-
getTransport
Get the "Transport".Indicates the transport type.
- Returns:
- the transport value, or
nullif not set
-
setTransport
Set the "Transport".Indicates the transport type.
- Parameters:
value- the transport value to set, ornullto clear
-
toString
-