Class Organization

    • Constructor Detail

      • Organization

        public Organization()
    • Method Detail

      • GetOrganizationConnections

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetOrganizationConnections​(java.lang.Double maxDepth)
                                             throws java.lang.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:
        java.lang.Exception - If an error occurs
      • GetChildConnections

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetChildConnections​(java.lang.String name)
                                      throws java.lang.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:
        java.lang.Exception - If an error occurs
      • GetParentConnections

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetParentConnections​(java.lang.String name)
                                       throws java.lang.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:
        java.lang.Exception - If an error occurs
      • GetMobileMashup

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

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

        @ThingworxExtensionApiMethod(since={6,6})
        public void AddOrganizationalUnit​(java.lang.String parentName,
                                          java.lang.String name)
                                   throws java.lang.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:
        java.lang.Exception - If an error occurs
      • MoveOrganizationalUnit

        @ThingworxExtensionApiMethod(since={6,6})
        public void MoveOrganizationalUnit​(java.lang.String parentName,
                                           java.lang.String name)
                                    throws java.lang.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:
        java.lang.Exception - If an error occurs
      • SetOrganizationalUnitDescription

        @ThingworxExtensionApiMethod(since={6,6})
        public void SetOrganizationalUnitDescription​(java.lang.String name,
                                                     java.lang.String description)
                                              throws java.lang.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:
        java.lang.Exception - If an error occurs
      • GetOrganizationalUnitDescription

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.String GetOrganizationalUnitDescription​(java.lang.String name)
                                                          throws java.lang.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:
        java.lang.Exception - If an error occurs
      • DeleteOrganizationalUnit

        @ThingworxExtensionApiMethod(since={6,6})
        public void DeleteOrganizationalUnit​(java.lang.String name,
                                             java.lang.Boolean deleteChildren)
                                      throws java.lang.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:
        java.lang.Exception - If an error occurs
      • GetSubOrganizationConnections

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetSubOrganizationConnections​(java.lang.String start,
                                                       java.lang.Double maxDepth)
                                                throws java.lang.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:
        java.lang.Exception - If an error occurs
      • IsParent

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.Boolean IsParent​(java.lang.String name,
                                          java.lang.String parentName)
                                   throws java.lang.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:
        java.lang.Exception - If an error occurs
      • GetParentName

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.String GetParentName​(java.lang.String name)
                                       throws java.lang.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:
        java.lang.Exception - If an error occurs
      • IsChild

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.Boolean IsChild​(java.lang.String start,
                                         java.lang.String name)
                                  throws java.lang.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:
        java.lang.Exception - If an error occurs
      • IsInSubOrganization

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.Boolean IsInSubOrganization​(java.lang.String start,
                                                     java.lang.String name)
                                              throws java.lang.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:
        java.lang.Exception - If an error occurs
      • IsInOrganization

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.Boolean IsInOrganization​(java.lang.String name)
                                           throws java.lang.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:
        java.lang.Exception - If an error occurs
      • AssignMembers

        @ThingworxExtensionApiMethod(since={6,6})
        public void AssignMembers​(java.lang.String name,
                                  InfoTable members)
                           throws java.lang.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:
        java.lang.Exception - If an error occurs
      • AddMember

        @ThingworxExtensionApiMethod(since={6,6})
        public void AddMember​(java.lang.String name,
                              java.lang.String member,
                              java.lang.String type)
                       throws java.lang.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:
        java.lang.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​(java.lang.String name,
                                 java.lang.String member,
                                 java.lang.String type)
                          throws java.lang.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:
        java.lang.Exception - If an error occurs
      • GetMembers

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetMembers​(java.lang.String name)
                             throws java.lang.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:
        java.lang.Exception - If an error occurs
      • GetMember

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetMember​(java.lang.String name,
                                   java.lang.String member)
                            throws java.lang.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:
        java.lang.Exception - If an error occurs
      • QueryMembers

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable QueryMembers​(java.lang.String name,
                                      org.json.JSONObject types,
                                      java.lang.String filter,
                                      java.lang.Double maxItems)
                               throws java.lang.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:
        java.lang.Exception - If an error occurs