AdventNet Web NMS 4 DMS API Specification

com.adventnet.nms.rta.fw.client
Class DefaultSingleObjectModel
java.lang.Object
  |
  +--com.adventnet.nms.rta.fw.client.AbstractRTADataModel
        |
        +--com.adventnet.nms.rta.fw.client.DefaultSingleObjectModel

public abstract class DefaultSingleObjectModel
extends AbstractRTADataModel

This class has to be extended to provide the RTA UI impl for the conf-file, which contains only one entry(node) in it(for ex: seed.file).


Field Summary
protected  java.lang.Object uo
           
 
Constructor Summary
DefaultSingleObjectModel()
           
 
Method Summary
 boolean add(RTAData uo)
          This will add a RTAData object of the configuration file into the uoList(ArrayList) of Data Model.
abstract  java.util.Hashtable constructXML()
          This method will be called when the changes are applied to the server.
 boolean delete(java.lang.String key)
          This will delete the RTA Data from the Data Model
 void display()
          This is for internal use
abstract  java.util.Properties getConfProperties()
          This will return a Properties, which contains the details like \"moduleName\", which is the key in the ConfUpdnListeners.xml file for the ConfUpdnListener implementation and the configuration file name, etc.
abstract  java.lang.Object getDefaultUserObject()
          This method will be called when a leaf node is added to probe.
 java.util.ArrayList getKeyList()
          This will return the list of keys in the Data Model, i.e the list of tree nodes(node names) in the data model
 java.lang.Object getUserObject(java.lang.String key)
          This will return the RTAData object for the given key
 boolean isKeyExists(java.lang.String key)
          This returns true if the given key exists in RTA Data Model.
abstract  boolean loadData(java.util.Hashtable xmlHash)
          This method will be called when a probe node in the ProbePanel component is selected.
 boolean modify(java.lang.String oldKey, java.lang.String newKey)
          This will modify the name of the tree node(RTAData's key) in the Data Model
 boolean updateUserObject(java.lang.Object uo)
          This will update the RTAData in the Data Model
 void validate()
          This is for internal use
 
Methods inherited from class com.adventnet.nms.rta.fw.client.AbstractRTADataModel
getProbeName, isModified, isMultiObjectModel, setModified, setProbeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uo

protected java.lang.Object uo
Constructor Detail

DefaultSingleObjectModel

public DefaultSingleObjectModel()
Method Detail

loadData

public abstract boolean loadData(java.util.Hashtable xmlHash)
This method will be called when a probe node in the ProbePanel component is selected. The Hashtable \"xmlHash\" contains the list of configuration files with the keys as the values returned from the \"getRequiredXMLFileNames()\" method in the ProbePanelListener(UI component for the configuration file) and the values as the content of the configuration file(in the form of XMLNode). Here the content has to be extracted to form the RTAData impl object for that conf file and set it to \"uo\" of \"DefaultSingleObjectModel\" class.
Overrides:
loadData in class AbstractRTADataModel
Parameters:
xmlHash - Configuration file content. key will be the name of the configuration file and the value will be the configuration file content in the form XMLNode object.
Returns:
true, if the hashtable content is loaded successfully.

constructXML

public abstract java.util.Hashtable constructXML()
This method will be called when the changes are applied to the server. At this time RTAData object will have to be taken from the \"uo\" of the \"DefaultSingleObjectModel\" class and the content of the configuration file has to be formed (in the form of XMLNode). Put all formed files into a Hashtable with appropriate keys(name of the configuration file).
Overrides:
constructXML in class AbstractRTADataModel
Returns:
Hashtable, which contains the key as the name of the configuration file and the value will be the content of the configuration file in XMLNode format

getConfProperties

public abstract java.util.Properties getConfProperties()
This will return a Properties, which contains the details like \"moduleName\", which is the key in the ConfUpdnListeners.xml file for the ConfUpdnListener implementation and the configuration file name, etc. If any specific parameters are added, those can also be added into this Properties object. These properties will be given to the ConfUpdnListener implemetation, which is mentioned in the ConfUpdnListener.xml file.
Overrides:
getConfProperties in class AbstractRTADataModel
Returns:
Properties, which contains the necessary attributes and its values.

getDefaultUserObject

public abstract java.lang.Object getDefaultUserObject()
This method will be called when a leaf node is added to probe. This should return a RTAData implementation object for that conf file, which should contain the default values for that configuration file.
Overrides:
getDefaultUserObject in class AbstractRTADataModel
Returns:
Object, the default RTAData value for the RTA UI impl.

getUserObject

public final java.lang.Object getUserObject(java.lang.String key)
This will return the RTAData object for the given key
Overrides:
getUserObject in class AbstractRTADataModel
Parameters:
key - name of the tree node
Returns:
Object RTAData for the given key

validate

public final void validate()
This is for internal use
Overrides:
validate in class AbstractRTADataModel

isKeyExists

public final boolean isKeyExists(java.lang.String key)
This returns true if the given key exists in RTA Data Model. i.e, if any node exists with this key
Overrides:
isKeyExists in class AbstractRTADataModel
Parameters:
key - name of the tree node
Returns:
true, if the given key exists in RTA Data Model.

getKeyList

public final java.util.ArrayList getKeyList()
This will return the list of keys in the Data Model, i.e the list of tree nodes(node names) in the data model
Overrides:
getKeyList in class AbstractRTADataModel
Returns:
List of keys in the Data Model.

add

public final boolean add(RTAData uo)
This will add a RTAData object of the configuration file into the uoList(ArrayList) of Data Model.
Overrides:
add in class AbstractRTADataModel
Parameters:
uo - RTAData (Module data) to be added in the DataModel's Data list.
Returns:
true, if the RTAData is added in the DataModel's Data list.

modify

public final boolean modify(java.lang.String oldKey,
                            java.lang.String newKey)
This will modify the name of the tree node(RTAData's key) in the Data Model
Overrides:
modify in class AbstractRTADataModel
Parameters:
oldKey - old key of the RTA Data
newKey - new key of the RTA Data
Returns:
true, if the RTAData's key is modified in the DataModel's Data list.

delete

public final boolean delete(java.lang.String key)
This will delete the RTA Data from the Data Model
Overrides:
delete in class AbstractRTADataModel
Parameters:
key - name of tree node in the ProbePanel( RTA Data's key)
Returns:
true, if the RTAData is deleted from the Data Model

updateUserObject

public final boolean updateUserObject(java.lang.Object uo)
This will update the RTAData in the Data Model
Overrides:
updateUserObject in class AbstractRTADataModel
Parameters:
uo - RTA Data to be updated
Returns:
true, if the RTAData is updated in the Data Model

display

public void display()
This is for internal use
Overrides:
display in class AbstractRTADataModel

AdventNet Web NMS 4 DMS API Specification