Class ObjectTool

java.lang.Object
org.netxms.client.objecttools.ObjectTool
All Implemented Interfaces:
ObjectAction
Direct Known Subclasses:
ObjectToolDetails

public class ObjectTool extends Object implements ObjectAction
NetXMS object tool representation
  • Field Details

  • Constructor Details

    • ObjectTool

      protected ObjectTool()
      Default implicit constructor.
    • ObjectTool

      public ObjectTool(NXCPMessage msg, long baseId)
      Create object tool from NXCP message. Intended to be called only by NXCSession methods.
      Parameters:
      msg - NXCP message
      baseId - Base variable ID
  • Method Details

    • validateInputFields

      protected void validateInputFields()
      Check if all input fields referenced in tool have definitions
    • createDisplayName

      protected void createDisplayName()
      Create display name
    • isApplicableForObject

      public boolean isApplicableForObject(AbstractObject object)
      Check if tool is applicable for given object.
      Specified by:
      isApplicableForObject in interface ObjectAction
      Parameters:
      object - AbstractObject object
      Returns:
      true if tool is applicable for given object
    • getInputField

      public InputField getInputField(String name)
      Get input field definition by name
      Parameters:
      name - input field name
      Returns:
      input field or null if not found
    • getInputFields

      public InputField[] getInputFields()
      Get all input fields
      Returns:
      list of all defined input fields
    • getId

      public long getId()
      Get tool ID
      Returns:
      tool ID
    • getName

      public String getName()
      Returns:
      the name
    • getToolType

      public int getToolType()
      Description copied from interface: ObjectAction
      Get tool type
      Specified by:
      getToolType in interface ObjectAction
      Returns:
      the type
    • getFlags

      public int getFlags()
      Returns:
      the flags
    • getRemotePort

      public int getRemotePort()
      Returns:
      the remotePort
    • isVisibleInCommands

      public boolean isVisibleInCommands()
      Check if this tool should be visible in commands
      Returns:
      true if this tool should be visible in commands
    • isEnabled

      public boolean isEnabled()
      Check if tool is enabled
      Returns:
      true if enabled
    • getDescription

      public String getDescription()
      Returns:
      the description
    • getSnmpOid

      public String getSnmpOid()
      Returns:
      the snmpOid
    • getData

      public String getData()
      Returns:
      the data
    • getConfirmationText

      public String getConfirmationText()
      Returns:
      the confirmationText
    • getDisplayName

      public String getDisplayName()
      Returns:
      the displayName
    • getCommandName

      public String getCommandName()
      Get command name
      Returns:
      command name
    • getCommandDisplayName

      public String getCommandDisplayName()
      Get command display name
      Returns:
      command display name
    • getCommandShortName

      public String getCommandShortName()
      Get command short name
      Returns:
      command short name
    • getCommandShortDisplayName

      public String getCommandShortDisplayName()
      Get command short display name
      Returns:
      command short display name
    • getImageData

      public byte[] getImageData()
      Returns:
      the imageData
    • getToolNodeOS

      public String getToolNodeOS()
      Returns:
      the toolRemOS
    • getToolWorkstationOS

      public String getToolWorkstationOS()
      Returns:
      the toolLocOS
    • getToolTemplate

      public String getToolTemplate()
      Returns:
      the toolTemplate
    • getMenuFilter

      public ObjectMenuFilter getMenuFilter()
      Description copied from interface: ObjectAction
      Get menu filter associated with the tool
      Specified by:
      getMenuFilter in interface ObjectAction
      Returns:
      menu filter associated with the tool
      See Also:
    • setMenuFilter

      public void setMenuFilter(ObjectMenuFilter filter)
      Description copied from interface: ObjectAction
      Sets menu filter for the tool
      Specified by:
      setMenuFilter in interface ObjectAction
      Parameters:
      filter - new menu filter
      See Also:
    • isRunInContainerContext

      public boolean isRunInContainerContext()
      Returns the RUN_CONTAINER_CONTEXT flag status
      Returns:
      if object tool capable of running on container
    • isContainerObject

      public static boolean isContainerObject(AbstractObject object)
      Check if given object is container.
      Parameters:
      object - object to test
      Returns:
      true if given object is a container