Class ThingWorxHelper
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringcreateThing(RegulatorySubmission regulatorySubmission) Creates a Thingworx thing and sets the remote identifier.static org.json.JSONObjectgetInitializationPayload(RegulatorySubmission submission) Returns the content of the Initialization Payload from the the Type definition.getInitializationPayloadMap(RegulatorySubmission submission) Provide the key value pairs to send with the body of the initialization URL.static StringgetInitializationURL(RegulatorySubmission submission) Generates the initialization URL.static StringgetRemoteURL(RegulatorySubmission submission) Generates the Remote URL using the Type Attribute and the remote Identifier of the submission.static StringgetThingName(RegulatorySubmission submission) Provides the value for the created thing name.
-
Method Details
-
createThing
public static String createThing(RegulatorySubmission regulatorySubmission) throws WTException, WTPropertyVetoException, org.json.JSONException Creates a Thingworx thing and sets the remote identifier.Thing creation is configured using Type Attributes:
ThingWorx Service Selector, ThingWorx App Name, ThingWorx App Key, ThingWorx Base URL, ThingWorx Thing Template Name.The thing is created using the services CreateThing, EnableThing and Start Thing. If the Thingworx Initialization URL is present the service will be called.
In production systems the ThingWorx Service Selector and Thingworx App Name should be used to configure secure communication between Windchill and Thingworx. Use ThingWorx App Key in development and Testing for ease of configuration.
Supported API: true- Throws:
WTExceptionWTPropertyVetoExceptionorg.json.JSONException
-
getInitializationURL
Generates the initialization URL. Created from the Type Attribute Initialization URL FormatNote: the RegulatorySubmission is not modified by this call
Supported API: true- Throws:
WTException
-
getInitializationPayloadMap
public static Map<String,Object> getInitializationPayloadMap(RegulatorySubmission submission) throws WTException, org.json.JSONException Provide the key value pairs to send with the body of the initialization URL. Created from the Type Attribute Initialization Payload.
Supported API: true- Throws:
WTExceptionorg.json.JSONException
-
getInitializationPayload
public static org.json.JSONObject getInitializationPayload(RegulatorySubmission submission) throws WTException, org.json.JSONException Returns the content of the Initialization Payload from the the Type definition.
Supported API: true- Throws:
WTExceptionorg.json.JSONException
-
getRemoteURL
Generates the Remote URL using the Type Attribute and the remote Identifier of the submission. Create from the Type Attribute Remote URL FormatNote: the RegulatorySubmission is not modified by this call
Supported API: true- Throws:
WTException
-
getThingName
Provides the value for the created thing name.Uses the Type Attribute ThingWorx Thing Name Prefix and appends a GUID to create a unique name.
Supported API: true- Throws:
WTException
-