@ThingworxExtensionApiClass(since={6,6}) public interface IPropertyProvider extends IPersistable
IPropertyProvider interface indicates the implementor is capable of persisting a set of properties on the Platform, as well
as defining the methods the Platform requires in order to interact with these properties.| Modifier and Type | Method and Description |
|---|---|
PropertyDefinition |
getInstancePropertyDefinition(java.lang.String name)
Returns the specified property definition for this instance. |
PropertyDefinitionCollection |
getInstancePropertyDefinitions()
Returns a collection containing all property definitions belonging to this instance. |
BaseTypes |
getPropertyType(java.lang.String propName)
Returns the base type defined in the specified property's definition. |
IPrimitiveType |
getPropertyValue(java.lang.String propName)
Returns the value currently assigned to the specified property. |
InfoTable |
getPropertyValuesAsInfoTable()
Returns an InfoTable containing a list of the properties belonging to this instance and their
values. |
boolean |
hasProperty(java.lang.String propName)
Returns true if there exists a property with the specified name. |
void |
setPropertyValue(java.lang.String propertyName,
IPrimitiveType value) |
getID, hasIDgetDescription, getName@ThingworxExtensionApiMethod(since={6,6}) IPrimitiveType getPropertyValue(java.lang.String propName) throws java.lang.Exception
propName - the name of the property to retrieve the value ofjava.lang.Exception - if propName is null, the user is unauthorized (when applicable), or an error occurs while attempting to read from
the property@ThingworxExtensionApiMethod(since={6,6}) void setPropertyValue(java.lang.String propertyName, IPrimitiveType value) throws java.lang.Exception
propertyName - the name of the property that is being modifiedvalue - the value to assign to the propertyjava.lang.Exception - If an error occurs
java.lang.Exception - if propertyName is null, the user is unauthorized (when applicable), the specified property does not exist, or
an error occurs when attempting to modify the property@ThingworxExtensionApiMethod(since={6,6}) PropertyDefinitionCollection getInstancePropertyDefinitions()
@ThingworxExtensionApiMethod(since={6,6}) PropertyDefinition getInstancePropertyDefinition(java.lang.String name)
name - the name of the property@ThingworxExtensionApiMethod(since={6,6}) InfoTable getPropertyValuesAsInfoTable() throws java.lang.Exception
InfoTable containing a list of the properties belonging to this instance and their
values.InfoTable of property names and their associated valuesjava.lang.Exception - if the user does not have permission to access the properties (when applicable), or an error occurs when attempting
to read the property values@ThingworxExtensionApiMethod(since={6,6}) boolean hasProperty(java.lang.String propName)
true if there exists a property with the specified name. Property names are case-sensitive.propName - the property name to checktrue if the specified property exists@ThingworxExtensionApiMethod(since={6,6}) BaseTypes getPropertyType(java.lang.String propName)
propName - the name of the propertyBaseTypes entry corresponding to the property type