use of org.netxms.client.agent.config.ConfigContent in project netxms by netxms.
the class NXCSession method getConfigContent.
/**
* Saves existing config
*
* @param id config id
* @return content of requested by id configurations file
* @throws IOException if socket I/O error occurs
* @throws NXCException if NetXMS server returns an error or operation was timed out
*/
public ConfigContent getConfigContent(long id) throws NXCException, IOException {
final NXCPMessage msg = newMessage(NXCPCodes.CMD_OPEN_AGENT_CONFIG);
msg.setFieldInt32(NXCPCodes.VID_CONFIG_ID, (int) id);
sendMessage(msg);
NXCPMessage response = waitForRCC(msg.getMessageId());
ConfigContent content = new ConfigContent(id, response);
return content;
}
use of org.netxms.client.agent.config.ConfigContent in project netxms by netxms.
the class ServerStoredAgentConfigEditorView method createNewConfig.
/**
* Creates new config that is sent to server on save
*/
private void createNewConfig() {
modified = true;
firePropertyChange(PROP_DIRTY);
actionSave.setEnabled(true);
ConfigListElement newElement = new ConfigListElement();
elements.add(newElement);
configList.setInput(elements.toArray(new ConfigListElement[elements.size()]));
reselection = true;
StructuredSelection selection = new StructuredSelection(newElement);
previousSelection = selection;
configList.setSelection(selection);
content = new ConfigContent();
updateContent();
}
Aggregations