Package com.thingworx.networks
Class Network
- java.lang.Object
-
- All Implemented Interfaces:
ISupportsAccessModifier
,IConfigurableObject
,INotScriptFriendly
,ISupportsDeprecation
,IDiffableObject
,IAvatar
,IEntityLifeCycleEvent
,IPersistable
,IServiceProvider
,ITaggableObject
,IDependencyScannableObject
,IEntityDefinition
,IPersistableObject<java.lang.String>
,IDesignTimeSecurable
,IDesignTimeSecurableEntity
,IRunTimeSecurable
,IRunTimeSecurableEntity
,ISecurable
,IVisibilitySecurable
,IVisibilitySecurableEntity
,IAspectContainer
,INamedObject
,java.io.Serializable
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public class Network extends ServiceProviderEntity implements ISupportsAccessModifier
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.thingworx.entities.RootEntity
BASIC_PROPERTY_DEFINITIONS, EXCLUDED_ENTITY_TYPES_IN_PROJECT
-
Fields inherited from class com.thingworx.types.NamedObject
NAME_COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description Network()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
AddConnection(java.lang.String from, java.lang.String to, java.lang.String connectionType)
Service Category: Connections Service Description: Add a connection.
Adds a connection of the specified type between the given parent and child on this Network.void
DeleteConnection(java.lang.String to, java.lang.String from)
Service Category: Connections Service Description: Delete a connection.
Deletes the connection between the given parent and child from this Network.InfoTable
GetChildConnections(java.lang.String name)
Service Category: Connections Service Description: Return a list of all the child connections in this network for a specific node.
Returns a collection of all the child connections in this network for a specific node.InfoTable
GetChildConnectionsForShape(java.lang.String name, java.lang.String thingShapeName)
Service Category: Connections Service Description: Return a list of all the child connections in this network for a specific node that implement a given shape.
Returns a collection of all the child connections in this network for a specific node that implement a given ThingShape.InfoTable
GetChildConnectionsForTemplate(java.lang.String name, java.lang.String thingTemplateName)
Service Category: Connections Service Description: Return a list of all the child connections in this network for a specific node that implement a given template.
Returns a collection of all the child connections in this network for a specific node that implement a given ThingTemplate.InfoTable
GetChildConnectionsWithTemplate(java.lang.String name)
Service Category: Connections Service Description: Return a list of all the child connections in this network for a specific node along with their implemented template name.
Returns a collection of all the child connections in this network for a specific node along with their implemented ThingTemplate name.RelationshipTypes.ThingworxRelationshipTypes
getEntityType()
InfoTable
GetNetworkConnections(java.lang.Double maxDepth)
Service Category: Connections Service Description: Return a list of all the connections in this network.
Returns a collection of all the connections in this network up to the given maximum depth.InfoTable
GetNetworkConnectionsWithTemplate(java.lang.Double maxDepth)
Service Category: Connections Service Description: Return a list of all the connections in this network along with their implemented template name.
Returns a collection of all the connections in this network that includes the Network's ThingTemplate up to a maximum depth.java.lang.String
GetParentName(java.lang.String name)
Service Category: Relationships Service Description: Get parent of a given Thing in the network.InfoTable
GetSubNetworkConnections(java.lang.String start, java.lang.Double maxDepth)
Service Category: Connections Service Description: Return a list of all the connections in this SubNetwork.
Returns a collection of all the connections in this sub network.InfoTable
GetSubNetworkConnectionsWithTemplate(java.lang.String start, java.lang.Double maxDepth)
Service Category: Connections Service Description: Return a list of all the connections in this subnetwork with their implemented template name.
Returns a collection of all the connections in this sub network with their implemented ThingTemplate.java.lang.Boolean
IsChild(java.lang.String start, java.lang.String name)
Service Category: Relationships Service Description: Checks to see if a Thing exists as a child of the starting Thing.
Check if the given Thing is a direct child in the Network.java.lang.Boolean
IsInNetwork(java.lang.String name)
Service Category: Relationships Service Description: Checks to see if a Thing exists in this network.java.lang.Boolean
IsInSubNetwork(java.lang.String start, java.lang.String name)
Service Category: Relationships Service Description: Checks to see if a Thing exists in this subnetwork.
Check if the given Thing is a child in the Network at any depth.java.lang.Boolean
IsParent(java.lang.String name, java.lang.String parentName)
Service Category: Relationships Service Description: Check if the parent of a given Thing in the network matches a specific Thing name.void
RemoveFromNetwork(java.lang.String name)
Service Category: Connections Service Description: Remove a specific Thing from the network.
Removes Connections to and from the given Thing in this Networkvoid
SetConnections(InfoTable connections)
Service Category: Connections Service Description: Assign all connections.
Assigns all connections from given NetworkConnection InfoTable to this Network.-
Methods inherited from class com.thingworx.entities.ServiceProviderEntity
getInstancePublicServiceDefinitions, getInstanceServiceDefinition, getInstanceServiceDefinitions, initializeEntity, preInitializeEntity, processAPIServiceRequest, processServiceRequest
-
Methods inherited from class com.thingworx.entities.RootEntity
AddConfigurationTableDefinition, AddConfigurationTableDefinition, addDesignTimePermission, AddDesignTimePermission, addRunTimePermission, AddRunTimePermission, AddTags, addVisibilityPermission, AddVisibilityPermission, CheckDesignTimePermission, CheckDesignTimePermissionForGroup, CheckDesignTimePermissionForUser, CheckPermission, CheckPermissionForGroup, CheckPermissionForUser, cleanupEntity, DeleteAllConfigurationTableRows, DeleteConfigurationTable, DeleteConfigurationTableRows, DeleteConfigurationTableRows, deleteDesignTimePermission, DeleteDesignTimePermission, deleteRunTimePermission, DeleteRunTimePermission, deleteVisibilityPermission, DeleteVisibilityPermission, dispose, getAspects, GetAvatar, getAvatarContent, GetAvatarURL, GetConfigurationChangeHistory, getConfigurationSetting, getConfigurationTable, GetConfigurationTable, GetConfigurationTableDefinition, GetConfigurationTableRow, GetConfigurationTables, GetDescription, getDesignTimePermissions, GetDesignTimePermissions, GetDesignTimePermissionsAsJSON, getDocumentationContent, getEntityTypeAsString, GetEventDefinition, GetEventDefinitions, GetHomeMashup, GetIncomingDependencies, GetIncomingDependenciesAsNetwork, GetInstanceMetadataAsJSON, GetInstanceMetadataWithPermissionsAsJSON, GetLastModifiedDate, GetMetadata, GetMetadataAsJSON, GetMetadataWithPermissionsAsJSON, GetOutgoingDependencies, GetOutgoingDependenciesAsNetwork, getOwner, GetOwner, GetPermissionsForCurrentUser, GetPermissionsForGroup, GetPermissionsForUser, GetProjectName, GetPropertyDefinition, GetPropertyDefinitions, getRunTimePermissions, GetRunTimePermissions, GetRunTimePermissionsAsJSON, GetServiceDefinition, GetServiceDefinitions, getStringConfigurationSetting, getStringConfigurationSettingWithDefault, GetSummaryInformation, getTags, GetTags, GetTagsAsInfoTable, getVisibilityPermissions, GetVisibilityPermissions, GetVisibilityPermissionsAsJSON, HasIncomingDependencies, HasOutgoingDependencies, isEditable, isEditableExtensionObject, isEditableSystemObject, isExtensionObject, IsMultiRowTable, isOwner, isSystemObject, isThemeObject, isVisible, isVisible, ListDeprecatedUsage, persistDesignTimePermissions, persistRunTimePermissions, persistVisibilityPermissions, RemoveTags, SaveConfigurationTables, SetAvatar, setConfigurationSetting, SetConfigurationTable, SetConfigurationTableRows, SetDescription, setDesignTimePermissions, SetDesignTimePermissionsAsJSON, setDocumentationContent, setExtensionObject, SetHomeMashup, setLastModifiedDate, SetMultiRowConfigurationTable, setOwner, SetOwner, SetProjectName, setRunTimePermissions, SetRunTimePermissionsAsJSON, setStringConfigurationSetting, SetTags, setVisibilityPermissions, SetVisibilityPermissionsAsJSON, toJSON, toJSONDefinition, UpdateProjectDependencies, validateConfiguration
-
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.entities.interfaces.IPersistable
getID, hasID
-
Methods inherited from interface com.thingworx.security.permissions.ISecurable
getID, getName
-
Methods inherited from interface com.thingworx.accesscontrol.ISupportsAccessModifier
getAccessModifier, getAccessModifierScope, getExemptList, hasAccessModifier, isInternalAccess, isPrivateAccess, isRestrictedAccess
-
Methods inherited from interface com.thingworx.deprecation.ISupportsDeprecation
getDeprecated, isDeprecated, isDeprecatedBefore, since
-
-
-
-
Method Detail
-
GetNetworkConnections
@ThingworxExtensionApiMethod(since={6,6,5}) public InfoTable GetNetworkConnections(java.lang.Double maxDepth) throws java.lang.Exception
- Service Category:
- Connections
- Service Description:
- Return a list of all the connections in this network.
Returns a collection of all the connections in this network up to the given maximum depth.- Parameters:
maxDepth
- Maximum depth for searching sub networks- Returns:
- InfoTable of the network connections in the NetworkConnection DataShape
- Throws:
java.lang.Exception
- Thrown if an unexpected error occurs
-
GetNetworkConnectionsWithTemplate
@ThingworxExtensionApiMethod(since={6,6,5}) public InfoTable GetNetworkConnectionsWithTemplate(java.lang.Double maxDepth) throws java.lang.Exception
- Service Category:
- Connections
- Service Description:
- Return a list of all the connections in this network along with their implemented template name.
Returns a collection of all the connections in this network that includes the Network's ThingTemplate up to a maximum depth.- Parameters:
maxDepth
- Maximum depth for searching sub networks- Returns:
- InfoTable of network connections in the NetworkConnectionWithTemplate DataShape
- Throws:
java.lang.Exception
- Thrown if an unexpected error occurs
-
GetChildConnections
@ThingworxExtensionApiMethod(since={6,6,5}) public InfoTable GetChildConnections(java.lang.String name) throws java.lang.Exception
- Service Category:
- Connections
- Service Description:
- Return a list of all the child connections in this network for a specific node.
Returns a collection of all the child connections in this network for a specific node.- Parameters:
name
- Name of node for whom to return children- Returns:
- InfoTable of the network connections in the NetworkConnection DataShape
- Throws:
java.lang.Exception
- Thrown if an unexpected error occurs
-
AddConnection
@ThingworxExtensionApiMethod(since={6,6,5}) public void AddConnection(java.lang.String from, java.lang.String to, java.lang.String connectionType) throws java.lang.Exception
- Service Category:
- Connections
- Service Description:
- Add a connection.
Adds a connection of the specified type between the given parent and child on this Network.- Parameters:
from
- Name of the parent Thingto
- Name of the Thing new childconnectionType
- Name of the connection type. Must not be null or empty.- Throws:
java.lang.Exception
- Thrown if parent or child are not valid things, they don't exist on this Network or a connection already exists between them
-
SetConnections
@ThingworxExtensionApiMethod(since={6,6,5}) public void SetConnections(InfoTable connections) throws java.lang.Exception
- Service Category:
- Connections
- Service Description:
- Assign all connections.
Assigns all connections from given NetworkConnection InfoTable to this Network.- Parameters:
connections
- InfoTable with NetworkConnection DataShape containing all connections to be added- Throws:
java.lang.Exception
- Thrown if an InfoTable row has an invalid connection or the Network changes cannot be persisted
-
DeleteConnection
@ThingworxExtensionApiMethod(since={6,6,5}) public void DeleteConnection(java.lang.String to, java.lang.String from) throws java.lang.Exception
- Service Category:
- Connections
- Service Description:
- Delete a connection.
Deletes the connection between the given parent and child from this Network.- Parameters:
to
- Name of the child of the connection to be deletedfrom
- Name of the parent to be deleted- Throws:
java.lang.Exception
- Thrown if Connection does not exist or the Network changes cannot be persisted
-
RemoveFromNetwork
@ThingworxExtensionApiMethod(since={6,6,5}) public void RemoveFromNetwork(java.lang.String name) throws java.lang.Exception
- Service Category:
- Connections
- Service Description:
- Remove a specific Thing from the network.
Removes Connections to and from the given Thing in this Network- Parameters:
name
- Name of the Thing to remove. Must not be null or empty.- Throws:
java.lang.Exception
- Thrown if no Thing is specified or the Network changes cannot be persisted
-
GetChildConnectionsWithTemplate
@ThingworxExtensionApiMethod(since={6,6,5}) public InfoTable GetChildConnectionsWithTemplate(java.lang.String name) throws java.lang.Exception
- Service Category:
- Connections
- Service Description:
- Return a list of all the child connections in this network for a specific node along with their implemented template name.
Returns a collection of all the child connections in this network for a specific node along with their implemented ThingTemplate name.- Parameters:
name
- Name of node for whom to return children- Returns:
- InfoTable of the network connections in the NetworkConnectionWithTemplate DataShape
- Throws:
java.lang.Exception
- Thrown if an unexpected error occurs
-
GetChildConnectionsForShape
@ThingworxExtensionApiMethod(since={6,6,5}) public InfoTable GetChildConnectionsForShape(java.lang.String name, java.lang.String thingShapeName) throws java.lang.Exception
- Service Category:
- Connections
- Service Description:
- Return a list of all the child connections in this network for a specific node that implement a given shape.
Returns a collection of all the child connections in this network for a specific node that implement a given ThingShape.- Parameters:
name
- Name of node for whom to return childrenthingShapeName
- Name of the Thing Shape- Returns:
- InfoTable of the network connections in the NetworkConnection DataShape
- Throws:
java.lang.Exception
- Thrown if an unexpected error occurs
-
GetChildConnectionsForTemplate
@ThingworxExtensionApiMethod(since={6,6,5}) public InfoTable GetChildConnectionsForTemplate(java.lang.String name, java.lang.String thingTemplateName) throws java.lang.Exception
- Service Category:
- Connections
- Service Description:
- Return a list of all the child connections in this network for a specific node that implement a given template.
Returns a collection of all the child connections in this network for a specific node that implement a given ThingTemplate.- Parameters:
name
- Name of node for whom to return childrenthingTemplateName
- Name of the Thing Template- Returns:
- InfoTable of the network connections in the NetworkConnection DataShape
- Throws:
java.lang.Exception
- Thrown if an unexpected error occurs
-
GetSubNetworkConnections
@ThingworxExtensionApiMethod(since={6,6,5}) public InfoTable GetSubNetworkConnections(java.lang.String start, java.lang.Double maxDepth) throws java.lang.Exception
- Service Category:
- Connections
- Service Description:
- Return a list of all the connections in this SubNetwork.
Returns a collection of all the connections in this sub network.- Parameters:
start
- Name of the Thing to start the search atmaxDepth
- Maximum depth for searching below this sub network- Returns:
- InfoTable of the network connections on this sub network in the NetworkConnection DataShape
- Throws:
java.lang.Exception
- Thrown if an unexpected error occurs
-
GetSubNetworkConnectionsWithTemplate
@ThingworxExtensionApiMethod(since={6,6,5}) public InfoTable GetSubNetworkConnectionsWithTemplate(java.lang.String start, java.lang.Double maxDepth) throws java.lang.Exception
- Service Category:
- Connections
- Service Description:
- Return a list of all the connections in this subnetwork with their implemented template name.
Returns a collection of all the connections in this sub network with their implemented ThingTemplate.- Parameters:
start
- Name of the Thing to start the search atmaxDepth
- Maximum depth for searching below this sub network- Returns:
- InfoTable of the network connections on this sub network in the NetworkConnectionWithTemplate DataShape
- Throws:
java.lang.Exception
- Thrown if an unexpected error occurs
-
IsParent
@ThingworxExtensionApiMethod(since={6,6,5}) public java.lang.Boolean IsParent(java.lang.String name, java.lang.String parentName) throws java.lang.Exception
- Service Category:
- Relationships
- Service Description:
- Check if the parent of a given Thing in the network matches a specific Thing name.
- Parameters:
name
- Name of the child ThingparentName
- Name of the parent Thing- Returns:
- True if given parent is actually the parent of the given child, else false
- Throws:
java.lang.Exception
- If an error occurs
Check if the parent of a given Thing in the Network has a specific Thing parent.
-
GetParentName
@ThingworxExtensionApiMethod(since={6,6,5}) public java.lang.String GetParentName(java.lang.String name) throws java.lang.Exception
- Service Category:
- Relationships
- Service Description:
- Get parent of a given Thing in the network.
- Parameters:
name
- Name of the child- Returns:
- Name of the parent if the child exists or null
- Throws:
java.lang.Exception
- If an error occurs
Gets the name of the parent of a given Thing in this Network. Will return the first parent found if the given child has multiple parents. Will return null if the given child does not exist as a child on this Network.
-
IsChild
@ThingworxExtensionApiMethod(since={6,6,5}) public java.lang.Boolean IsChild(java.lang.String start, java.lang.String name) throws java.lang.Exception
- Service Category:
- Relationships
- Service Description:
- Checks to see if a Thing exists as a child of the starting Thing.
Check if the given Thing is a direct child in the Network. This method only checks one level below the start Thing.- Parameters:
start
- Name of the Thing to start searching fromname
- Name of the child Thing to search for- Returns:
- True if found, false if not
- Throws:
java.lang.Exception
- Thrown if an unexpected error occurs
-
IsInSubNetwork
@ThingworxExtensionApiMethod(since={6,6,5}) public java.lang.Boolean IsInSubNetwork(java.lang.String start, java.lang.String name) throws java.lang.Exception
- Service Category:
- Relationships
- Service Description:
- Checks to see if a Thing exists in this subnetwork.
Check if the given Thing is a child in the Network at any depth. This method will check up to the maximum depth of the Network.- Parameters:
start
- Name of the Thing to start searching fromname
- Name of the child Thing to search for- Returns:
- True if found, false if not
- Throws:
java.lang.Exception
- Thrown if an unexpected error occurs
-
IsInNetwork
@ThingworxExtensionApiMethod(since={6,6,5}) public java.lang.Boolean IsInNetwork(java.lang.String name) throws java.lang.Exception
- Service Category:
- Relationships
- Service Description:
- Checks to see if a Thing exists in this network.
- Parameters:
name
- Name of the Thing to search for- Returns:
- Boolean True if found, false if not
- Throws:
java.lang.Exception
- If an error occurs
Check if the given Thing is in the Network.
-
getEntityType
@ThingworxExtensionApiMethod(since={6,6,5}) public RelationshipTypes.ThingworxRelationshipTypes getEntityType()
Description copied from class:RootEntity
Returns the type of this entity.
- Specified by:
getEntityType
in classRootEntity
- Returns:
- the entity type
-
-