Class RootEntity
- java.lang.Object
-
- com.thingworx.types.NamedObject
-
- com.thingworx.persistence.common.PersistableNamedObject
-
- com.thingworx.entities.RootEntity
-
- All Implemented Interfaces:
IConfigurableObject
,INotScriptFriendly
,ISupportsDeprecation
,IDiffableObject
,IAvatar
,IEntityLifeCycleEvent
,ITaggableObject
,IDependencyScannableObject
,IEntityDefinition
,IPersistableObject<java.lang.String>
,IDesignTimeSecurable
,IDesignTimeSecurableEntity
,IRunTimeSecurable
,IRunTimeSecurableEntity
,ISecurable
,IVisibilitySecurable
,IVisibilitySecurableEntity
,IAspectContainer
,INamedObject
,java.io.Serializable
- Direct Known Subclasses:
ServiceProviderEntity
,Thing
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public abstract class RootEntity extends PersistableNamedObject implements INotScriptFriendly, IEntityDefinition, IConfigurableObject, IDesignTimeSecurableEntity, IRunTimeSecurableEntity, IVisibilitySecurableEntity, IAvatar, IAspectContainer, ITaggableObject, IDiffableObject, IEntityLifeCycleEvent, IDependencyScannableObject, ISupportsDeprecation
The base class for all persistable entities in Thingworx.
The
RootEntity
class defines the minimum amount of functionality required for all entities that are available in the Thingworx platform, as well as providing the necessary methods to handle the entity lifecycle. All entities in Thingworx must extend this class or one of its subclasses.All entities have the following lifecycle, at a minimum (subclasses may introduce new events):
Inactive ? Preinitializing ? Validating ? Initializing ? Cleaning Up ? DisposingThese lifecycle events have the following methods:
State Method Description Preinitialize preInitializeEntity()
Occurs only during the import process. Validate validateConfiguration(ImportedEntityCollection)
Occurs only during the entity import process. Validates all requirements of the entity. Initialize initializeEntity(ContextType)
Initializes the entity. Should be used to initialize the state of the entity based on the patch operation. Cleanup cleanupEntity(ContextType)
Deactivates the entity. Should be used to clean up any managed or long-lived artifacts. Dispose dispose()
Removes any remaining references to this entity. RootEntity
is not thread-safe nor is it designed to be mutated by multiple threads simultaneously.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static PropertyDefinitionCollection
BASIC_PROPERTY_DEFINITIONS
Set of basic properties for any entity.static java.util.Set<RelationshipTypes.ThingworxRelationshipTypes>
EXCLUDED_ENTITY_TYPES_IN_PROJECT
-
Fields inherited from class com.thingworx.types.NamedObject
NAME_COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description RootEntity()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
AddConfigurationTableDefinition(java.lang.String name, java.lang.String description, java.lang.String category, java.lang.Integer ordinal, java.lang.Boolean isHidden, java.lang.Boolean isMultiRow, java.lang.String dataShapeName)
Deprecated.void
AddConfigurationTableDefinition(java.lang.String name, java.lang.String description, java.lang.String category, java.lang.Integer ordinal, java.lang.Boolean isHidden, java.lang.Boolean isMultiRow, java.lang.String dataShapeName, org.json.JSONObject accessModifier)
Service Category: Configuration Service Description: Adds a ConfigurationTableDefinition and creates and ConfigurationTable from the definition.void
addDesignTimePermission(PermissionTypes permissionType, Permission permission)
void
AddDesignTimePermission(java.lang.String type, java.lang.String principal, java.lang.String principalType, java.lang.Boolean allow)
Service Category: Permissions Service Description: Add a design time permission.void
addRunTimePermission(PermissionTypes permissionType, java.lang.String resourceName, Permission permission)
void
AddRunTimePermission(java.lang.String type, java.lang.String resource, java.lang.String principal, java.lang.String principalType, java.lang.Boolean allow)
Service Category: Permissions Service Description: Add a run time permission.void
AddTags(TagCollection tags)
Service Category: Metadata Service Description: Append additional tags to an entity.void
addVisibilityPermission(PermissionTypes permissionType, Permission permission)
void
AddVisibilityPermission(java.lang.String principal, java.lang.String principalType)
Service Category: Permissions Service Description: Add a visibility permission.java.lang.Boolean
CheckDesignTimePermission(java.lang.String type)
Service Category: Permissions Service Description: Check to see if an entity has a specific design time permission for the current user.java.lang.Boolean
CheckDesignTimePermissionForGroup(java.lang.String group, java.lang.String type)
Service Category: Permissions Service Description: Check to see if an entity has a specific design time permission for a specific group.java.lang.Boolean
CheckDesignTimePermissionForUser(java.lang.String user, java.lang.String type)
Service Category: Permissions Service Description: Check to see if an entity has a specific design time permission for a specific user.java.lang.Boolean
CheckPermission(java.lang.String type, java.lang.String name)
Service Category: Permissions Service Description: Check to see if an entity has a specific run time permission for the current user.java.lang.Boolean
CheckPermissionForGroup(java.lang.String group, java.lang.String type, java.lang.String name)
Service Category: Permissions Service Description: Check to see if an entity has a specific run time permission for a specific group.java.lang.Boolean
CheckPermissionForUser(java.lang.String user, java.lang.String type, java.lang.String name)
Service Category: Permissions Service Description: Check to see if an entity has a specific run time permission for a specific user.void
cleanupEntity(ContextType contextType)
void
DeleteAllConfigurationTableRows(java.lang.String tableName, java.lang.Boolean persistent)
Service Category: Configuration Service Description: Delete all rows from a multi-row configuration table.void
DeleteConfigurationTable(java.lang.String tableName, java.lang.Boolean persistent)
Service Category: Configuration Service Description: Delete an entire configuration table.void
DeleteConfigurationTableRows(java.lang.String tableName, InfoTable values, java.lang.Boolean persistent)
Deprecated.void
DeleteConfigurationTableRows(java.lang.String tableName, InfoTable values, java.lang.Boolean persistent, java.lang.Boolean removeAllMatchingRows)
Service Category: Configuration Service Description: Delete one or more rows from a multi-row configuration table.void
deleteDesignTimePermission(PermissionTypes permissionType, Permission permission)
void
DeleteDesignTimePermission(java.lang.String type, java.lang.String principal, java.lang.String principalType)
Service Category: Permissions Service Description: Delete a design time permission.void
deleteRunTimePermission(PermissionTypes permissionType, java.lang.String resourceName, Permission permission)
void
DeleteRunTimePermission(java.lang.String type, java.lang.String resource, java.lang.String principal, java.lang.String principalType)
Service Category: Permissions Service Description: Delete a run time permission.void
deleteVisibilityPermission(PermissionTypes permissionType, Permission permission)
void
DeleteVisibilityPermission(java.lang.String principal, java.lang.String principalType)
Service Category: Permissions Service Description: Delete a visibility permission.void
dispose()
AspectCollection
getAspects()
ImagePrimitive
GetAvatar()
Service Category: Metadata Service Description: Get avatar image.byte[]
getAvatarContent()
java.lang.String
GetAvatarURL()
Service Category: Metadata Service Description: Get avatar image url.InfoTable
GetConfigurationChangeHistory()
Service Category: Editing Service Description: Get the configuration change history.java.lang.Object
getConfigurationSetting(java.lang.String table, java.lang.String property)
ConfigurationTable
getConfigurationTable(java.lang.String table)
InfoTable
GetConfigurationTable(java.lang.String tableName)
Service Category: Configuration Service Description: Get a specific configuration table as an InfoTable.InfoTable
GetConfigurationTableDefinition(java.lang.String tableName)
Service Category: Configuration Service Description: Get a specific configuration table definition as an InfoTable.InfoTable
GetConfigurationTableRow(java.lang.String tableName, java.lang.String key)
Service Category: Configuration Service Description: Get a specific configuration table row as an InfoTable.InfoTable
GetConfigurationTables()
Service Category: Configuration Service Description: Get a list of configuration tables.java.lang.String
GetDescription()
Service Category: Metadata Service Description: Get the description for an entity.DesignTimePermissionCollection
getDesignTimePermissions()
InfoTable
GetDesignTimePermissions()
Service Category: Permissions Service Description: Get a list of assigned design time permissions.org.json.JSONObject
GetDesignTimePermissionsAsJSON()
Service Category: Permissions Service Description: Get a list of assigned designtime permissions.java.lang.String
getDocumentationContent()
abstract RelationshipTypes.ThingworxRelationshipTypes
getEntityType()
java.lang.String
getEntityTypeAsString()
InfoTable
GetEventDefinition(java.lang.String name)
Service Category: Metadata Service Description: Get ann event definitions for this thing.InfoTable
GetEventDefinitions(java.lang.String category, java.lang.String dataShape)
Service Category: Metadata Service Description: Get the current event definitions for this thing.java.lang.String
GetHomeMashup()
Service Category: Mashups Service Description: Get home mashup.InfoTable
GetIncomingDependencies(java.lang.Double maxItems)
Service Category: Dependencies Service Description: Get the incoming dependencies.InfoTable
GetIncomingDependenciesAsNetwork(java.lang.Double maxItems, java.lang.Double maxDepth)
Service Category: Dependencies Service Description: Get the incoming dependencies as a network.org.json.JSONObject
GetInstanceMetadataAsJSON()
Service Category: Metadata Service Description: Get the instance metadata in JSON format.org.json.JSONObject
GetInstanceMetadataWithPermissionsAsJSON()
Service Category: Metadata Service Description: Get the instance metadata in JSON format.org.joda.time.DateTime
GetLastModifiedDate()
Service Category: Editing Service Description: Get the date edit was last modified.InfoTable
GetMetadata()
Service Category: Metadata Service Description: Get the metadata in InfoTable format.org.json.JSONObject
GetMetadataAsJSON()
Service Category: Metadata Service Description: Get the metadata in JSON format.org.json.JSONObject
GetMetadataWithPermissionsAsJSON()
Service Category: Metadata Service Description: Get the metadata in JSON format.InfoTable
GetOutgoingDependencies(java.lang.Double maxItems)
Service Category: Dependencies Service Description: Get the outgoing dependencies.InfoTable
GetOutgoingDependenciesAsNetwork(java.lang.Double maxItems, java.lang.Double maxDepth)
Service Category: Dependencies Service Description: Get the outgoing dependencies as a network.EntityReference
getOwner()
java.lang.String
GetOwner()
Service Category: Permissions Service Description: Get an owner to this entity.InfoTable
GetPermissionsForCurrentUser(java.lang.String permissionName, java.lang.String name)
Service Category: Permissions Service Description: Get current user permissions.InfoTable
GetPermissionsForGroup(java.lang.String group, java.lang.String permissionName, java.lang.String name)
Service Category: Permissions Service Description: Get group permissions.InfoTable
GetPermissionsForUser(java.lang.String user, java.lang.String permissionName, java.lang.String name)
Service Category: Permissions Service Description: Get user permissions.java.lang.String
GetProjectName()
Service Category: Projects Service Description: Get the project name of this entity.InfoTable
GetPropertyDefinition(java.lang.String name)
Service Category: Metadata Service Description: Get the current property definitions for this thing.InfoTable
GetPropertyDefinitions(java.lang.String category, java.lang.String type, java.lang.String dataShape)
Service Category: Metadata Service Description: Get the current property definitions for this thing.RunTimePermissionCollection
getRunTimePermissions()
InfoTable
GetRunTimePermissions()
Service Category: Permissions Service Description: Get a list of assigned runtime permissions.org.json.JSONObject
GetRunTimePermissionsAsJSON()
Service Category: Permissions Service Description: Get a list of assigned runtime permissions.InfoTable
GetServiceDefinition(java.lang.String name)
Service Category: Metadata Service Description: Get a service definition for this thing.InfoTable
GetServiceDefinitions(java.lang.String category, java.lang.String type, java.lang.String dataShape)
Service Category: Metadata Service Description: Get the current service definitions for this thing.java.lang.String
getStringConfigurationSetting(java.lang.String table, java.lang.String property)
java.lang.String
getStringConfigurationSettingWithDefault(java.lang.String table, java.lang.String property, java.lang.String defaultValue)
InfoTable
GetSummaryInformation()
Service Category: Metadata Service Description: Get summary information.TagCollection
getTags()
TagCollection
GetTags()
Service Category: Metadata Service Description: Get the tags for an entity.InfoTable
GetTagsAsInfoTable()
Service Category: Metadata Service Description: Get the tags for an entity as an InfoTable.VisibilityPermissionCollection
getVisibilityPermissions()
InfoTable
GetVisibilityPermissions()
Service Category: Permissions Service Description: Get a list of assigned visibility permissions.org.json.JSONObject
GetVisibilityPermissionsAsJSON()
Service Category: Permissions Service Description: Get a list of assigned visibility permissions.java.lang.Boolean
HasIncomingDependencies()
Service Category: Dependencies Service Description: Has incoming dependencies.java.lang.Boolean
HasOutgoingDependencies()
Service Category: Dependencies Service Description: Has outgoing dependencies.void
initializeEntity(ContextType contextType)
boolean
isEditable()
boolean
isEditableExtensionObject()
boolean
isEditableSystemObject()
boolean
isExtensionObject()
java.lang.Boolean
IsMultiRowTable(java.lang.String tableName)
Service Category: Configuration Service Description: Check if a configuration table is a multi-row table.boolean
isOwner(EntityReference principal)
boolean
isSystemObject()
boolean
isThemeObject()
boolean
isVisible()
boolean
isVisible(SecurityContext securityContext)
InfoTable
ListDeprecatedUsage()
Service Category: Aspects Service Description: Service returns the deprecated references of entity and characteristic, which is used by current entity.void
persistDesignTimePermissions()
void
persistRunTimePermissions()
void
persistVisibilityPermissions()
void
preInitializeEntity()
Pre initialize the entity.void
RemoveTags(TagCollection tags)
Service Category: Metadata Service Description: Remove tags from an entity.void
SaveConfigurationTables()
Service Category: Configuration Service Description: Save any changes to configuration tables.void
SetAvatar(byte[] content)
Service Category: Metadata Service Description: Set the avatar icon for the entity.void
setConfigurationSetting(java.lang.String table, java.lang.String property, java.lang.Object value)
void
SetConfigurationTable(java.lang.String tableName, InfoTable configurationTable, java.lang.Boolean persistent)
Service Category: Configuration Service Description: Set an entire configuration table.void
SetConfigurationTableRows(java.lang.String tableName, InfoTable values, java.lang.Boolean persistent)
Service Category: Configuration Service Description: Update/add one or more rows in a multi-row configuration table.void
SetDescription(java.lang.String description)
Service Category: Metadata Service Description: Overwrite/set the description for an entity.void
setDesignTimePermissions(DesignTimePermissionCollection value)
void
SetDesignTimePermissionsAsJSON(org.json.JSONObject permissions)
Service Category: Permissions Service Description: Set a list of assigned design time permissions.void
setDocumentationContent(java.lang.String value)
void
setExtensionObject(boolean value)
void
SetHomeMashup(java.lang.String name)
Service Category: Mashups Service Description: Set home mashup.void
setLastModifiedDate(org.joda.time.DateTime value)
void
SetMultiRowConfigurationTable(java.lang.String tableName, InfoTable configurationTable, java.lang.Boolean persistent)
Service Category: Configuration Service Description: Set an entire multi-row configuration table.void
setOwner(EntityReference principal)
void
SetOwner(java.lang.String name)
Service Category: Permissions Service Description: Assign an owner to this entity.void
SetProjectName(java.lang.String projectName)
Service Category: Projects Service Description: Set the project name of this entity.
Sets the name of the project for this entity to be associated with and updates entity's project dependencies by scanning entity's external dependencies.void
setRunTimePermissions(RunTimePermissionCollection value)
void
SetRunTimePermissionsAsJSON(org.json.JSONObject permissions)
Service Category: Permissions Service Description: Set a list of assigned runtime permissions.void
setStringConfigurationSetting(java.lang.String table, java.lang.String property, java.lang.String value)
void
SetTags(TagCollection tags)
Service Category: Metadata Service Description: Overwrite/set the tags for an entity.void
setVisibilityPermissions(VisibilityPermissionCollection value)
void
SetVisibilityPermissionsAsJSON(org.json.JSONObject permissions)
Service Category: Permissions Service Description: Set a list of assigned visibility permissions.org.json.JSONObject
toJSON()
Deprecated.no replacementorg.json.JSONObject
toJSONDefinition()
Deprecated.no replacementvoid
UpdateProjectDependencies()
Service Category: Projects Service Description: Updates Project's 'dependends-on Projects' by scanning current entity's external dependencies.
Updates entity's project dependencies by scanning entity's external dependenciesvoid
validateConfiguration(ImportedEntityCollection importedEntityCollections)
-
Methods inherited from class com.thingworx.persistence.common.PersistableNamedObject
getID, hasID, isTransient
-
Methods inherited from class com.thingworx.types.NamedObject
getDescription, getName, setDescription, setName, toValueCollection
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.thingworx.types.INamedObject
getDescription, getName
-
Methods inherited from interface com.thingworx.security.permissions.ISecurable
getID, getName
-
Methods inherited from interface com.thingworx.deprecation.ISupportsDeprecation
getDeprecated, isDeprecated, isDeprecatedBefore, since
-
-
-
-
Field Detail
-
BASIC_PROPERTY_DEFINITIONS
public static final PropertyDefinitionCollection BASIC_PROPERTY_DEFINITIONS
Set of basic properties for any entity.
-
EXCLUDED_ENTITY_TYPES_IN_PROJECT
public static final java.util.Set<RelationshipTypes.ThingworxRelationshipTypes> EXCLUDED_ENTITY_TYPES_IN_PROJECT
-
-
Method Detail
-
ListDeprecatedUsage
@ThingworxExtensionApiMethod(since={9,5}) public InfoTable ListDeprecatedUsage() throws java.lang.Exception
- Service Category:
- Aspects
- Service Description:
- Service returns the deprecated references of entity and characteristic, which is used by current entity.
- Returns:
- result Deprecated Usage for the entity - INFOTABLE - Aspects {dataShape:DeprecatedUsage}
- Throws:
java.lang.Exception
- If an error occurs
-
getDesignTimePermissions
@ThingworxExtensionApiMethod(since={6,6}) public DesignTimePermissionCollection getDesignTimePermissions()
- Specified by:
getDesignTimePermissions
in interfaceIDesignTimeSecurable
-
setDesignTimePermissions
@ThingworxExtensionApiMethod(since={6,6}) public void setDesignTimePermissions(DesignTimePermissionCollection value)
- Specified by:
setDesignTimePermissions
in interfaceIDesignTimeSecurable
-
getVisibilityPermissions
@ThingworxExtensionApiMethod(since={6,6}) public VisibilityPermissionCollection getVisibilityPermissions()
- Specified by:
getVisibilityPermissions
in interfaceIVisibilitySecurable
-
setVisibilityPermissions
@ThingworxExtensionApiMethod(since={6,6}) public void setVisibilityPermissions(VisibilityPermissionCollection value)
- Specified by:
setVisibilityPermissions
in interfaceIVisibilitySecurable
-
getRunTimePermissions
@ThingworxExtensionApiMethod(since={6,6}) public RunTimePermissionCollection getRunTimePermissions()
- Specified by:
getRunTimePermissions
in interfaceIRunTimeSecurable
-
setRunTimePermissions
@ThingworxExtensionApiMethod(since={6,6}) public void setRunTimePermissions(RunTimePermissionCollection value)
- Specified by:
setRunTimePermissions
in interfaceIRunTimeSecurable
-
GetOwner
@ThingworxExtensionApiMethod(since={8,4}) public java.lang.String GetOwner() throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Get an owner to this entity.
- Returns:
- result User name - USERNAME
- Throws:
java.lang.Exception
- If an error occurs
-
SetOwner
@ThingworxExtensionApiMethod(since={6,6}) public void SetOwner(java.lang.String name) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Assign an owner to this entity.
- Parameters:
name
- User name - USERNAME- Throws:
java.lang.Exception
- If an error occurs
-
AddRunTimePermission
@ThingworxExtensionApiMethod(since={6,6}) public void AddRunTimePermission(java.lang.String type, java.lang.String resource, java.lang.String principal, java.lang.String principalType, java.lang.Boolean allow) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Add a run time permission.
- Parameters:
type
- Permission type (PropertyRead PropertyWrite ServiceInvoke EventInvoke EventSubscribe) - STRINGresource
- Resource name (* = all or enter a specific resource (i.e. Service, Property, Event) to override) - STRINGprincipal
- Principal name (name of user or group) - STRINGprincipalType
- Principal type (User or Group) - STRINGallow
- Permission (true = allow, false = deny) - BOOLEAN- Throws:
java.lang.Exception
- If an error occurs
Additional Information The user that calls this service must have service invoke permissions on the entity that they are adding the run time permission to. For example, If UserA doesn't have ServiceInvoke permission on ThingA, then it won't be able to call the AddRunTimePermission service on the thing.
-
DeleteRunTimePermission
@ThingworxExtensionApiMethod(since={6,6}) public void DeleteRunTimePermission(java.lang.String type, java.lang.String resource, java.lang.String principal, java.lang.String principalType) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Delete a run time permission.
- Parameters:
type
- Permission type - STRINGresource
- Resource name - STRINGprincipal
- Principal name (name of user or group) - STRINGprincipalType
- Principal type (User or Group) - STRING- Throws:
java.lang.Exception
- If an error occurs
-
addRunTimePermission
@ThingworxExtensionApiMethod(since={6,6}) public void addRunTimePermission(PermissionTypes permissionType, java.lang.String resourceName, Permission permission) throws java.lang.Exception
- Specified by:
addRunTimePermission
in interfaceIRunTimeSecurable
- Throws:
java.lang.Exception
- If an error occurs
-
deleteRunTimePermission
@ThingworxExtensionApiMethod(since={6,6}) public void deleteRunTimePermission(PermissionTypes permissionType, java.lang.String resourceName, Permission permission) throws java.lang.Exception
- Specified by:
deleteRunTimePermission
in interfaceIRunTimeSecurable
- Throws:
java.lang.Exception
- If an error occurs
-
GetRunTimePermissionsAsJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject GetRunTimePermissionsAsJSON() throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Get a list of assigned runtime permissions.
- Returns:
- result Permission list - JSON
- Throws:
java.lang.Exception
- If an error occurs
-
SetRunTimePermissionsAsJSON
@ThingworxExtensionApiMethod(since={6,6}) public void SetRunTimePermissionsAsJSON(org.json.JSONObject permissions) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Set a list of assigned runtime permissions.
- Parameters:
permissions
- Permissions in JSON format - JSON- Throws:
java.lang.Exception
- If an error occurs
-
GetRunTimePermissions
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetRunTimePermissions() throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Get a list of assigned runtime permissions.
- Returns:
- result Permission list - INFOTABLE - Aspects {dataShape:Permissions}
- Throws:
java.lang.Exception
- If an error occurs
-
AddDesignTimePermission
@ThingworxExtensionApiMethod(since={6,6}) public void AddDesignTimePermission(java.lang.String type, java.lang.String principal, java.lang.String principalType, java.lang.Boolean allow) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Add a design time permission.
- Parameters:
type
- Permission type (Create, Read, Update, Delete) - STRINGprincipal
- Principal name (name of user or group) - STRINGprincipalType
- Principal type (User or Group) - STRINGallow
- Permission (true = allow, false = deny) - BOOLEAN- Throws:
java.lang.Exception
- If an error occurs
Additional Information If a value is not passed for the allow parameter, the default permission will be set to true.
-
DeleteDesignTimePermission
@ThingworxExtensionApiMethod(since={6,6}) public void DeleteDesignTimePermission(java.lang.String type, java.lang.String principal, java.lang.String principalType) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Delete a design time permission.
- Parameters:
type
- Permission type - STRINGprincipal
- Principal name (name of user or group) - STRINGprincipalType
- Principal type (User or Group) - STRING- Throws:
java.lang.Exception
- If an error occurs
-
GetDesignTimePermissionsAsJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject GetDesignTimePermissionsAsJSON() throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Get a list of assigned designtime permissions.
- Returns:
- result Permission list - JSON
- Throws:
java.lang.Exception
- If an error occurs
-
SetDesignTimePermissionsAsJSON
@ThingworxExtensionApiMethod(since={6,6}) public void SetDesignTimePermissionsAsJSON(org.json.JSONObject permissions) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Set a list of assigned design time permissions.
- Parameters:
permissions
- Permissions in JSON format - JSON- Throws:
java.lang.Exception
- If an error occurs
-
GetDesignTimePermissions
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetDesignTimePermissions() throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Get a list of assigned design time permissions.
- Returns:
- result Permission list - INFOTABLE - Aspects {dataShape:Permissions}
- Throws:
java.lang.Exception
- If an error occurs
-
AddVisibilityPermission
@ThingworxExtensionApiMethod(since={6,6}) public void AddVisibilityPermission(java.lang.String principal, java.lang.String principalType) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Add a visibility permission.
- Parameters:
principal
- Principal name (name of organization or organization unit) - STRINGprincipalType
- Principal type (Organization or Organization Unit) - STRING- Throws:
java.lang.Exception
- If an error occurs
Additional Information- For the principal input, the name of the organization must be followed by a colon and the organizational unit name. For example, for an organization unit named Test_OrganizationUnit that is derived from an organization named TestOrganization, specify the principal input as follows: Test_Organization:Test_OrganizationalUnit
- The top-most level of an organization (the organizational unit with the same name as the organization entity) can also be set as the principal input using the convention above (the principaltype must be set to OrganizationalUnit instead of Organization. For example, Test_Organization:Test_Organization
- The permission applies only to members of the top-most level of the organization, as the permission does not flow down to all organizational units.
- To add the permission to the entire organization and its organization units, the principalType parameter must be specified
as Organization and the name of the organization in the principal parameter.
-
DeleteVisibilityPermission
@ThingworxExtensionApiMethod(since={6,6}) public void DeleteVisibilityPermission(java.lang.String principal, java.lang.String principalType) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Delete a visibility permission.
- Parameters:
principal
- Principal name (name of organization or organization unit) - STRINGprincipalType
- Principal type (Organization or Organization Unit) - STRING- Throws:
java.lang.Exception
- If an error occurs
-
GetVisibilityPermissionsAsJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject GetVisibilityPermissionsAsJSON() throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Get a list of assigned visibility permissions.
- Returns:
- result Permission list - JSON
- Throws:
java.lang.Exception
- If an error occurs
-
SetVisibilityPermissionsAsJSON
@ThingworxExtensionApiMethod(since={6,6}) public void SetVisibilityPermissionsAsJSON(org.json.JSONObject permissions) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Set a list of assigned visibility permissions.
- Parameters:
permissions
- Permissions in JSON format - JSON- Throws:
java.lang.Exception
- If an error occurs
-
GetVisibilityPermissions
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetVisibilityPermissions() throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Get a list of assigned visibility permissions.
- Returns:
- result Permission list - INFOTABLE - Aspects {dataShape:Permissions}
- Throws:
java.lang.Exception
- If an error occurs
-
CheckPermission
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean CheckPermission(java.lang.String type, java.lang.String name) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Check to see if an entity has a specific run time permission for the current user.
- Parameters:
type
- Permission type - STRINGname
- Name of the resource (i.e. property, service, event) to check - STRING- Returns:
- result True/false based on if the user has the specified permission - BOOLEAN
- Throws:
java.lang.Exception
- If an error occurs
Additional InformationThe valid inputs for the type parameter are (case sensitive): PropertyRead, PropertyWrite, EventSubscribe , EventInvoke, ServiceInvoke
.
-
CheckPermissionForUser
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean CheckPermissionForUser(java.lang.String user, java.lang.String type, java.lang.String name) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Check to see if an entity has a specific run time permission for a specific user.
- Parameters:
user
- User name - USERNAMEtype
- Permission type - STRINGname
- Name of the resource (i.e. property, service, event) to check - STRING- Returns:
- result True/false based on if the user has the specified permission - BOOLEAN
- Throws:
java.lang.Exception
- If an error occurs
Additional InformationThe valid inputs for the type parameter are (case sensitive): PropertyRead, PropertyWrite, EventSubscribe , EventInvoke, and ServiceInvoke
.
-
CheckPermissionForGroup
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean CheckPermissionForGroup(java.lang.String group, java.lang.String type, java.lang.String name) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Check to see if an entity has a specific run time permission for a specific group.
- Parameters:
group
- Group name - GROUPNAMEtype
- Permission type - STRINGname
- Name of the resource (i.e. property, service, event) to check - STRING- Returns:
- result True/false based on if the group has the specified permission - BOOLEAN
- Throws:
java.lang.Exception
- If an error occurs
Additional InformationThe valid inputs for the type parameter are (case sensitive): PropertyRead, PropertyWrite, EventSubscribe , EventInvoke, and ServiceInvoke
.If the current user does not have visibility to the group being checked, then the permission will be returned as false (with no exception message).
-
CheckDesignTimePermission
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean CheckDesignTimePermission(java.lang.String type) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Check to see if an entity has a specific design time permission for the current user.
- Parameters:
type
- Permission type - STRING- Returns:
- result True/false based on if the user has the specified permission - BOOLEAN
- Throws:
java.lang.Exception
- If an error occurs
Additional InformationThe service returns only true or false. If false, the exception message is not returned.
The type input can be one of the following (case-sensitive): Create, Read, Update, or Delete.
The current user must also have ServiceInvoke permission on the entity that they're trying to check the design time permission on.
-
CheckDesignTimePermissionForUser
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean CheckDesignTimePermissionForUser(java.lang.String user, java.lang.String type) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Check to see if an entity has a specific design time permission for a specific user.
- Parameters:
user
- User name - USERNAMEtype
- Permission type - STRING- Returns:
- result True/false based on if the user has the specified permission - BOOLEAN
- Throws:
java.lang.Exception
- If an error occurs
Additional InformationThe service returns only true or false. If false, the exception message is not returned.
The type input can be one of the following (case-sensitive): Create, Read, Update, or Delete.
If the current user does not have visibility on the user being passed, then the service will return false (with no message/exception). However, if the current user doesn't have visibility on the entity being checked (e.g. a Thing) but has design time permissions on the entity, then the service will return true for the specific permission.
-
CheckDesignTimePermissionForGroup
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean CheckDesignTimePermissionForGroup(java.lang.String group, java.lang.String type) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Check to see if an entity has a specific design time permission for a specific group.
- Parameters:
group
- Group name - GROUPNAMEtype
- Permission type - STRING- Returns:
- result True/false based on if the group has the specified permission - BOOLEAN
- Throws:
java.lang.Exception
- If an error occurs
Additional InformationThe service returns only true or false. If false, the exception message is not returned.
The type input can be one of the following (case-sensitive): Create, Read, Update, or Delete.
The current user must also have ServiceInvoke permission on the entity that they're trying to check the design time permission on.
-
isVisible
@ThingworxExtensionApiMethod(since={6,6}) public boolean isVisible()
-
isVisible
@ThingworxExtensionApiMethod(since={6,6}) public boolean isVisible(SecurityContext securityContext)
-
validateConfiguration
@ThingworxExtensionApiMethod(since={6,6}) public void validateConfiguration(ImportedEntityCollection importedEntityCollections) throws java.lang.Exception
Validates the configuration of the entity during the import process. This method is called whenever a entity is created or modified via the REST APIs. During the validation step, there may be other associated entities that are being imported. These can be accessed via the
importedEntities
collection if needed.Note that some resources belonging to the entity or other associated entities may not be available during this step in the lifecycle.
It is required for all subclasses of
RootEntity
to callsuper.validateConfiguration(importedEntityCollections)
if they override this method.- Parameters:
importedEntityCollections
- - a typed collection of entities currently being imported- Throws:
java.lang.Exception
- if the entity is invalid
-
getEntityTypeAsString
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getEntityTypeAsString()
-
getEntityType
@ThingworxExtensionApiMethod(since={6,6}) public abstract RelationshipTypes.ThingworxRelationshipTypes getEntityType()
Returns the type of this entity.
- Returns:
- the entity type
-
setLastModifiedDate
@ThingworxExtensionApiMethod(since={6,6}) public void setLastModifiedDate(org.joda.time.DateTime value)
-
GetLastModifiedDate
@ThingworxExtensionApiMethod(since={6,6}) public org.joda.time.DateTime GetLastModifiedDate()
- Service Category:
- Editing
- Service Description:
- Get the date edit was last modified.
- Returns:
- lastModifiedDate Last modified date - DATETIME
-
isEditable
@ThingworxExtensionApiMethod(since={6,6}) public boolean isEditable()
-
isSystemObject
@ThingworxExtensionApiMethod(since={6,6}) public boolean isSystemObject()
-
isEditableSystemObject
@ThingworxExtensionApiMethod(since={6,6}) public boolean isEditableSystemObject()
-
isEditableExtensionObject
@ThingworxExtensionApiMethod(since={6,6}) public boolean isEditableExtensionObject()
-
isThemeObject
@ThingworxExtensionApiMethod(since={6,6}) public boolean isThemeObject()
-
isExtensionObject
@ThingworxExtensionApiMethod(since={6,6}) public boolean isExtensionObject()
-
setExtensionObject
@ThingworxExtensionApiMethod(since={6,6}) public void setExtensionObject(boolean value)
-
getAspects
@ThingworxExtensionApiMethod(since={6,6}) public AspectCollection getAspects()
- Returns:
- The entity aspect collection.
-
preInitializeEntity
@ThingworxExtensionApiMethod(since={6,6}, canOverride=true) public void preInitializeEntity() throws java.lang.Exception
Pre initialize the entity.- Throws:
java.lang.Exception
- if an error occurs during the pre-initialization process
-
initializeEntity
@ThingworxExtensionApiMethod(since={9,0}, canOverride=true) public void initializeEntity(ContextType contextType) throws java.lang.Exception
Initializes the internal state of the entity. This method may be called more than once on the same entity during initialization.
All metadata, including aspects and configuration tables, are available at this point in the lifecycle.
- Parameters:
contextType
- the patch operation- Throws:
java.lang.Exception
- if an error occurs during the initialization process
-
cleanupEntity
@ThingworxExtensionApiMethod(since={9,0}, canOverride=true) public void cleanupEntity(ContextType contextType) throws java.lang.Exception
Releases all managed or long-lived resources held by the entity. Cleanup that should be done regardless of patchRemove or delete should be done here
All metadata, including aspects and configuration tables, are available at this point in the lifecycle. Extensions should not attempt to clean up metadata or any other resources that are managed internally by Thingworx.
- Parameters:
contextType
- model synchronization patch operation- Throws:
java.lang.Exception
- if an error occurs during the cleanup process
-
addDesignTimePermission
@ThingworxExtensionApiMethod(since={6,6}) public void addDesignTimePermission(PermissionTypes permissionType, Permission permission) throws java.lang.Exception
- Specified by:
addDesignTimePermission
in interfaceIDesignTimeSecurable
- Throws:
java.lang.Exception
- If an error occurs
-
deleteDesignTimePermission
@ThingworxExtensionApiMethod(since={6,6}) public void deleteDesignTimePermission(PermissionTypes permissionType, Permission permission) throws java.lang.Exception
- Specified by:
deleteDesignTimePermission
in interfaceIDesignTimeSecurable
- Throws:
java.lang.Exception
- If an error occurs
-
persistRunTimePermissions
@ThingworxExtensionApiMethod(since={6,6}) public void persistRunTimePermissions() throws java.lang.Exception
- Specified by:
persistRunTimePermissions
in interfaceIRunTimeSecurable
- Throws:
java.lang.Exception
- If an error occurs
-
persistDesignTimePermissions
@ThingworxExtensionApiMethod(since={6,6}) public void persistDesignTimePermissions() throws java.lang.Exception
- Specified by:
persistDesignTimePermissions
in interfaceIDesignTimeSecurable
- Throws:
java.lang.Exception
- If an error occurs
-
persistVisibilityPermissions
@ThingworxExtensionApiMethod(since={6,6}) public void persistVisibilityPermissions() throws java.lang.Exception
- Specified by:
persistVisibilityPermissions
in interfaceIVisibilitySecurable
- Throws:
java.lang.Exception
- If an error occurs
-
addVisibilityPermission
@ThingworxExtensionApiMethod(since={6,6}) public void addVisibilityPermission(PermissionTypes permissionType, Permission permission) throws java.lang.Exception
- Specified by:
addVisibilityPermission
in interfaceIVisibilitySecurable
- Throws:
java.lang.Exception
- If an error occurs
-
deleteVisibilityPermission
@ThingworxExtensionApiMethod(since={6,6}) public void deleteVisibilityPermission(PermissionTypes permissionType, Permission permission) throws java.lang.Exception
- Specified by:
deleteVisibilityPermission
in interfaceIVisibilitySecurable
- Throws:
java.lang.Exception
- If an error occurs
-
GetConfigurationChangeHistory
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetConfigurationChangeHistory() throws java.lang.Exception
- Service Category:
- Editing
- Service Description:
- Get the configuration change history.
- Returns:
- result Configuration changes - INFOTABLE - Aspects {dataShape:ConfigurationChange}
- Throws:
java.lang.Exception
- If an error occurs
Additional InformationThis service is not specific to configuration tables. Any create or update to an entity is listed in the change history.
-
isOwner
@ThingworxExtensionApiMethod(since={6,6}) public boolean isOwner(EntityReference principal)
- Specified by:
isOwner
in interfaceISecurable
-
setOwner
@ThingworxExtensionApiMethod(since={6,6}) public void setOwner(EntityReference principal)
-
getOwner
@ThingworxExtensionApiMethod(since={6,6}) public EntityReference getOwner()
- Specified by:
getOwner
in interfaceISecurable
-
getTags
@ThingworxExtensionApiMethod(since={6,6}) public TagCollection getTags()
- Specified by:
getTags
in interfaceITaggableObject
-
getDocumentationContent
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getDocumentationContent()
-
setDocumentationContent
@ThingworxExtensionApiMethod(since={6,6}) public void setDocumentationContent(java.lang.String value)
-
GetSummaryInformation
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetSummaryInformation() throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Get summary information.
- Returns:
- Summary Summary information - INFOTABLE - Aspects {dataShape:EntitySummary}
- Throws:
java.lang.Exception
- If an error occurs
-
GetDescription
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String GetDescription()
- Service Category:
- Metadata
- Service Description:
- Get the description for an entity.
- Returns:
- description description - STRING
-
SetDescription
@ThingworxExtensionApiMethod(since={6,6}) public void SetDescription(java.lang.String description) throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Overwrite/set the description for an entity.
- Parameters:
description
- Description for an entity - STRING- Throws:
java.lang.Exception
- If an error occurs
-
GetTags
@ThingworxExtensionApiMethod(since={6,6}) public TagCollection GetTags()
- Service Category:
- Metadata
- Service Description:
- Get the tags for an entity.
- Returns:
- tags tags - TAGS - Aspects {tagType:ModelTags}
-
SetTags
@ThingworxExtensionApiMethod(since={6,6}) public void SetTags(TagCollection tags) throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Overwrite/set the tags for an entity.
- Parameters:
tags
- Tags for an entity - TAGS- Throws:
java.lang.Exception
- If an error occurs
-
GetTagsAsInfoTable
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetTagsAsInfoTable() throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Get the tags for an entity as an InfoTable.
- Returns:
- tags tags - INFOTABLE - Aspects {dataShape:VocabularyTermList}
- Throws:
java.lang.Exception
- If an error occurs
-
AddTags
@ThingworxExtensionApiMethod(since={6,6}) public void AddTags(TagCollection tags) throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Append additional tags to an entity.
- Parameters:
tags
- Tags for an entity - TAGS- Throws:
java.lang.Exception
- If an error occurs
Additional Information AddTags can be used to append new tags to an entity with existing tags. Tags are not overwritten. Use the SetTags service to overwrite existing tags.
-
RemoveTags
@ThingworxExtensionApiMethod(since={6,6}) public void RemoveTags(TagCollection tags) throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Remove tags from an entity.
- Parameters:
tags
- Tags to remove from the entity - TAGS- Throws:
java.lang.Exception
- If an error occurs
-
GetHomeMashup
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String GetHomeMashup()
- Service Category:
- Mashups
- Service Description:
- Get home mashup.
- Returns:
- HomeMashup Home mashup - MASHUPNAME
-
SetHomeMashup
@ThingworxExtensionApiMethod(since={6,6}) public void SetHomeMashup(java.lang.String name) throws java.lang.Exception
- Service Category:
- Mashups
- Service Description:
- Set home mashup.
- Parameters:
name
- Home mashup name - MASHUPNAME- Throws:
java.lang.Exception
- If an error occurs
-
GetAvatar
@ThingworxExtensionApiMethod(since={6,6}) public ImagePrimitive GetAvatar() throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Get avatar image.
-
GetAvatarURL
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String GetAvatarURL()
- Service Category:
- Metadata
- Service Description:
- Get avatar image url.
- Returns:
- result Entity avatar URL - IMAGELINK
Additional InformationReturns a URL for an avatar. Example:
/Thingworx/Things/ThingName/Avatar
-
SetAvatar
@ThingworxExtensionApiMethod(since={6,6}) public void SetAvatar(byte[] content) throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Set the avatar icon for the entity.
-
getAvatarContent
@ThingworxExtensionApiMethod(since={6,6}) public byte[] getAvatarContent() throws java.lang.Exception
- Specified by:
getAvatarContent
in interfaceIAvatar
- Throws:
java.lang.Exception
- If an error occurs
-
getConfigurationTable
@ThingworxExtensionApiMethod(since={6,6}) public ConfigurationTable getConfigurationTable(java.lang.String table) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
getConfigurationSetting
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Object getConfigurationSetting(java.lang.String table, java.lang.String property)
-
getStringConfigurationSetting
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getStringConfigurationSetting(java.lang.String table, java.lang.String property)
-
getStringConfigurationSettingWithDefault
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String getStringConfigurationSettingWithDefault(java.lang.String table, java.lang.String property, java.lang.String defaultValue)
-
setConfigurationSetting
@ThingworxExtensionApiMethod(since={6,6}) public void setConfigurationSetting(java.lang.String table, java.lang.String property, java.lang.Object value) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
setStringConfigurationSetting
@ThingworxExtensionApiMethod(since={6,6}) public void setStringConfigurationSetting(java.lang.String table, java.lang.String property, java.lang.String value) throws java.lang.Exception
- Throws:
java.lang.Exception
- If an error occurs
-
AddConfigurationTableDefinition
@ThingworxExtensionApiMethod(since={8,3}, deprecatedSince={9,4}) @Deprecated public void AddConfigurationTableDefinition(java.lang.String name, java.lang.String description, java.lang.String category, java.lang.Integer ordinal, java.lang.Boolean isHidden, java.lang.Boolean isMultiRow, java.lang.String dataShapeName) throws java.lang.Exception
Deprecated.- Throws:
java.lang.Exception
- If an error occurs
-
AddConfigurationTableDefinition
@ThingworxExtensionApiMethod(since={9,4}) public void AddConfigurationTableDefinition(java.lang.String name, java.lang.String description, java.lang.String category, java.lang.Integer ordinal, java.lang.Boolean isHidden, java.lang.Boolean isMultiRow, java.lang.String dataShapeName, org.json.JSONObject accessModifier) throws java.lang.Exception
- Service Category:
- Configuration
- Service Description:
- Adds a ConfigurationTableDefinition and creates and ConfigurationTable from the definition.
- Parameters:
name
- The name of the configuration table. This name should be used when retrieving values from the configuration table during execution. Configuration tables must have unique names that obey standard ThingWorx entity naming conventions. It is strongly recommended that you always specify a non-empty configuration table name - STRINGdescription
- A short description of the configuration table and its purpose - STRINGcategory
- A category that conceptually groups together related configuration tables. - STRINGordinal
- Controls the order in which the configuration tables should be rendered. Any non-negative integer is permitted, where lower values take higher precedence over larger values. If several tables share the same ordinal, then the order is non-deterministic - INTEGERisHidden
- Controls whether the configuration table should be hidden by Composer (e.g. if the configuration is for internal purposes only) - BOOLEANisMultiRow
- Controls whether the configuration table should accept tabular entry of data or key/value entry. When set to true, the fields in the data shape provided will be interpreted as column descriptors. When set to false or omitted, the fields are interpreted as row descriptors - BOOLEANdataShapeName
- This datashape will be used as the data shape for the Configuration table. Any changes to the datashape like adding or deleting fields will reflect on the configuration table. - DATASHAPENAMEaccessModifier
- AccessModifier for configuration table - JSON- Throws:
java.lang.Exception
- If an error occurs
-
GetConfigurationTableDefinition
@ThingworxExtensionApiMethod(since={8,3}) public InfoTable GetConfigurationTableDefinition(java.lang.String tableName) throws java.lang.Exception
- Service Category:
- Configuration
- Service Description:
- Get a specific configuration table definition as an InfoTable.
- Parameters:
tableName
- Configuration table name - STRING- Returns:
- result Configuration Table Definition - INFOTABLE
- Throws:
java.lang.Exception
- If an error occurs
-
GetConfigurationTables
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetConfigurationTables() throws java.lang.Exception
- Service Category:
- Configuration
- Service Description:
- Get a list of configuration tables.
- Returns:
- result Configuration Tables - INFOTABLE - Aspects {dataShape:EntityList}
- Throws:
java.lang.Exception
- If an error occurs
Additional InformationThis service can be used for single or multi-row configuration tables.
-
GetConfigurationTable
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetConfigurationTable(java.lang.String tableName) throws java.lang.Exception
- Service Category:
- Configuration
- Service Description:
- Get a specific configuration table as an InfoTable.
- Parameters:
tableName
- Configuration table name - STRING- Returns:
- table table - INFOTABLE
- Throws:
java.lang.Exception
- If an error occurs
Additional InformationThis service can be used for single or multi-row configuration tables.
-
GetConfigurationTableRow
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetConfigurationTableRow(java.lang.String tableName, java.lang.String key) throws java.lang.Exception
- Service Category:
- Configuration
- Service Description:
- Get a specific configuration table row as an InfoTable.
- Parameters:
tableName
- Configuration table name - STRINGkey
- Row key value - STRING- Returns:
- table table - INFOTABLE
- Throws:
java.lang.Exception
- If an error occurs
Additional InformationThis service can be used to validate existing settings, to update configuration table rows, or to get a current structure and settings.
This service only works on multi-row configuration tables that also have a primary key assigned. If this service is run against a single row configuration table or a multi-row configuration table that does not have a primary key, it will throw an exception (HTTP NOT FOUND). Infotable rows are identified by a primary key throughout ThingWorx. Therefore, without a primary key, there is no way to get a specific row.
-
IsMultiRowTable
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean IsMultiRowTable(java.lang.String tableName) throws java.lang.Exception
- Service Category:
- Configuration
- Service Description:
- Check if a configuration table is a multi-row table.
- Parameters:
tableName
- Configuration table name - STRING- Returns:
- result Flag if table is multi-row or not - BOOLEAN
- Throws:
java.lang.Exception
- If an error occurs
-
SetConfigurationTable
@ThingworxExtensionApiMethod(since={6,6}) public void SetConfigurationTable(java.lang.String tableName, InfoTable configurationTable, java.lang.Boolean persistent) throws java.lang.Exception
- Service Category:
- Configuration
- Service Description:
- Set an entire configuration table.
- Parameters:
tableName
- Configuration table name - STRINGconfigurationTable
- Configuration table content - INFOTABLEpersistent
- Persist these changes - BOOLEAN- Throws:
java.lang.Exception
- If an error occurs
-
SetMultiRowConfigurationTable
@ThingworxExtensionApiMethod(since={6,6}) public void SetMultiRowConfigurationTable(java.lang.String tableName, InfoTable configurationTable, java.lang.Boolean persistent) throws java.lang.Exception
- Service Category:
- Configuration
- Service Description:
- Set an entire multi-row configuration table.
- Parameters:
tableName
- Configuration table name - STRINGconfigurationTable
- Configuration table content - INFOTABLEpersistent
- Persist these changes - BOOLEAN- Throws:
java.lang.Exception
- If an error occurs
-
SetConfigurationTableRows
@ThingworxExtensionApiMethod(since={6,6}) public void SetConfigurationTableRows(java.lang.String tableName, InfoTable values, java.lang.Boolean persistent) throws java.lang.Exception
- Service Category:
- Configuration
- Service Description:
- Update/add one or more rows in a multi-row configuration table.
- Parameters:
tableName
- Configuration table name - STRINGvalues
- Configuration table rows to modify - INFOTABLEpersistent
- Persist these changes - BOOLEAN- Throws:
java.lang.Exception
- If an error occurs
-
DeleteConfigurationTable
@ThingworxExtensionApiMethod(since={6,6}) public void DeleteConfigurationTable(java.lang.String tableName, java.lang.Boolean persistent) throws java.lang.Exception
- Service Category:
- Configuration
- Service Description:
- Delete an entire configuration table.
- Parameters:
tableName
- Configuration table name - STRINGpersistent
- Persist these changes - BOOLEAN- Throws:
java.lang.Exception
- If an error occurs
-
DeleteConfigurationTableRows
@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={9,6}) public void DeleteConfigurationTableRows(java.lang.String tableName, InfoTable values, java.lang.Boolean persistent) throws java.lang.Exception
Deprecated.- Throws:
java.lang.Exception
- If an error occurs
-
DeleteConfigurationTableRows
@ThingworxExtensionApiMethod(since={9,6}) public void DeleteConfigurationTableRows(java.lang.String tableName, InfoTable values, java.lang.Boolean persistent, java.lang.Boolean removeAllMatchingRows) throws java.lang.Exception
- Service Category:
- Configuration
- Service Description:
- Delete one or more rows from a multi-row configuration table.
- Parameters:
tableName
- Configuration table name - STRINGvalues
- Configuration table rows to modify - INFOTABLEpersistent
- Persist these changes - BOOLEANremoveAllMatchingRows
- It will remove all matching rows if value is true - BOOLEAN- Throws:
java.lang.Exception
- If an error occurs
-
DeleteAllConfigurationTableRows
@ThingworxExtensionApiMethod(since={6,6}) public void DeleteAllConfigurationTableRows(java.lang.String tableName, java.lang.Boolean persistent) throws java.lang.Exception
- Service Category:
- Configuration
- Service Description:
- Delete all rows from a multi-row configuration table.
- Parameters:
tableName
- Configuration table name - STRINGpersistent
- Persist these changes - BOOLEAN- Throws:
java.lang.Exception
- If an error occurs
Additional InformationIf the persistent parameter is set to false, some settings may still be visible in the multi-row configuration table in Composer that were actually deleted (in-memory only), unless the entity is restarted (call RestartThing for things and verify that the settings are no longer displayed).
If the entity is saved (in Composer) while the settings in the multi-row configuration table are still being displayed (after deleting with persistent = false), then the settings will become persisted (in-memory) again (i.e. as if it was never deleted).
-
SaveConfigurationTables
@ThingworxExtensionApiMethod(since={6,6}) public void SaveConfigurationTables() throws java.lang.Exception
- Service Category:
- Configuration
- Service Description:
- Save any changes to configuration tables.
- Throws:
java.lang.Exception
- If an error occurs
-
GetPropertyDefinitions
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetPropertyDefinitions(java.lang.String category, java.lang.String type, java.lang.String dataShape) throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Get the current property definitions for this thing.
- Parameters:
category
- Category to filter on - STRINGtype
- Type to filter on - BASETYPENAMEdataShape
- Data shape to filter on if InfoTable base type - DATASHAPENAME- Returns:
- result Property definitions - INFOTABLE - Aspects {dataShape:PropertyDefinition}
- Throws:
java.lang.Exception
- If an error occurs
-
GetPropertyDefinition
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetPropertyDefinition(java.lang.String name) throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Get the current property definitions for this thing.
- Parameters:
name
- Name - STRING- Returns:
- result Property definition - INFOTABLE - Aspects {dataShape:PropertyDefinition}
- Throws:
java.lang.Exception
- If an error occurs
-
GetEventDefinitions
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetEventDefinitions(java.lang.String category, java.lang.String dataShape) throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Get the current event definitions for this thing.
- Parameters:
category
- Category to filter on - STRINGdataShape
- Data shape to filter on if InfoTable base type - DATASHAPENAME- Returns:
- result Event definitions - INFOTABLE - Aspects {dataShape:EventDefinition}
- Throws:
java.lang.Exception
- If an error occurs
-
GetEventDefinition
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetEventDefinition(java.lang.String name) throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Get ann event definitions for this thing.
- Parameters:
name
- Name - STRING- Returns:
- result Event definition - INFOTABLE - Aspects {dataShape:EventDefinition}
- Throws:
java.lang.Exception
- If an error occurs
-
GetServiceDefinitions
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetServiceDefinitions(java.lang.String category, java.lang.String type, java.lang.String dataShape) throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Get the current service definitions for this thing.
- Parameters:
category
- Category to filter on - STRINGtype
- Type to filter on - BASETYPENAMEdataShape
- Data shape to filter on if InfoTable base type - DATASHAPENAME- Returns:
- result Service definitions - INFOTABLE - Aspects {dataShape:ServiceDefinition}
- Throws:
java.lang.Exception
- If an error occurs
-
GetServiceDefinition
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetServiceDefinition(java.lang.String name) throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Get a service definition for this thing.
- Parameters:
name
- Name - STRING- Returns:
- result Service definition - INFOTABLE - Aspects {dataShape:ServiceDefinition}
- Throws:
java.lang.Exception
- If an error occurs
-
GetMetadata
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetMetadata() throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Get the metadata in InfoTable format.
- Returns:
- result metadata - INFOTABLE
- Throws:
java.lang.Exception
- If an error occurs
-
GetMetadataAsJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject GetMetadataAsJSON() throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Get the metadata in JSON format.
- Returns:
- result metadata - JSON
- Throws:
java.lang.Exception
- If an error occurs
-
GetMetadataWithPermissionsAsJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject GetMetadataWithPermissionsAsJSON() throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Get the metadata in JSON format.
- Returns:
- result metadata - JSON
- Throws:
java.lang.Exception
- If an error occurs
-
GetInstanceMetadataAsJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject GetInstanceMetadataAsJSON() throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Get the instance metadata in JSON format.
- Returns:
- result Instance metadata - JSON
- Throws:
java.lang.Exception
- If an error occurs
-
GetInstanceMetadataWithPermissionsAsJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONObject GetInstanceMetadataWithPermissionsAsJSON() throws java.lang.Exception
- Service Category:
- Metadata
- Service Description:
- Get the instance metadata in JSON format.
- Returns:
- result Instance metadata - JSON
- Throws:
java.lang.Exception
- If an error occurs
-
GetIncomingDependencies
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetIncomingDependencies(java.lang.Double maxItems) throws java.lang.Exception
- Service Category:
- Dependencies
- Service Description:
- Get the incoming dependencies.
- Parameters:
maxItems
- Maximum number of items to return - NUMBER- Returns:
- result Related entities - INFOTABLE - Aspects {dataShape:EntityDescriptor}
- Throws:
java.lang.Exception
- If an error occurs
-
GetOutgoingDependencies
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetOutgoingDependencies(java.lang.Double maxItems) throws java.lang.Exception
- Service Category:
- Dependencies
- Service Description:
- Get the outgoing dependencies.
- Parameters:
maxItems
- Maximum number of items to return - NUMBER- Returns:
- result Related entities - INFOTABLE - Aspects {dataShape:EntityDescriptor}
- Throws:
java.lang.Exception
- If an error occurs
-
GetIncomingDependenciesAsNetwork
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetIncomingDependenciesAsNetwork(java.lang.Double maxItems, java.lang.Double maxDepth) throws java.lang.Exception
- Service Category:
- Dependencies
- Service Description:
- Get the incoming dependencies as a network.
- Parameters:
maxItems
- Maximum number of items to return - NUMBERmaxDepth
- Maximum depth to traverse - NUMBER- Returns:
- result Related entities - INFOTABLE - Aspects {dataShape:EntityNetwork}
- Throws:
java.lang.Exception
- If an error occurs
-
GetOutgoingDependenciesAsNetwork
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetOutgoingDependenciesAsNetwork(java.lang.Double maxItems, java.lang.Double maxDepth) throws java.lang.Exception
- Service Category:
- Dependencies
- Service Description:
- Get the outgoing dependencies as a network.
- Parameters:
maxItems
- Maximum number of items to return - NUMBERmaxDepth
- Maximum depth to traverse - NUMBER- Returns:
- result Related entities - INFOTABLE - Aspects {dataShape:EntityNetwork}
- Throws:
java.lang.Exception
- If an error occurs
-
HasIncomingDependencies
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean HasIncomingDependencies() throws java.lang.Exception
- Service Category:
- Dependencies
- Service Description:
- Has incoming dependencies.
- Returns:
- result Has dependencies - BOOLEAN
- Throws:
java.lang.Exception
- If an error occurs
-
HasOutgoingDependencies
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.Boolean HasOutgoingDependencies() throws java.lang.Exception
- Service Category:
- Dependencies
- Service Description:
- Has outgoing dependencies.
- Returns:
- result Has dependencies - BOOLEAN
- Throws:
java.lang.Exception
- If an error occurs
-
GetPermissionsForCurrentUser
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetPermissionsForCurrentUser(java.lang.String permissionName, java.lang.String name) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Get current user permissions.
- Parameters:
permissionName
- Permission name - STRINGname
- Target name (or wildcard) - STRING- Returns:
- result Permissions - INFOTABLE - Aspects {dataShape:UserPermissions}
- Throws:
java.lang.Exception
- If an error occurs
-
GetPermissionsForUser
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetPermissionsForUser(java.lang.String user, java.lang.String permissionName, java.lang.String name) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Get user permissions.
- Parameters:
user
- User name - STRINGpermissionName
- Permission name - STRINGname
- Target name (or wildcard) - STRING- Returns:
- result Permissions - INFOTABLE - Aspects {dataShape:UserPermissions}
- Throws:
java.lang.Exception
- If an error occurs
-
GetPermissionsForGroup
@ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetPermissionsForGroup(java.lang.String group, java.lang.String permissionName, java.lang.String name) throws java.lang.Exception
- Service Category:
- Permissions
- Service Description:
- Get group permissions.
- Parameters:
group
- Group name - STRINGpermissionName
- Permission name - STRINGname
- Target name (or wildcard) - STRING- Returns:
- result Permissions - INFOTABLE - Aspects {dataShape:UserPermissions}
- Throws:
java.lang.Exception
- If an error occurs
-
dispose
@ThingworxExtensionApiMethod(since={6,6}) public void dispose() throws java.lang.Exception
Removes any remaining references of this entity and disposes any resources that were not cleaned up earlier in the lifecycle. This method is only invoked when the entity is in the process of deletion.
- Throws:
java.lang.Exception
- If an error occurs
-
toJSON
@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={8,4}) public org.json.JSONObject toJSON() throws java.lang.Exception
Deprecated.no replacement
Returns the state of the entity as JSONObject.- Returns:
- the entity as JSONObject
- Throws:
java.lang.Exception
- when an error occurs during the construction/population of the JSONObject
-
toJSONDefinition
@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={8,4}) public org.json.JSONObject toJSONDefinition() throws java.lang.Exception
Deprecated.no replacement
Returns the definition state of the entity as JSONObject.- Returns:
- the entity as JSONObject
- Throws:
java.lang.Exception
- when an error occurs during the construction/population of the JSONObject
-
SetProjectName
@ThingworxExtensionApiMethod(since={6,6}) public void SetProjectName(java.lang.String projectName) throws java.lang.Exception
- Service Category:
- Projects
- Service Description:
- Set the project name of this entity.
Sets the name of the project for this entity to be associated with and updates entity's project dependencies by scanning entity's external dependencies. The name of project must be a valid, existing Project. If a project name is supplied that is not valid, an Exception will be thrown. For an editable extension entity a valid project can be the one that exists in same extension or any non extension project type entity that exists on platform. The only restriction(Invalid) project is the project belonging to different extension and projects that don't exist on platform.- Parameters:
projectName
- - The name of the project to associate this entity to.- Throws:
java.lang.Exception
- - If the specified Project does not exist or you do not have permissions to view it or if there is a problem updating the database.
-
UpdateProjectDependencies
@ThingworxExtensionApiMethod(since={9,1}) public void UpdateProjectDependencies() throws java.lang.Exception
- Service Category:
- Projects
- Service Description:
- Updates Project's 'dependends-on Projects' by scanning current entity's external dependencies.
Updates entity's project dependencies by scanning entity's external dependencies- Throws:
java.lang.Exception
-
GetProjectName
@ThingworxExtensionApiMethod(since={6,6}) public java.lang.String GetProjectName() throws java.lang.Exception
- Service Category:
- Projects
- Service Description:
- Get the project name of this entity.
- Returns:
- result The project name of this entity - STRING
- Throws:
java.lang.Exception
- If an error occurs
-
-