Interface ISupportsDeprecation

    • Method Detail

      • getDeprecated

        @ThingworxExtensionApiMethod(since={9,4})
        default org.json.JSONObject getDeprecated()


        The method returns JSONObject for deprecated aspect. If deprecated object is null, it will return null.

        Returns:
        JSONObject for deprecated aspect.
      • since

        @ThingworxExtensionApiMethod(since={9,4})
        default java.lang.String since()


        The method will return value of since set in deprecated aspect. If deprecated object is null, it will return null.

        Returns:
        String since value of deprecated aspect.
      • isDeprecated

        @ThingworxExtensionApiMethod(since={9,4})
        default boolean isDeprecated()


        The method checks if the caller is deprecated or not. It returns true if deprecated aspect has been set, otherwise returns false.

        Returns:
        true if deprecated aspect is set, else returns false.
      • isDeprecatedBefore

        @ThingworxExtensionApiMethod(since={9,4})
        default boolean isDeprecatedBefore​(java.lang.String version)


        The method compares the passed version string with the value of since set in deprecated aspect. If the passed version is greater than or equal to value of since, it returns true. If the passed version less than value of since, it returns false.

        Parameters:
        version - The version string needed to check for deprecation
        Returns:
        true if the passed version is greater than value of since.