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:
Serializable
A transfer object describing a transport order.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTransportOrderCreationTO
(String name, List<DestinationCreationTO> destinations) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the point of time at which execution of the transport order is supposed to be finished.Returns the (optional) names of transport orders the transport order depends on.Returns the destinations that need to be travelled to.Returns the (optional) name of the vehicle that is supposed to execute the transport order.Returns an optional token for reserving peripheral devices while processing this transport order.getType()
Returns the (optional) type of the transport order.Returns the (optional) name of the order sequence the transport order belongs to.boolean
Indicates whether the name is incomplete and requires to be completed when creating the actual transport order.boolean
Returns whether the transport order is dispensable or not.withDeadline
(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.withDependencyNames
(Set<String> dependencyNames) Creates a copy of this object with the given (optional) names of transport orders the transport order depends on.withDestinations
(List<DestinationCreationTO> destinations) Creates a copy of this object with the given destinations that need to be travelled to.withDispensable
(boolean dispensable) Creates a copy of this object with the given indication whether the transport order is dispensable or not.withIncompleteName
(boolean incompleteName) Creates a copy of this object with the given nameIncomplete flag.withIntendedVehicleName
(String intendedVehicleName) Creates a copy of this object with the given (optional) name of the vehicle that is supposed to execute the transport order.Creates a copy of this object with the given name.withPeripheralReservationToken
(String peripheralReservationToken) Creates a copy of this object with the given (optional) peripheral reservation token.withProperties
(Map<String, String> properties) Creates a copy of this object with the given properties.withProperty
(String key, String value) Creates a copy of this object and adds the given property.Creates a copy of this object with the given (optional) type of the transport order.withWrappingSequence
(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 String name, @Nonnull 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
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
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
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
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 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
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
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
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
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
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
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
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.
-