Class Organization

All Implemented Interfaces:
IConfigurableObject, INotScriptFriendly, ISupportsDeprecation, IDiffableObject, IAvatar, IEntityLifeCycleEvent, IPersistable, IServiceProvider, ITaggableObject, IDependencyScannableObject, IEntityDefinition, IPersistableObject<String>, IDesignTimeSecurable, IDesignTimeSecurableEntity, IRunTimeSecurable, IRunTimeSecurableEntity, ISecurable, IVisibilitySecurable, IVisibilitySecurableEntity, IAspectContainer, INamedObject, Serializable

@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public class Organization extends ServiceProviderEntity
See Also:
  • Constructor Details

    • Organization

      public Organization()
  • Method Details

    • getOrganizationalUnit

      @ThingworxExtensionApiMethod(since={6,6}) public OrganizationalUnit getOrganizationalUnit(String name)
    • GetOrganizationConnections

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetOrganizationConnections(Double maxDepth) throws Exception
      Service Category:
      OrgUnits
      Service Description:
      Return a list of all the connections in this organization.
      Parameters:
      maxDepth - Maximum depth to search - NUMBER
      Returns:
      result Organization connections - INFOTABLE - Aspects {dataShape:OrganizationConnection}
      Throws:
      Exception - If an error occurs
    • GetChildConnections

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetChildConnections(String name) throws Exception
      Service Category:
      OrgUnits
      Service Description:
      Return a list of all the child connections in this organization for a specific node.
      Parameters:
      name - Name of node for whom to return children - STRING
      Returns:
      result Organization connections - INFOTABLE - Aspects {dataShape:OrganizationConnection}
      Throws:
      Exception - If an error occurs
    • GetParentConnections

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetParentConnections(String name) throws Exception
      Service Category:
      OrgUnits
      Service Description:
      Return a list of all the parent connections in this organization for a specific node.
      Parameters:
      name - Name of node for whom to return children - STRING
      Returns:
      result Organization connections - INFOTABLE - Aspects {dataShape:OrganizationConnection}
      Throws:
      Exception - If an error occurs
    • GetMobileMashup

      @ThingworxExtensionApiMethod(since={6,6}) public String GetMobileMashup()
      Service Category:
      Mashups
      Service Description:
      Get mobile mashup.
      Returns:
      MobileMashup Mobile mashup - MASHUPNAME
    • SetMobileMashup

      @ThingworxExtensionApiMethod(since={6,6}) public void SetMobileMashup(String name) throws Exception
      Service Category:
      Mashups
      Service Description:
      Set mobile mashup.
      Parameters:
      name - Mobile mashup name - MASHUPNAME
      Throws:
      Exception - If an error occurs
    • AddOrganizationalUnit

      @ThingworxExtensionApiMethod(since={6,6}) public void AddOrganizationalUnit(String parentName, String name) throws Exception
      Service Category:
      OrgUnits
      Service Description:
      Add an organizational unit.
      Parameters:
      parentName - Name of parent organizational unit - STRING
      name - Name of organizational unit to add - STRING
      Throws:
      Exception - If an error occurs
    • MoveOrganizationalUnit

      @ThingworxExtensionApiMethod(since={6,6}) public void MoveOrganizationalUnit(String parentName, String name) throws Exception
      Service Category:
      OrgUnits
      Service Description:
      Move an organizational unit.
      Parameters:
      parentName - Name of parent organizational unit - STRING
      name - Name of organizational unit to add - STRING
      Throws:
      Exception - If an error occurs
    • SetOrganizationalUnitDescription

      @ThingworxExtensionApiMethod(since={6,6}) public void SetOrganizationalUnitDescription(String name, String description) throws Exception
      Service Category:
      OrgUnits
      Service Description:
      Set/update the description of organizational unit.
      Parameters:
      name - Organizational Unit name - STRING
      description - description of organizational unit - STRING
      Throws:
      Exception - If an error occurs
    • GetOrganizationalUnitDescription

      @ThingworxExtensionApiMethod(since={6,6}) public String GetOrganizationalUnitDescription(String name) throws Exception
      Service Category:
      OrgUnits
      Service Description:
      Get the description of organizational unit.
      Parameters:
      name - Organizational Unit name - STRING
      Returns:
      result description of organizational unit - STRING
      Throws:
      Exception - If an error occurs
    • DeleteOrganizationalUnit

      @ThingworxExtensionApiMethod(since={6,6}) public void DeleteOrganizationalUnit(String name, Boolean deleteChildren) throws Exception
      Service Category:
      OrgUnits
      Service Description:
      Delete a specific organizational unit from the organization.
      Parameters:
      name - Name of the organizational unit to remove - STRING
      deleteChildren - Delete children also - BOOLEAN
      Throws:
      Exception - If an error occurs
    • GetSubOrganizationConnections

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetSubOrganizationConnections(String start, Double maxDepth) throws Exception
      Service Category:
      OrgUnits
      Service Description:
      Return a list of all the connections in this suborganization.
      Parameters:
      start - Starting organizational unit name - STRING
      maxDepth - Maximum depth to search - NUMBER
      Returns:
      result SubOrganization connections - INFOTABLE - Aspects {dataShape:OrganizationConnection}
      Throws:
      Exception - If an error occurs
    • IsParent

      @ThingworxExtensionApiMethod(since={6,6}) public Boolean IsParent(String name, String parentName) throws Exception
      Service Category:
      OrgUnits
      Service Description:
      Check if the parent of a given organizational unit in the organization matches a specific name.
      Parameters:
      name - Name to search for - STRING
      parentName - Parent name to compare to - STRING
      Returns:
      result Parent name - STRING
      Throws:
      Exception - If an error occurs
    • GetParentName

      @ThingworxExtensionApiMethod(since={6,6}) public String GetParentName(String name) throws Exception
      Service Category:
      OrgUnits
      Service Description:
      Get parent of a given organizational unit.
      Parameters:
      name - Name to search for - STRING
      Returns:
      result Parent name - STRING
      Throws:
      Exception - If an error occurs
    • IsChild

      @ThingworxExtensionApiMethod(since={6,6}) public Boolean IsChild(String start, String name) throws Exception
      Service Category:
      OrgUnits
      Service Description:
      Checks to see if a thing exists as a child of the starting thing.
      Parameters:
      start - Starting name - STRING
      name - Name to search for - STRING
      Returns:
      result True if found, false if not - BOOLEAN
      Throws:
      Exception - If an error occurs
    • IsInSubOrganization

      @ThingworxExtensionApiMethod(since={6,6}) public Boolean IsInSubOrganization(String start, String name) throws Exception
      Service Category:
      OrgUnits
      Service Description:
      Checks to see if a organizational unit exists in this suborganization.
      Parameters:
      start - Starting name - STRING
      name - Name to search for - STRING
      Returns:
      result True if found, false if not - BOOLEAN
      Throws:
      Exception - If an error occurs
    • IsInOrganization

      @ThingworxExtensionApiMethod(since={6,6}) public Boolean IsInOrganization(String name) throws Exception
      Service Category:
      OrgUnits
      Service Description:
      Checks to see if a organizational unit exists in this organization.
      Parameters:
      name - Name to search for - STRING
      Returns:
      result True if found, false if not - BOOLEAN
      Throws:
      Exception - If an error occurs
    • AssignMembers

      @ThingworxExtensionApiMethod(since={6,6}) public void AssignMembers(String name, InfoTable members) throws Exception
      Service Category:
      Members
      Service Description:
      Assign a list of users/groups to this organization unit.
      Parameters:
      name - Organizational Unit name - STRING
      members - Members - INFOTABLE
      Throws:
      Exception - If an error occurs
    • AddMember

      @ThingworxExtensionApiMethod(since={6,6}) public void AddMember(String name, String member, String type) throws Exception
      Service Category:
      Members
      Service Description:
      Add a user/group to this organization.
      Parameters:
      name - Organizational Unit name - STRING
      member - Member - STRING
      type - Member type must be set to either User or Group - STRING
      Throws:
      Exception - If an error occurs

      Additional Information: Adds and persists a user/group to this organization. The best practice for adding members to an organizational unit is to add a member through this method. Do not add directly to the Organizational Unit using OrganizationalUnit#AddMember(member, type).
    • DeleteMember

      @ThingworxExtensionApiMethod(since={6,6}) public void DeleteMember(String name, String member, String type) throws Exception
      Service Category:
      Members
      Service Description:
      Remove a user/organization from this organization.
      Parameters:
      name - Organizational Unit name - STRING
      member - Member - STRING
      type - Member type - STRING
      Throws:
      Exception - If an error occurs
    • GetMembers

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetMembers(String name) throws Exception
      Service Category:
      Members
      Service Description:
      Get a list of members in this organization.
      Parameters:
      name - Organizational Unit name - STRING
      Returns:
      result Organizational Unit Members - INFOTABLE - Aspects {dataShape:EntityReferenceWithDescription}
      Throws:
      Exception - If an error occurs
    • GetMember

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetMember(String name, String member) throws Exception
      Service Category:
      Members
      Service Description:
      Get members by name in this organization.
      Parameters:
      name - Organizational Unit name - STRING
      member - Member name - STRING
      Returns:
      result Organizational Unit Member - INFOTABLE - Aspects {dataShape:EntityReferenceWithDescription}
      Throws:
      Exception - If an error occurs
    • QueryMembers

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable QueryMembers(String name, org.json.JSONObject types, String filter, Double maxItems) throws Exception
      Service Category:
      Members
      Service Description:
      Query a list of members in this organizational unit.
      Parameters:
      name - Organizational Unit name - STRING
      types - Entity types - JSON
      filter - Term filter - STRING
      maxItems - Maximum number of items to return - NUMBER
      Returns:
      result Organization Members - INFOTABLE - Aspects {dataShape:EntityReferenceWithDescription}
      Throws:
      Exception - If an error occurs
    • getEntityType

      Description copied from class: RootEntity


      Returns the type of this entity.

      Specified by:
      getEntityType in class RootEntity
      Returns:
      the entity type