Package com.seeq.link.sdk.services
Interface Transformable<T>
- Type Parameters:
T
- The type of the input object to be transformed.
- All Known Implementing Classes:
TransformableAsset
,TransformableCapsule
,TransformableCondition
,TransformableUserGroup
public interface Transformable<T>
A common interface to wrap API input objects that can be modified by
PropertyTransformer
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Return a copy of this Transformable object.Get the underlying API input object that backs this Transformable.getProperty
(String propertyName) Returns the value for the given property.void
removeProperty
(String propertyName) Removes a property.default void
setProperty
(String propertyName, Object propertyValue) Sets the value for the given property.void
setProperty
(String propertyName, Object propertyValue, String unitOfMeasure) Sets the value for the given property.
-
Method Details
-
getProperty
Returns the value for the given property.- Parameters:
propertyName
- The property to get.- Returns:
- The value, as a string, boolean, int or double.
-
setProperty
Sets the value for the given property.- Parameters:
propertyName
- The property to set.propertyValue
- The value to set. Many properties are restricted to certain value types (e.g. 'Name' will almost always have to be a string).
-
setProperty
Sets the value for the given property.- Parameters:
propertyName
- The property to set.propertyValue
- The value to set. Many properties are restricted to certain value types (e.g. 'Name' will almost always have to be a string).unitOfMeasure
- The unit of measure to set on the property. Optional, and may be ignored for certain properties.
-
copy
Transformable<T> copy()Return a copy of this Transformable object.- Returns:
- A copy of this object.
-
getInputObject
T getInputObject()Get the underlying API input object that backs this Transformable.- Returns:
- A Seeq API input object.
-
removeProperty
Removes a property.- Parameters:
propertyName
- The property to remove.
-