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 SummaryFieldsModifier and TypeFieldDescriptionstatic final intprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringstatic final intprotected Stringprotected ObjectMenuFilterprotected intstatic final intprotected longprotected byte[]protected Map<String,InputField> protected Stringprotected intstatic final intstatic final intstatic final intstatic final intstatic final intprotected intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDefault implicit constructor.ObjectTool(NXCPMessage msg, long baseId) Create object tool from NXCP message.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidCreate display nameGet command display nameGet command nameGet command short display nameGet command short namegetData()intgetFlags()longgetId()Get tool IDbyte[]getInputField(String name) Get input field definition by nameGet all input fieldsGet menu filter associated with the toolgetName()intintGet tool typebooleanisApplicableForObject(AbstractObject object) Check if tool is applicable for given object.static booleanisContainerObject(AbstractObject object) Check if given object is container.booleanCheck if tool is enabledbooleanReturns the RUN_CONTAINER_CONTEXT flag statusbooleanCheck if this tool should be visible in commandsvoidsetMenuFilter(ObjectMenuFilter filter) Sets menu filter for the toolprotected voidCheck if all input fields referenced in tool have definitions
- 
Field Details- 
TYPE_INTERNALpublic static final int TYPE_INTERNAL- See Also:
 
- 
TYPE_ACTIONpublic static final int TYPE_ACTION- See Also:
 
- 
TYPE_SNMP_TABLEpublic static final int TYPE_SNMP_TABLE- See Also:
 
- 
TYPE_AGENT_LISTpublic static final int TYPE_AGENT_LIST- See Also:
 
- 
TYPE_URLpublic static final int TYPE_URL- See Also:
 
- 
TYPE_LOCAL_COMMANDpublic static final int TYPE_LOCAL_COMMAND- See Also:
 
- 
TYPE_SERVER_COMMANDpublic static final int TYPE_SERVER_COMMAND- See Also:
 
- 
TYPE_FILE_DOWNLOADpublic static final int TYPE_FILE_DOWNLOAD- See Also:
 
- 
TYPE_SERVER_SCRIPTpublic static final int TYPE_SERVER_SCRIPT- See Also:
 
- 
TYPE_AGENT_TABLEpublic static final int TYPE_AGENT_TABLE- See Also:
 
- 
TYPE_SSH_COMMANDpublic static final int TYPE_SSH_COMMAND- See Also:
 
- 
ASK_CONFIRMATIONpublic static final int ASK_CONFIRMATION- See Also:
 
- 
GENERATES_OUTPUTpublic static final int GENERATES_OUTPUT- See Also:
 
- 
DISABLEDpublic static final int DISABLED- See Also:
 
- 
SHOW_IN_COMMANDSpublic static final int SHOW_IN_COMMANDS- See Also:
 
- 
SNMP_INDEXED_BY_VALUEpublic static final int SNMP_INDEXED_BY_VALUE- See Also:
 
- 
RUN_IN_CONTAINER_CONTEXTpublic static final int RUN_IN_CONTAINER_CONTEXT- See Also:
 
- 
SUPPRESS_SUCCESS_MESSAGEpublic static final int SUPPRESS_SUCCESS_MESSAGE- See Also:
 
- 
SETUP_TCP_TUNNELpublic static final int SETUP_TCP_TUNNEL- See Also:
 
- 
idprotected long id
- 
name
- 
displayName
- 
typeprotected int type
- 
flagsprotected int flags
- 
description
- 
data
- 
confirmationText
- 
commandName
- 
commandShortName
- 
filter
- 
imageDataprotected byte[] imageData
- 
remotePortprotected int remotePort
- 
inputFields
 
- 
- 
Constructor Details- 
ObjectToolprotected ObjectTool()Default implicit constructor.
- 
ObjectToolCreate object tool from NXCP message. Intended to be called only by NXCSession methods.- Parameters:
- msg- NXCP message
- baseId- Base variable ID
 
 
- 
- 
Method Details- 
validateInputFieldsprotected void validateInputFields()Check if all input fields referenced in tool have definitions
- 
createDisplayNameprotected void createDisplayName()Create display name
- 
isApplicableForObjectCheck if tool is applicable for given object.- Specified by:
- isApplicableForObjectin interface- ObjectAction
- Parameters:
- object- AbstractObject object
- Returns:
- true if tool is applicable for given object
 
- 
getInputFieldGet input field definition by name- Parameters:
- name- input field name
- Returns:
- input field or null if not found
 
- 
getInputFieldsGet all input fields- Returns:
- list of all defined input fields
 
- 
getIdpublic long getId()Get tool ID- Returns:
- tool ID
 
- 
getName- Returns:
- the name
 
- 
getToolTypepublic int getToolType()Description copied from interface:ObjectActionGet tool type- Specified by:
- getToolTypein interface- ObjectAction
- Returns:
- the type
 
- 
getFlagspublic int getFlags()- Returns:
- the flags
 
- 
getRemotePortpublic int getRemotePort()- Returns:
- the remotePort
 
- 
isVisibleInCommandspublic boolean isVisibleInCommands()Check if this tool should be visible in commands- Returns:
- true if this tool should be visible in commands
 
- 
isEnabledpublic 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
 
- 
getCommandNameGet command name- Returns:
- command name
 
- 
getCommandDisplayNameGet command display name- Returns:
- command display name
 
- 
getCommandShortNameGet command short name- Returns:
- command short name
 
- 
getCommandShortDisplayNameGet command short display name- Returns:
- command short display name
 
- 
getImageDatapublic byte[] getImageData()- Returns:
- the imageData
 
- 
getToolNodeOS- Returns:
- the toolRemOS
 
- 
getToolWorkstationOS- Returns:
- the toolLocOS
 
- 
getToolTemplate- Returns:
- the toolTemplate
 
- 
getMenuFilterDescription copied from interface:ObjectActionGet menu filter associated with the tool- Specified by:
- getMenuFilterin interface- ObjectAction
- Returns:
- menu filter associated with the tool
- See Also:
 
- 
setMenuFilterDescription copied from interface:ObjectActionSets menu filter for the tool- Specified by:
- setMenuFilterin interface- ObjectAction
- Parameters:
- filter- new menu filter
- See Also:
 
- 
isRunInContainerContextpublic boolean isRunInContainerContext()Returns the RUN_CONTAINER_CONTEXT flag status- Returns:
- if object tool capable of running on container
 
- 
isContainerObjectCheck if given object is container.- Parameters:
- object- object to test
- Returns:
- true if given object is a container
 
 
-