Package org.netxms.client.objecttools
Class ObjectTool
java.lang.Object
org.netxms.client.objecttools.ObjectTool
- All Implemented Interfaces:
ObjectAction
- Direct Known Subclasses:
ObjectToolDetails
NetXMS object tool representation
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
protected String
protected String
protected String
protected String
protected String
static final int
protected String
protected ObjectMenuFilter
protected int
static final int
protected long
protected byte[]
protected Map<String,
InputField> protected String
protected int
static final int
static final int
static final int
static final int
static final int
protected int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
ModifierConstructorDescriptionprotected
Default implicit constructor.ObjectTool
(NXCPMessage msg, long baseId) Create object tool from NXCP message. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Create display nameGet command display nameGet command nameGet command short display nameGet command short namegetData()
int
getFlags()
long
getId()
Get tool IDbyte[]
getInputField
(String name) Get input field definition by nameGet all input fieldsGet menu filter associated with the toolgetName()
int
int
Get tool typeboolean
isApplicableForObject
(AbstractObject object) Check if tool is applicable for given object.static boolean
isContainerObject
(AbstractObject object) Check if given object is container.boolean
Check if tool is enabledboolean
Returns the RUN_CONTAINER_CONTEXT flag statusboolean
Check if this tool should be visible in commandsvoid
setMenuFilter
(ObjectMenuFilter filter) Sets menu filter for the toolprotected void
Check if all input fields referenced in tool have definitions
-
Field Details
-
TYPE_INTERNAL
public static final int TYPE_INTERNAL- See Also:
-
TYPE_ACTION
public static final int TYPE_ACTION- See Also:
-
TYPE_SNMP_TABLE
public static final int TYPE_SNMP_TABLE- See Also:
-
TYPE_AGENT_LIST
public static final int TYPE_AGENT_LIST- See Also:
-
TYPE_URL
public static final int TYPE_URL- See Also:
-
TYPE_LOCAL_COMMAND
public static final int TYPE_LOCAL_COMMAND- See Also:
-
TYPE_SERVER_COMMAND
public static final int TYPE_SERVER_COMMAND- See Also:
-
TYPE_FILE_DOWNLOAD
public static final int TYPE_FILE_DOWNLOAD- See Also:
-
TYPE_SERVER_SCRIPT
public static final int TYPE_SERVER_SCRIPT- See Also:
-
TYPE_AGENT_TABLE
public static final int TYPE_AGENT_TABLE- See Also:
-
TYPE_SSH_COMMAND
public static final int TYPE_SSH_COMMAND- See Also:
-
ASK_CONFIRMATION
public static final int ASK_CONFIRMATION- See Also:
-
GENERATES_OUTPUT
public static final int GENERATES_OUTPUT- See Also:
-
DISABLED
public static final int DISABLED- See Also:
-
SHOW_IN_COMMANDS
public static final int SHOW_IN_COMMANDS- See Also:
-
SNMP_INDEXED_BY_VALUE
public static final int SNMP_INDEXED_BY_VALUE- See Also:
-
RUN_IN_CONTAINER_CONTEXT
public static final int RUN_IN_CONTAINER_CONTEXT- See Also:
-
SUPPRESS_SUCCESS_MESSAGE
public static final int SUPPRESS_SUCCESS_MESSAGE- See Also:
-
SETUP_TCP_TUNNEL
public static final int SETUP_TCP_TUNNEL- See Also:
-
id
protected long id -
name
-
displayName
-
type
protected int type -
flags
protected int flags -
description
-
data
-
confirmationText
-
commandName
-
commandShortName
-
filter
-
imageData
protected byte[] imageData -
remotePort
protected int remotePort -
inputFields
-
-
Constructor Details
-
ObjectTool
protected ObjectTool()Default implicit constructor. -
ObjectTool
Create object tool from NXCP message. Intended to be called only by NXCSession methods.- Parameters:
msg
- NXCP messagebaseId
- 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
Check if tool is applicable for given object.- Specified by:
isApplicableForObject
in interfaceObjectAction
- Parameters:
object
- AbstractObject object- Returns:
- true if tool is applicable for given object
-
getInputField
Get input field definition by name- Parameters:
name
- input field name- Returns:
- input field or null if not found
-
getInputFields
Get all input fields- Returns:
- list of all defined input fields
-
getId
public long getId()Get tool ID- Returns:
- tool ID
-
getName
- Returns:
- the name
-
getToolType
public int getToolType()Description copied from interface:ObjectAction
Get tool type- Specified by:
getToolType
in interfaceObjectAction
- 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
- Returns:
- the description
-
getSnmpOid
- Returns:
- the snmpOid
-
getData
- Returns:
- the data
-
getConfirmationText
- Returns:
- the confirmationText
-
getDisplayName
- Returns:
- the displayName
-
getCommandName
Get command name- Returns:
- command name
-
getCommandDisplayName
Get command display name- Returns:
- command display name
-
getCommandShortName
Get command short name- Returns:
- command short name
-
getCommandShortDisplayName
Get command short display name- Returns:
- command short display name
-
getImageData
public byte[] getImageData()- Returns:
- the imageData
-
getToolNodeOS
- Returns:
- the toolRemOS
-
getToolWorkstationOS
- Returns:
- the toolLocOS
-
getToolTemplate
- Returns:
- the toolTemplate
-
getMenuFilter
Description copied from interface:ObjectAction
Get menu filter associated with the tool- Specified by:
getMenuFilter
in interfaceObjectAction
- Returns:
- menu filter associated with the tool
- See Also:
-
setMenuFilter
Description copied from interface:ObjectAction
Sets menu filter for the tool- Specified by:
setMenuFilter
in interfaceObjectAction
- 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
Check if given object is container.- Parameters:
object
- object to test- Returns:
- true if given object is a container
-