Class User

    • Field Detail

      • EXTENDED_PROPERTY_PREFIX

        public static final java.lang.String EXTENDED_PROPERTY_PREFIX
        See Also:
        Constant Field Values
      • USER_EXTENSIONS_TABLE_NAME

        public static final java.lang.String USER_EXTENSIONS_TABLE_NAME
        See Also:
        Constant Field Values
      • SETTINGS_TABLE_NAME

        public static final java.lang.String SETTINGS_TABLE_NAME
        See Also:
        Constant Field Values
      • USER_EXTENSIONS_THINGSHAPE

        public static final java.lang.String USER_EXTENSIONS_THINGSHAPE
        See Also:
        Constant Field Values
      • USER_EXTENSIONS_NAME_ROW

        public static final java.lang.String USER_EXTENSIONS_NAME_ROW
        See Also:
        Constant Field Values
      • USER_EXTENSIONS_VALUE_ROW

        public static final java.lang.String USER_EXTENSIONS_VALUE_ROW
        See Also:
        Constant Field Values
      • USER_EXTENSIONS_DATE_ROW

        public static final java.lang.String USER_EXTENSIONS_DATE_ROW
        See Also:
        Constant Field Values
    • Constructor Detail

      • User

        public User()
    • Method Detail

      • 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.
        Overrides:
        SetDescription in class RootEntity
        Parameters:
        description - Description for an entity - STRING
        Throws:
        java.lang.Exception - If an error occurs
      • 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.
        Overrides:
        SetTags in class RootEntity
        Parameters:
        tags - Tags for an entity - TAGS
        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.
        Overrides:
        AddTags in class RootEntity
        Parameters:
        tags - Tags for an entity - TAGS
        Throws:
        java.lang.Exception - If an error occurs
      • ResetSecurityContext

        @ThingworxExtensionApiMethod(since={6,6})
        public void ResetSecurityContext()
        Service Category:
        Security
        Service Description:
        Reset cached security context.
      • 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
      • GetPersistentValue

        @ThingworxExtensionApiMethod(since={6,6})
        public org.json.JSONObject GetPersistentValue​(java.lang.String name)
                                               throws java.lang.Exception
        Service Category:
        SessionInfo
        Service Description:
        Get persistent value.
        Parameters:
        name - Parameter name - STRING
        Returns:
        result Parameter value - JSON
        Throws:
        java.lang.Exception - If an error occurs
      • SetPersistentValue

        @ThingworxExtensionApiMethod(since={6,6})
        public void SetPersistentValue​(java.lang.String name,
                                       org.json.JSONObject value)
                                throws java.lang.Exception
        Service Category:
        SessionInfo
        Service Description:
        Set persistent value.
        Parameters:
        name - Parameter name - STRING
        value - Parameter value - JSON
        Throws:
        java.lang.Exception - If an error occurs
      • ChangePassword

        @ThingworxExtensionApiMethod(since={6,6})
        public void ChangePassword​(java.lang.String oldPassword,
                                   java.lang.String newPassword,
                                   java.lang.String newPasswordConfirm)
                            throws java.lang.Exception
        Service Category:
        Security
        Service Description:
        Change password.
        Parameters:
        oldPassword - Previous Password - STRING
        newPassword - New Password - STRING
        newPasswordConfirm - New Password Confirmation - STRING
        Throws:
        java.lang.Exception - If an error occurs
      • AssignNewPassword

        @ThingworxExtensionApiMethod(since={6,6})
        public void AssignNewPassword​(java.lang.String newPassword,
                                      java.lang.String newPasswordConfirm)
                               throws java.lang.Exception
        Service Category:
        Security
        Service Description:
        Assign new password.
        Parameters:
        newPassword - New Password - STRING
        newPasswordConfirm - New Password Confirmation - STRING
        Throws:
        java.lang.Exception - If an error occurs
      • SetLanguagePreferences

        @ThingworxExtensionApiMethod(since={6,6,5})
        public void SetLanguagePreferences​(java.lang.String preferences)
                                    throws java.lang.Exception
        Service Category:
        Properties
        Service Description:
        Set the user's language preferences.


        Sets an ordered list of languages as the language preferences for this user. Localization tokens are resolved in the first (or only) language, if possible. If that translation is not available, other listed languages are tried in the specified order.
        Parameters:
        preferences - The new language preferences, ordered best first, comma separated
        Throws:
        java.lang.Exception - Thrown if the user in the current security context attempts to call this on a different user and is not an administrator
      • GetUserPreferenceInfo

        @ThingworxExtensionApiMethod(since={6,6,5})
        public InfoTable GetUserPreferenceInfo()
                                        throws java.lang.Exception
        Service Category:
        Properties
        Service Description:
        Get the attributes of the User entity that an unprivileged user may see.


        Returns all of this user's general preference information such as username, avatar and language preferences.
        Returns:
        A collection of the user's preference information
        Throws:
        java.lang.Exception - Thrown if the user in the current security context attempts to call this on a different user and is not an administrator
      • DisableUser

        @ThingworxExtensionApiMethod(since={6,6})
        public void DisableUser()
                         throws java.lang.Exception
        Service Category:
        Security
        Service Description:
        Service to disable a user.
        Throws:
        java.lang.Exception - If an error occurs
      • EnableUser

        @ThingworxExtensionApiMethod(since={6,6})
        public void EnableUser()
                        throws java.lang.Exception
        Service Category:
        Security
        Service Description:
        Service to enable a user.
        Throws:
        java.lang.Exception - If an error occurs
      • IsEnabled

        @ThingworxExtensionApiMethod(since={6,6})
        public boolean IsEnabled()
                          throws java.lang.Exception
        Service Category:
        Security
        Service Description:
        Get Enabled Status.
        Returns:
        enabled Enabled status - BOOLEAN
        Throws:
        java.lang.Exception - If an error occurs
      • LockUser

        @ThingworxExtensionApiMethod(since={7,2})
        public void LockUser()
                      throws java.lang.Exception
        Service Category:
        Security
        Service Description:
        Service to lock a user.
        Throws:
        java.lang.Exception - If an error occurs
      • UnlockUser

        @ThingworxExtensionApiMethod(since={7,2})
        public void UnlockUser()
                        throws java.lang.Exception
        Service Category:
        Security
        Service Description:
        Service to unlock a user.
        Throws:
        java.lang.Exception - If an error occurs
      • IsLocked

        @ThingworxExtensionApiMethod(since={7,2})
        public boolean IsLocked()
                         throws java.lang.Exception
        Service Category:
        Security
        Service Description:
        Get Locked Status.
        Returns:
        result Locked status - BOOLEAN
        Throws:
        java.lang.Exception - If an error occurs
      • GetGroups

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetGroups()
                            throws java.lang.Exception
        Service Category:
        Groups
        Service Description:
        Get list of groups that this user is a member of.
        Returns:
        result Result - INFOTABLE - Aspects {dataShape:EntityList}
        Throws:
        java.lang.Exception - If an error occurs
      • GetOrganizationalUnits

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetOrganizationalUnits()
                                         throws java.lang.Exception
        Service Category:
        OrgUnits
        Service Description:
        Get list of organizational units that this user is a member of.
        Returns:
        result Result - INFOTABLE - Aspects {dataShape:EntityList}
        Throws:
        java.lang.Exception - If an error occurs
      • GetOrganizations

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetOrganizations()
                                   throws java.lang.Exception
        Service Category:
        Organizations
        Service Description:
        Get list of organizations that this user is a member of.
        Returns:
        result Result - INFOTABLE - Aspects {dataShape:EntityList}
        Throws:
        java.lang.Exception - If an error occurs
      • GetApplicationKeyExpirationInfo

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetApplicationKeyExpirationInfo​(java.lang.Boolean expiredKeys,
                                                         java.lang.Boolean unexpiredKeys)
                                                  throws java.lang.Exception
        Service Category:
        ApplicationKeys
        Service Description:
        Get application key expiration info associated with this user. Must specify true to at least one parameter to return any application keys, true to both parameters if you want to return all application keys.
        Parameters:
        expiredKeys - Expired keys - BOOLEAN
        unexpiredKeys - Unexpired keys - BOOLEAN
        Returns:
        result Result - INFOTABLE - Aspects {dataShape:ApplicationKeyExpirationInfo}
        Throws:
        java.lang.Exception - If an error occurs
      • DoesApplicationKeyWithKeyIdExist

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.Boolean DoesApplicationKeyWithKeyIdExist​(java.lang.String keyId)
                                                           throws java.lang.Exception
        Service Category:
        ApplicationKeys
        Service Description:
        Returns true if the specified key id associated with this user exists.
        Parameters:
        keyId - The Key Id - STRING
        Returns:
        result Result - BOOLEAN
        Throws:
        java.lang.Exception - If an error occurs
      • DeleteApplicationKeys

        @ThingworxExtensionApiMethod(since={6,6})
        public void DeleteApplicationKeys​(java.lang.Boolean deleteExpiredKeys,
                                          java.lang.Boolean deleteUnexpiredKeys)
                                   throws java.lang.Exception
        Service Category:
        ApplicationKeys
        Service Description:
        Delete application keys associated with this user. Must specify true to at least one parameter to delete any application keys, true to both parameters if you want to delete all application keys.
        Parameters:
        deleteExpiredKeys - Delete expired keys - BOOLEAN
        deleteUnexpiredKeys - Delete unexpired keys - BOOLEAN
        Throws:
        java.lang.Exception - If an error occurs
      • getLanguage

        @ThingworxExtensionApiMethod(since={7,4})
        public java.lang.String getLanguage()


        Get the user's language preferences.
        Returns:
        {String} an ordered, comma-separated list of language preferences, best choice first.
      • getPropertyValue

        @ThingworxExtensionApiMethod(since={6,6})
        public IPrimitiveType getPropertyValue​(java.lang.String propertyName)
                                        throws java.lang.Exception
        Description copied from interface: IPropertyProvider


        Returns the value currently assigned to the specified property.
        Specified by:
        getPropertyValue in interface IPropertyProvider
        Parameters:
        propertyName - the name of the property to retrieve the value of
        Returns:
        the property's current value
        Throws:
        java.lang.Exception - If an error occurs
      • hasProperty

        @ThingworxExtensionApiMethod(since={6,6})
        public boolean hasProperty​(java.lang.String propertyName)
        Description copied from interface: IPropertyProvider


        Returns true if there exists a property with the specified name. Property names are case-sensitive.
        Specified by:
        hasProperty in interface IPropertyProvider
        Parameters:
        propertyName - the property name to check
        Returns:
        true if the specified property exists
      • hasPropertyAndIsVisible

        @ThingworxExtensionApiMethod(since={9,0})
        public boolean hasPropertyAndIsVisible​(java.lang.String propertyName)
                                        throws java.lang.Exception
        Description copied from interface: IPropertyProvider


        Returns true if there exists a property with the specified name and is visible to the user. Property names are case-sensitive.
        Specified by:
        hasPropertyAndIsVisible in interface IPropertyProvider
        Parameters:
        propertyName - the property name to check
        Returns:
        true if the specified property exists and is visible
        Throws:
        java.lang.Exception - If an error occurs
      • setPropertyValue

        @ThingworxExtensionApiMethod(since={6,6})
        public void setPropertyValue​(java.lang.String propertyName,
                                     IPrimitiveType value)
                              throws java.lang.Exception
        Specified by:
        setPropertyValue in interface IPropertyProvider
        Parameters:
        propertyName - the name of the property that is being modified
        value - the value to assign to the property
        Throws:
        java.lang.Exception - If an error occurs
      • GetPropertyValues

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetPropertyValues()
                                    throws java.lang.Exception
        Service Category:
        Properties
        Service Description:
        Get the current property values for this thing.
        Returns:
        result Property values - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • SetPropertyValues

        @ThingworxExtensionApiMethod(since={6,6})
        public void SetPropertyValues​(InfoTable values)
                               throws java.lang.Exception
        Service Category:
        Properties
        Service Description:
        Get a subset of the current property values for this thing.
        Parameters:
        values - Property values - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • GetNamedPropertyValues

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetNamedPropertyValues​(InfoTable propertyNames)
                                         throws java.lang.Exception
        Service Category:
        Properties
        Service Description:
        Get a subset of the current property values for this thing.
        Parameters:
        propertyNames - Property names - INFOTABLE
        Returns:
        result Property values - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • GetPropertyValuesVTQ

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetPropertyValuesVTQ()
                                       throws java.lang.Exception
        Service Category:
        Properties
        Service Description:
        Get the current property values for this thing as VTQ.
        Returns:
        result Property values - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • GetNamedPropertyValuesVTQ

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetNamedPropertyValuesVTQ​(InfoTable propertyNames)
                                            throws java.lang.Exception
        Service Category:
        Properties
        Service Description:
        Get the current property values for this thing as VTQ.
        Parameters:
        propertyNames - Property names - INFOTABLE
        Returns:
        result Property values - INFOTABLE - Aspects {isMultiRow: false}
        Throws:
        java.lang.Exception - If an error occurs
      • GetPropertyQuality

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.String GetPropertyQuality​(java.lang.String propertyName)
                                            throws java.lang.Exception
        Service Category:
        Properties
        Service Description:
        Get the quality for a specific property.
        Parameters:
        propertyName - Property name - STRING
        Returns:
        Quality Quality value - STRING
        Throws:
        java.lang.Exception - If an error occurs
      • GetPropertyTime

        @ThingworxExtensionApiMethod(since={6,6})
        public org.joda.time.DateTime GetPropertyTime​(java.lang.String propertyName)
                                               throws java.lang.Exception
        Service Category:
        Properties
        Service Description:
        Get the timestamp for a specific property.
        Parameters:
        propertyName - Property name - STRING
        Returns:
        Time Time value - DATETIME
        Throws:
        java.lang.Exception - If an error occurs
      • SetConfigurationTable

        @ThingworxExtensionApiMethod(since={6,6})
        public final 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.
        Overrides:
        SetConfigurationTable in class RootEntity
        Parameters:
        tableName - Configuration table name - STRING
        configurationTable - Configuration table content - INFOTABLE
        persistent - Persist these changes - BOOLEAN
        Throws:
        java.lang.Exception - If an error occurs
      • SetMultiRowConfigurationTable

        @ThingworxExtensionApiMethod(since={6,6})
        public final 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.
        Overrides:
        SetMultiRowConfigurationTable in class RootEntity
        Parameters:
        tableName - Configuration table name - STRING
        configurationTable - Configuration table content - INFOTABLE
        persistent - Persist these changes - BOOLEAN
        Throws:
        java.lang.Exception - If an error occurs
      • SetConfigurationTableRows

        @ThingworxExtensionApiMethod(since={6,6})
        public final 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.
        Overrides:
        SetConfigurationTableRows in class RootEntity
        Parameters:
        tableName - Configuration table name - STRING
        values - Configuration table rows to modify - INFOTABLE
        persistent - Persist these changes - BOOLEAN
        Throws:
        java.lang.Exception - If an error occurs
      • DeleteConfigurationTable

        @ThingworxExtensionApiMethod(since={6,6})
        public final void DeleteConfigurationTable​(java.lang.String tableName,
                                                   java.lang.Boolean persistent)
                                            throws java.lang.Exception
        Service Category:
        Configuration
        Service Description:
        Delete an entire configuration table.
        Overrides:
        DeleteConfigurationTable in class RootEntity
        Parameters:
        tableName - Configuration table name - STRING
        persistent - Persist these changes - BOOLEAN
        Throws:
        java.lang.Exception - If an error occurs
      • DeleteConfigurationTableRows

        @ThingworxExtensionApiMethod(since={6,6})
        public final void DeleteConfigurationTableRows​(java.lang.String tableName,
                                                       InfoTable values,
                                                       java.lang.Boolean persistent)
                                                throws java.lang.Exception
        Service Category:
        Configuration
        Service Description:
        Delete one or more rows from a multi-row configuration table.
        Overrides:
        DeleteConfigurationTableRows in class RootEntity
        Parameters:
        tableName - Configuration table name - STRING
        values - Configuration table rows to modify - INFOTABLE
        persistent - Persist these changes - BOOLEAN
        Throws:
        java.lang.Exception - If an error occurs
      • DeleteAllConfigurationTableRows

        @ThingworxExtensionApiMethod(since={6,6})
        public final 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.
        Overrides:
        DeleteAllConfigurationTableRows in class RootEntity
        Parameters:
        tableName - Configuration table name - STRING
        persistent - Persist these changes - BOOLEAN
        Throws:
        java.lang.Exception - If an error occurs