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 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

      public TransportOrderCreationTO withName​(@Nonnull java.lang.String name)
      Creates a copy of this object with the given name.
      Overrides:
      withName in class CreationTO
      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 class CreationTO
      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 class CreationTO
      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

      public TransportOrderCreationTO withIncompleteName​(boolean incompleteName)
      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

      @Nonnull public java.util.List<DestinationCreationTO> 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

      public TransportOrderCreationTO withWrappingSequence​(@Nullable java.lang.String wrappingSequence)
      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

      public TransportOrderCreationTO withType​(@Nonnull java.lang.String type)
      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

      public TransportOrderCreationTO withDeadline​(@Nonnull 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.
      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

      public TransportOrderCreationTO withDispensable​(boolean dispensable)
      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.