use of org.netxms.client.mt.MappingTable in project netxms by netxms.
the class MappingTableEditor method refresh.
/**
* Refresh content
*/
private void refresh() {
new ConsoleJob(Messages.get().MappingTableEditor_LoadJobName, this, Activator.PLUGIN_ID, null) {
@Override
protected void runInternal(IProgressMonitor monitor) throws Exception {
final MappingTable t = session.getMappingTable(mappingTableId);
runInUIThread(new Runnable() {
@Override
public void run() {
mappingTable = t;
setPartName(String.format(Messages.get().MappingTableEditor_PartName, mappingTable.getName()));
viewer.setInput(mappingTable.getData().toArray());
actionNewRow.setEnabled(true);
setModified(false);
}
});
}
@Override
protected String getErrorMessage() {
return Messages.get().MappingTableEditor_LoadJobError;
}
}.start();
}
use of org.netxms.client.mt.MappingTable in project netxms by netxms.
the class NXCSession method createMappingTable.
/**
* Create new mapping table.
*
* @param name name of new table
* @param description description for new table
* @param flags flags for new table
* @return ID of new table object
* @throws IOException if socket I/O error occurs
* @throws NXCException if NetXMS server returns an error or operation was timed out
*/
public int createMappingTable(String name, String description, int flags) throws IOException, NXCException {
MappingTable mt = new MappingTable(name, description);
mt.setFlags(flags);
return updateMappingTable(mt);
}
use of org.netxms.client.mt.MappingTable in project netxms by netxms.
the class NXCSession method getMappingTable.
/**
* Get list of specific mapping table
*
* @param id The ID of mapping table
* @return The MappingTable
* @throws IOException if socket I/O error occurs
* @throws NXCException if NetXMS server returns an error or operation was timed out
*/
public MappingTable getMappingTable(int id) throws IOException, NXCException {
final NXCPMessage msg = newMessage(NXCPCodes.CMD_GET_MAPPING_TABLE);
msg.setFieldInt32(NXCPCodes.VID_MAPPING_TABLE_ID, id);
sendMessage(msg);
return new MappingTable(waitForRCC(msg.getMessageId()));
}
Aggregations