Class PeripheralJobCreationTO
java.lang.Object
org.opentcs.access.to.CreationTO
org.opentcs.access.to.peripherals.PeripheralJobCreationTO
- All Implemented Interfaces:
java.io.Serializable
public class PeripheralJobCreationTO extends CreationTO implements java.io.Serializable
A transfer object describing a peripheral job.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description PeripheralJobCreationTO(java.lang.String name, java.lang.String reservationToken, PeripheralOperationCreationTO peripheralOperation)
Creates a new instance. -
Method Summary
Modifier and Type Method Description PeripheralOperationCreationTO
getPeripheralOperation()
Returns the operation that is to be performed by the pripheral device.java.lang.String
getRelatedTransportOrderName()
Returns the name of the transport order for which this peripheral job is to be created.java.lang.String
getRelatedVehicleName()
Returns the name of the vehicle for which this peripheral job is to be created.java.lang.String
getReservationToken()
Returns the token that may be used to reserve a peripheral device.boolean
hasIncompleteName()
Indicates whether the name is incomplete and requires to be completed when creating the actual transport order.PeripheralJobCreationTO
withIncompleteName(boolean incompleteName)
Creates a copy of this object, with the given incomplete name flag.PeripheralJobCreationTO
withName(java.lang.String name)
Creates a copy of this object with the given name.PeripheralJobCreationTO
withPeripheralOperation(PeripheralOperationCreationTO peripheralOperation)
Creates a copy of this object, with the given peripheral operation.PeripheralJobCreationTO
withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Creates a copy of this object with the given properties.PeripheralJobCreationTO
withProperty(java.lang.String key, java.lang.String value)
Creates a copy of this object with the given property.PeripheralJobCreationTO
withRelatedTransportOrderName(java.lang.String relatedTransportOrderName)
Creates a copy of this object, with the given related transport order name.PeripheralJobCreationTO
withRelatedVehicleName(java.lang.String relatedVehicleName)
Creates a copy of this object, with the given related vehicle name.PeripheralJobCreationTO
withReservationToken(java.lang.String reservationToken)
Creates a copy of this object, with the given reservation token.Methods inherited from class org.opentcs.access.to.CreationTO
getModifiableProperties, getName, getProperties, listWithAppendix, mapWithMapping, propertiesWith
-
Constructor Details
-
PeripheralJobCreationTO
public PeripheralJobCreationTO(@Nonnull java.lang.String name, @Nonnull java.lang.String reservationToken, @Nonnull PeripheralOperationCreationTO peripheralOperation)Creates a new instance.- Parameters:
name
- The name of this peripheral job.reservationToken
- The reservation token to be used.peripheralOperation
- The peripheral operation to be performed.
-
-
Method Details
-
withName
Description copied from class:CreationTO
Creates a copy of this object with the given name.- Overrides:
withName
in classCreationTO
- Parameters:
name
- the new name- Returns:
- A copy of this object, differing in the given value.
-
withProperties
public PeripheralJobCreationTO withProperties(@Nonnull java.util.Map<java.lang.String,java.lang.String> properties)Description copied from class:CreationTO
Creates a copy of this object with the given properties.- Overrides:
withProperties
in classCreationTO
- Parameters:
properties
- The properties.- Returns:
- A copy of this object with the given properties.
-
withProperty
public PeripheralJobCreationTO withProperty(@Nonnull java.lang.String key, @Nonnull java.lang.String value)Description copied from class:CreationTO
Creates a copy of this object with the given property. If value == null is true 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 includes the given property or removes the entry, if value == null.
-
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 incomplete name flag.- Parameters:
incompleteName
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
getReservationToken
public java.lang.String getReservationToken()Returns the token that may be used to reserve a peripheral device.- Returns:
- The token that may be used to reserve a peripheral device.
-
withReservationToken
Creates a copy of this object, with the given reservation token.- Parameters:
reservationToken
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
getRelatedVehicleName
@Nullable public java.lang.String getRelatedVehicleName()Returns the name of the vehicle for which this peripheral job is to be created.- Returns:
- The name of the vehicle for which this peripheral job is to be created.
-
withRelatedVehicleName
public PeripheralJobCreationTO withRelatedVehicleName(@Nullable java.lang.String relatedVehicleName)Creates a copy of this object, with the given related vehicle name.- Parameters:
relatedVehicleName
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
getRelatedTransportOrderName
@Nullable public java.lang.String getRelatedTransportOrderName()Returns the name of the transport order for which this peripheral job is to be created.- Returns:
- The name of the transport order for which this peripheral job is to be created.
-
withRelatedTransportOrderName
public PeripheralJobCreationTO withRelatedTransportOrderName(@Nullable java.lang.String relatedTransportOrderName)Creates a copy of this object, with the given related transport order name.- Parameters:
relatedTransportOrderName
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
getPeripheralOperation
Returns the operation that is to be performed by the pripheral device.- Returns:
- The operation that is to be performed by the pripheral device.
-
withPeripheralOperation
public PeripheralJobCreationTO withPeripheralOperation(PeripheralOperationCreationTO peripheralOperation)Creates a copy of this object, with the given peripheral operation.- Parameters:
peripheralOperation
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-