AdventNet Web NMS 4 DMS API Specification

com.adventnet.nms.rta.fw.common
Interface RTAData
All Superinterfaces:
java.lang.Cloneable

public interface RTAData
extends java.lang.Cloneable

This interface has to be implemented if the user wants to provide the RTA UI impl for the conf-file, and the user has to provide implementation for the methods in this interface, based on the need. The implementation class will be the RTA UI data, which will be populated in the UI.


Method Summary
 java.lang.Object clone()
          should return the clone of the node's RTAData implementation.
 boolean equals(java.lang.Object obj)
          Should compare the old value of the RTAData impl object for the selected leaf node and the one which is returned after deselecting that leaf node.
 java.lang.String getKey()
          This will be shown in the ProbePanel component as a leaf node.
 void setKey(java.lang.String key)
          The "key" value will be shown in the ProbePanel component as a leaf node.
 void validate()
          Here the implementation has to be provided to validate the UI inputs for this leaf node.
 

Method Detail

getKey

public java.lang.String getKey()
This will be shown in the ProbePanel component as a leaf node. The name of the leaf node should be returned from this method.
Returns:
name of the node in the tree.

setKey

public void setKey(java.lang.String key)
The "key" value will be shown in the ProbePanel component as a leaf node. The name with which the leaf node should be seen has to be passed to this method.
Parameters:
key - name of the node in the tree.

clone

public java.lang.Object clone()
should return the clone of the node's RTAData implementation.
Overrides:
clone in class java.lang.Object
Returns:
cloned RTA Data

equals

public boolean equals(java.lang.Object obj)
Should compare the old value of the RTAData impl object for the selected leaf node and the one which is returned after deselecting that leaf node. This should return "true" if both are equal, i.e if there is no change in the UI for this leaf node, else return "false". Based on this, the RTA framework component will know whether there are any changes that have to be applied to the server.
Overrides:
equals in class java.lang.Object
Parameters:
obj - Modified RTAData
Returns:
true if both are equal, i.e if the user does not change any attribute in the RTA UI, then the "obj" value will be same as the existing value. Hence the return value will be true.

validate

public void validate()
Here the implementation has to be provided to validate the UI inputs for this leaf node. The values can be obtained from the RTAData object for this leaf node. After validating the values, if there (is) any problem with the input values, raise a RTAException as follows. RTAException exception = new RTAException("Title"," EXCEPTION MESSAGE...");//No Internationalization


// Some ui value
String name = this.getKey();
if(name.equals("")) //No Internationalization
{
message = " Name can not be empty. Please enter some value... ";//No Internationalization
exception.addDetails(message);
}
if(exception.hasDetails())
{
throw exception;
}



AdventNet Web NMS 4 DMS API Specification