Schnittstelle TCSObjectService
- Alle bekannten Unterschnittstellen:
InternalPeripheralJobService
,InternalPeripheralService
,InternalPlantModelService
,InternalTransportOrderService
,InternalVehicleService
,PeripheralJobService
,PeripheralService
,PlantModelService
,TransportOrderService
,VehicleService
public interface TCSObjectService
Provides methods concerning
TCSObject
s.-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
appendObjectHistoryEntry
(TCSObjectReference<?> ref, ObjectHistory.Entry entry) Appends a history entry to aTCSObject
.<T extends TCSObject<T>>
TfetchObject
(Class<T> clazz, String name) Returns a singleTCSObject
of the given class.<T extends TCSObject<T>>
TfetchObject
(Class<T> clazz, TCSObjectReference<T> ref) Returns a singleTCSObject
of the given class.fetchObjects
(Class<T> clazz) Returns all existingTCSObject
s of the given class.fetchObjects
(Class<T> clazz, Predicate<? super T> predicate) Returns all existingTCSObject
s of the given class for which the given predicate is true.void
updateObjectProperty
(TCSObjectReference<?> ref, String key, String value) Updates aTCSObject
's property.
-
Methodendetails
-
fetchObject
<T extends TCSObject<T>> T fetchObject(Class<T> clazz, TCSObjectReference<T> ref) throws KernelRuntimeException Returns a singleTCSObject
of the given class.- Typparameter:
T
- The TCSObject's actual type.- Parameter:
clazz
- The class of the object to be returned.ref
- A reference to the object to be returned.- Gibt zurück:
- A copy of the referenced object, or
null
if no such object exists or if an object exists but is not an instance of the given class. - Löst aus:
KernelRuntimeException
- In case there is an exception executing this method.
-
fetchObject
Returns a singleTCSObject
of the given class.- Typparameter:
T
- The TCSObject's actual type.- Parameter:
clazz
- The class of the object to be returned.name
- The name of the object to be returned.- Gibt zurück:
- A copy of the named object, or
null
if no such object exists or if an object exists but is not an instance of the given class. - Löst aus:
KernelRuntimeException
- In case there is an exception executing this method.
-
fetchObjects
Returns all existingTCSObject
s of the given class.- Typparameter:
T
- The TCSObjects' actual type.- Parameter:
clazz
- The class of the objects to be returned.- Gibt zurück:
- Copies of all existing objects of the given class.
- Löst aus:
KernelRuntimeException
- In case there is an exception executing this method.
-
fetchObjects
<T extends TCSObject<T>> Set<T> fetchObjects(@Nonnull Class<T> clazz, @Nonnull Predicate<? super T> predicate) throws KernelRuntimeException Returns all existingTCSObject
s of the given class for which the given predicate is true.- Typparameter:
T
- The TCSObjects' actual type.- Parameter:
clazz
- The class of the objects to be returned.predicate
- The predicate that must be true for returned objects.- Gibt zurück:
- Copies of all existing objects of the given class for which the given predicate is true. If no such objects exist, the returned set will be empty.
- Löst aus:
KernelRuntimeException
- In case there is an exception executing this method.
-
updateObjectProperty
void updateObjectProperty(TCSObjectReference<?> ref, String key, @Nullable String value) throws ObjectUnknownException, KernelRuntimeException Updates aTCSObject
's property.- Parameter:
ref
- A reference to the TCSObject to be modified.key
- The property's key.value
- The property's (new) value. Ifnull
, removes the property from the object.- Löst aus:
ObjectUnknownException
- If the referenced object does not exist.KernelRuntimeException
- In case there is an exception executing this method.
-
appendObjectHistoryEntry
void appendObjectHistoryEntry(TCSObjectReference<?> ref, ObjectHistory.Entry entry) throws ObjectUnknownException, KernelRuntimeException Appends a history entry to aTCSObject
.- Parameter:
ref
- A reference to the TCSObject to be modified.entry
- The history entry to be appended.- Löst aus:
ObjectUnknownException
- If the referenced object does not exist.KernelRuntimeException
- In case there is an exception executing this method.
-