Package org.netxms.client.objecttools
Class ObjectToolDetails
java.lang.Object
org.netxms.client.objecttools.ObjectTool
org.netxms.client.objecttools.ObjectToolDetails
- All Implemented Interfaces:
ObjectAction
Detailed information about object tool
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringTranslatable field tags.Fields inherited from class org.netxms.client.objecttools.ObjectTool
APPLICABLE_ACCESS_POINT, APPLICABLE_ALL_VALID, APPLICABLE_INTERFACE, APPLICABLE_NODE, APPLICABLE_SENSOR, applicableClasses, ASK_CONFIRMATION, commandName, commandShortName, confirmationText, data, description, DISABLED, displayName, filter, flags, GENERATES_OUTPUT, icon, id, inputFields, name, remoteHost, remotePort, RUN_IN_CONTAINER_CONTEXT, SETUP_TCP_TUNNEL, SHOW_IN_COMMANDS, SNMP_INDEXED_BY_VALUE, SUPPRESS_SUCCESS_MESSAGE, TCP_TUNNEL_TO_REMOTE_HOST, type, TYPE_ACTION, TYPE_AGENT_LIST, TYPE_AGENT_TABLE, TYPE_FILE_DOWNLOAD, TYPE_INTERNAL, TYPE_LOCAL_COMMAND, TYPE_SERVER_COMMAND, TYPE_SERVER_SCRIPT, TYPE_SNMP_TABLE, TYPE_SSH_COMMAND, TYPE_URL -
Constructor Summary
ConstructorsConstructorDescriptionObjectToolDetails(long toolId, int type, String name) Create new tool objectCreate object tool from NXCP message containing detailed tool information. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd or replace input field definition.voidfillMessage(NXCPMessage msg) Fill NXCP message with tool's data.Get the translations map (language code -> field tag -> localized value).booleanvoidsetAccessList(List<Integer> accessList) voidsetApplicableClasses(int applicableClasses) Set applicable object classes bitmask.voidsetColumns(List<ObjectToolTableColumn> columns) voidsetCommandName(String commandName) Set command name (to be displayed in command list).voidsetCommandShortName(String commandShortName) Set short command name (to be displayed in command list when UI requires short name, usually on toolbars and buttons).voidsetConfirmationText(String confirmationText) voidvoidsetDescription(String description) voidUpdate menu filter informationvoidsetFilterFlags(int flags) Update menu filter flagsvoidsetFlags(int flags) voidSet icon as image library reference.voidsetId(long id) Set tool ID.voidsetInputFields(Collection<InputField> fields) Set input field definitionsvoidSet tool name.voidsetRemoteHost(String remoteHost) Set remote host name for TCP tunnel.voidsetRemotePort(int remotePort) Set remote TCP port number for TCP tunnel.voidReplace the translations map.voidsetType(int type) Methods inherited from class org.netxms.client.objecttools.ObjectTool
createDisplayName, getApplicableClasses, getCommandDisplayName, getCommandName, getCommandShortDisplayName, getCommandShortName, getConfirmationText, getData, getDescription, getDisplayName, getFlags, getIcon, getId, getInputField, getInputFields, getMenuFilter, getName, getRemoteHost, getRemotePort, getSnmpOid, getToolNodeOS, getToolTemplate, getToolType, getToolWorkstationOS, isApplicableForObject, isApplicableToObjectClass, isContainerObject, isEnabled, isRunInContainerContext, isVisibleInCommands, objectClassToToolMask, setMenuFilter, validateInputFields
-
Field Details
-
TRANSLATION_FIELD_NAME
Translatable field tags. Mirror the LOCSTR_TAG_* constants on the server.- See Also:
-
TRANSLATION_FIELD_DESCRIPTION
- See Also:
-
TRANSLATION_FIELD_CONFIRMATION_TEXT
- See Also:
-
TRANSLATION_FIELD_COMMAND_NAME
- See Also:
-
TRANSLATION_FIELD_COMMAND_SHORT_NAME
- See Also:
-
-
Constructor Details
-
ObjectToolDetails
Create new tool object- Parameters:
toolId- tool idtype- tool typename- tool name
-
ObjectToolDetails
Create object tool from NXCP message containing detailed tool information. Intended to be called only by NXCSession methods.- Parameters:
msg- NXCP message
-
-
Method Details
-
fillMessage
Fill NXCP message with tool's data.- Parameters:
msg- NXCP message
-
getAccessList
- Returns:
- the accessList
-
getColumns
- Returns:
- the columns
-
addInputField
Add or replace input field definition.- Parameters:
f- new input field
-
setInputFields
Set input field definitions- Parameters:
fields- new set of input fields
-
setId
public void setId(long id) Set tool ID.- Parameters:
id- new tool ID
-
setName
Set tool name.- Parameters:
name- new name
-
setType
public void setType(int type) - Parameters:
type- the type to set
-
setFlags
public void setFlags(int flags) - Parameters:
flags- the flags to set
-
setDescription
- Parameters:
description- the description to set
-
setData
- Parameters:
data- the data to set
-
setConfirmationText
- Parameters:
confirmationText- the confirmationText to set
-
setRemotePort
public void setRemotePort(int remotePort) Set remote TCP port number for TCP tunnel.- Parameters:
remotePort- remote TCP port number
-
setRemoteHost
Set remote host name for TCP tunnel.- Parameters:
remoteHost- remote host name
-
isModified
public boolean isModified()- Returns:
- the modified
-
setAccessList
- Parameters:
accessList- the accessList to set
-
setColumns
- Parameters:
columns- the columns to set
-
setCommandName
Set command name (to be displayed in command list).- Parameters:
commandName- new command name for this tool
-
setCommandShortName
Set short command name (to be displayed in command list when UI requires short name, usually on toolbars and buttons).- Parameters:
commandShortName- new short command name for this tool
-
setIcon
Set icon as image library reference.- Parameters:
icon- image library UUID, or null to clear
-
setFilter
Update menu filter information- Parameters:
filterText- menu filter textfilterType- menu filter type
-
setFilterFlags
public void setFilterFlags(int flags) Update menu filter flags- Parameters:
flags- new value for menu filter flag- See Also:
-
setApplicableClasses
public void setApplicableClasses(int applicableClasses) Set applicable object classes bitmask.- Parameters:
applicableClasses- combination of APPLICABLE_* bits
-
getTranslations
Get the translations map (language code -> field tag -> localized value). Field tags match the TRANSLATION_FIELD_* constants. Returned map is mutable.- Returns:
- translations map
-
setTranslations
Replace the translations map.- Parameters:
translations- new translations (language -> field tag -> value)
-