Package org.opentcs.access.to.order
Class TransportOrderCreationTO
java.lang.Object
org.opentcs.access.to.CreationTO
org.opentcs.access.to.order.TransportOrderCreationTO
- All Implemented Interfaces:
java.io.Serializable
public class TransportOrderCreationTO extends CreationTO implements java.io.Serializable
A transfer object describing a transport order.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description TransportOrderCreationTO(java.lang.String name, java.util.List<DestinationCreationTO> destinations)
Creates a new instance. -
Method Summary
Modifier and Type Method Description java.time.Instant
getDeadline()
Returns the point of time at which execution of the transport order is supposed to be finished.java.util.Set<java.lang.String>
getDependencyNames()
Returns the (optional) names of transport orders the transport order depends on.java.util.List<DestinationCreationTO>
getDestinations()
Returns the destinations that need to be travelled to.java.lang.String
getIntendedVehicleName()
Returns the (optional) name of the vehicle that is supposed to execute the transport order.java.lang.String
getPeripheralReservationToken()
Returns an optional token for reserving peripheral devices while processing this transport order.java.lang.String
getType()
Returns the (optional) type of the transport order.java.lang.String
getWrappingSequence()
Returns the (optional) name of the order sequence the transport order belongs to.boolean
hasIncompleteName()
Indicates whether the name is incomplete and requires to be completed when creating the actual transport order.boolean
isDispensable()
Returns whether the transport order is dispensable or not.TransportOrderCreationTO
withDeadline(java.time.Instant deadline)
Creates a copy of this object with the given point of time at which execution of the transport order is supposed to be finished.TransportOrderCreationTO
withDependencyNames(java.util.Set<java.lang.String> dependencyNames)
Creates a copy of this object with the given (optional) names of transport orders the transport order depends on.TransportOrderCreationTO
withDestinations(java.util.List<DestinationCreationTO> destinations)
Creates a copy of this object with the given destinations that need to be travelled to.TransportOrderCreationTO
withDispensable(boolean dispensable)
Creates a copy of this object with the given indication whether the transport order is dispensable or not.TransportOrderCreationTO
withIncompleteName(boolean incompleteName)
Creates a copy of this object with the given nameIncomplete flag.TransportOrderCreationTO
withIntendedVehicleName(java.lang.String intendedVehicleName)
Creates a copy of this object with the given (optional) name of the vehicle that is supposed to execute the transport order.TransportOrderCreationTO
withName(java.lang.String name)
Creates a copy of this object with the given name.TransportOrderCreationTO
withPeripheralReservationToken(java.lang.String peripheralReservationToken)
Creates a copy of this object with the given (optional) peripheral reservation token.TransportOrderCreationTO
withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Creates a copy of this object with the given properties.TransportOrderCreationTO
withProperty(java.lang.String key, java.lang.String value)
Creates a copy of this object and adds the given property.TransportOrderCreationTO
withType(java.lang.String type)
Creates a copy of this object with the given (optional) type of the transport order.TransportOrderCreationTO
withWrappingSequence(java.lang.String wrappingSequence)
Creates a copy of this object with the given (optional) name of the order sequence the transport order belongs to.Methods inherited from class org.opentcs.access.to.CreationTO
getModifiableProperties, getName, getProperties, listWithAppendix, mapWithMapping, propertiesWith
-
Constructor Details
-
TransportOrderCreationTO
public TransportOrderCreationTO(@Nonnull java.lang.String name, @Nonnull java.util.List<DestinationCreationTO> destinations)Creates a new instance.- Parameters:
name
- The name of this transport order.destinations
- The destinations that need to be travelled to.
-
-
Method Details
-
withName
Creates a copy of this object with the given name.- Overrides:
withName
in classCreationTO
- Parameters:
name
- The new name of the instance.- Returns:
- A copy of this object, differing in the given name.
-
withProperties
public TransportOrderCreationTO withProperties(@Nonnull java.util.Map<java.lang.String,java.lang.String> properties)Creates a copy of this object with the given properties.- Overrides:
withProperties
in classCreationTO
- Parameters:
properties
- The new properties.- Returns:
- A copy of this object, differing in the given value.
-
withProperty
public TransportOrderCreationTO withProperty(@Nonnull java.lang.String key, @Nonnull java.lang.String value)Creates a copy of this object and adds the given property. If value == null, then the key-value pair is removed from the properties.- Overrides:
withProperty
in classCreationTO
- Parameters:
key
- the key.value
- the value- Returns:
- A copy of this object that either includes the given entry in it's current properties, if value != null or excludes the entry otherwise.
-
hasIncompleteName
public boolean hasIncompleteName()Indicates whether the name is incomplete and requires to be completed when creating the actual transport order. (How exactly this is done is decided by the kernel.)- Returns:
true
if, and only if, the name is incomplete and requires to be completed by the kernel.
-
withIncompleteName
Creates a copy of this object with the given nameIncomplete flag.- Parameters:
incompleteName
- Whether the name is incomplete and requires to be completed when creating the actual transport order.- Returns:
- A copy of this object, differing in the given value.
-
getDestinations
Returns the destinations that need to be travelled to.- Returns:
- The destinations that need to be travelled to.
-
withDestinations
public TransportOrderCreationTO withDestinations(@Nonnull java.util.List<DestinationCreationTO> destinations)Creates a copy of this object with the given destinations that need to be travelled to.- Parameters:
destinations
- The destinations.- Returns:
- A copy of this object, differing in the given derstinations.
-
getPeripheralReservationToken
@Nullable public java.lang.String getPeripheralReservationToken()Returns an optional token for reserving peripheral devices while processing this transport order.- Returns:
- An optional token for reserving peripheral devices while processing this transport order.
-
withPeripheralReservationToken
public TransportOrderCreationTO withPeripheralReservationToken(@Nullable java.lang.String peripheralReservationToken)Creates a copy of this object with the given (optional) peripheral reservation token.- Parameters:
peripheralReservationToken
- The token.- Returns:
- A copy of this object, differing in the given peripheral reservation token.
-
getWrappingSequence
@Nullable public java.lang.String getWrappingSequence()Returns the (optional) name of the order sequence the transport order belongs to.- Returns:
- The (optional) name of the order sequence the transport order belongs to.
-
withWrappingSequence
Creates a copy of this object with the given (optional) name of the order sequence the transport order belongs to.- Parameters:
wrappingSequence
- The name of the sequence.- Returns:
- A copy of this object, differing in the given name of the sequence.
-
getDependencyNames
@Nonnull public java.util.Set<java.lang.String> getDependencyNames()Returns the (optional) names of transport orders the transport order depends on.- Returns:
- The (optional) names of transport orders the transport order depends on.
-
withDependencyNames
public TransportOrderCreationTO withDependencyNames(@Nonnull java.util.Set<java.lang.String> dependencyNames)Creates a copy of this object with the given (optional) names of transport orders the transport order depends on.- Parameters:
dependencyNames
- The dependency names.- Returns:
- A copy of this object, differing in the given dependency names.
-
getIntendedVehicleName
@Nullable public java.lang.String getIntendedVehicleName()Returns the (optional) name of the vehicle that is supposed to execute the transport order.- Returns:
- The (optional) name of the vehicle that is supposed to execute the transport order.
-
withIntendedVehicleName
public TransportOrderCreationTO withIntendedVehicleName(@Nullable java.lang.String intendedVehicleName)Creates a copy of this object with the given (optional) name of the vehicle that is supposed to execute the transport order.- Parameters:
intendedVehicleName
- The vehicle name.- Returns:
- A copy of this object, differing in the given vehicle's name.
-
getType
@Nonnull public java.lang.String getType()Returns the (optional) type of the transport order.- Returns:
- The (optional) type of the transport order.
-
withType
Creates a copy of this object with the given (optional) type of the transport order.- Parameters:
type
- The type.- Returns:
- A copy of this object, differing in the given type.
-
getDeadline
@Nonnull public java.time.Instant getDeadline()Returns the point of time at which execution of the transport order is supposed to be finished.- Returns:
- The point of time at which execution of the transport order is supposed to be finished.
-
withDeadline
Creates a copy of this object with the given point of time at which execution of the transport order is supposed to be finished.- Parameters:
deadline
- The deadline.- Returns:
- A copy of this object, differing in the given deadline.
-
isDispensable
public boolean isDispensable()Returns whether the transport order is dispensable or not.- Returns:
- Whether the transport order is dispensable or not.
-
withDispensable
Creates a copy of this object with the given indication whether the transport order is dispensable or not.- Parameters:
dispensable
- The dispensable flag.- Returns:
- A copy of this object, differing in the given dispensable flag.
-