Enum ContextType

  • java.lang.Object
    • java.lang.Enum<ContextType>
      • com.thingworx.system.ContextType
  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ContextType>

    @ThingworxExtensionApiClass(since={9,0})
    public enum ContextType
    extends java.lang.Enum<ContextType>
    ContextType for adjusting behavior based on server context and operation requirements
    • Method Detail

      • values

        public static ContextType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ContextType c : ContextType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ContextType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isSecondaryOperation

        @ThingworxExtensionApiMethod(since={9,0})
        public boolean isSecondaryOperation()


        Determine if this is a secondary or patch operation.
        Returns:
        true if given change type is secondary or patch operation.
      • isPatchOperation

        @ThingworxExtensionApiMethod(since={9,0})
        public boolean isPatchOperation()


        Determine if this is a patch operation or not.
        Returns:
        true if given change type is model sync patch operation.
      • isSecondaryStartup

        @ThingworxExtensionApiMethod(since={9,0})
        public boolean isSecondaryStartup()


        Determine if this is a secondary startup context
        Returns:
        true if this is not the first server starting up.
      • isSecondaryShutdown

        @ThingworxExtensionApiMethod(since={9,0})
        public boolean isSecondaryShutdown()


        Determine if this is a secondary shutdown context
        Returns:
        true if this is not the last server shutting down.
      • isPatchCreateOperation

        @ThingworxExtensionApiMethod(since={9,0})
        public boolean isPatchCreateOperation()


        Determine if this is a patch create operation or not.
        Returns:
        true if this is model sync patch create operation.
      • isPatchDeleteOperation

        @ThingworxExtensionApiMethod(since={9,0})
        public boolean isPatchDeleteOperation()


        Determine if this is a patch delete operation or not.
        Returns:
        true if this is model sync patch delete operation.
      • isPatchUpdateOperation

        @ThingworxExtensionApiMethod(since={9,0})
        public boolean isPatchUpdateOperation()


        Determine if this is a patch update operation or not.
        Returns:
        true if this is model sync patch update operation.