|
AdventNet Web NMS 4 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.adventnet.management.config.xml.BaseElement
|
+--com.adventnet.management.config.xml.DataSource
This class provides various resources of getting data for configuration.
DataSource supports data gathering from Inventory, NetworkElement and User.
They are identified by the tags InventoryInput, NEInput and UserInput.
A sample DataSource is given below.
<DataSource name="sampleDataSource" associatedTasks="sampleTask" description="Uploads the configuration from one NetworkElement to another NetworkElement">The input values for this DataSource are
<!-- User specified Network Element that is to be configured -->
<UserInput id="NEName" name="NetworkElement" value="$DataSourceParam$NEName" />
<!-- Port of the NE to be configured, which is taken from the Inventory maintained by the Web NMS -->
<InventoryInput id="NEPort" MOName="$DataSourceParam$NEName" MOField="DataSourceParam$port" default="161" />
<!-- Port of the NE from which the configuration is to be uploaded -->
<InventoryInput id="port" MOName="$DataSourceParam$name" MOField="$DataSourceParam$port" default="161" />
<!-- Uploading Configuration -->
<NEInput id="1">
<ProtocolMap name="snmp"/>
<Device name="$DataSourceParam$name" port="$InventoryInput$port" />
<Attribute label="location" identifier="1.6.0" type="4" default="AdventNet"/>
</NEInput>
</DataSource>
<ConfigTask taskName="sampleTask" version="1.0" isTemplate="true" >On submitting the Task, ConfigServer replaces all the placeholders defined in the Template with the values collected from the DataSource and executes the task for the associated devices.
<ProtocolMap name="snmp" >
<Device name="$DataSourceParam$NEName" port="$InventoryInput$NEPort"/>
</ProtocolMap>
<Attribute identifier="1.6.0" label="location" type="4" value=$NEInput$location"/>
</ConfigTask>
ConfigClientAPI.executeTask(String,Properties),
ConfigClientAPI.executeTask(String,String,Device[],Properties),
ConfigClientAPI.executeTask(String,String,String[],Properties), Serialized Form| Fields inherited from class com.adventnet.management.config.xml.BaseElement |
element, isServer |
| Constructor Summary | |
DataSource(org.w3c.dom.Element element)
Constructs DataSource from the element. |
|
DataSource(java.lang.String dataSourceXML)
Constructs DataSource from dataSourceXML. |
|
| Method Summary | |
java.lang.String[] |
getAssociatedTasks()
Returns an array of task names for which the DataSource can be associated for execution. |
java.lang.Object[] |
getChildElements()
Returns an object array containing NEInput,UserInput and InventoryInput in the same order as defined in the DataSource. |
java.lang.String |
getDataSource()
Returns the DataSource as XML. |
java.lang.String |
getDataSourceName()
Returns the name of the DataSource. |
java.lang.String[] |
getDataSourceParams()
Returns all the DataSource parameters like $DataSourceParam$<id> .. |
java.lang.String |
getDescription()
Returns the description of the DataSource. |
java.lang.String |
getInventoryHandler()
Returns the InventoryHandler class that handles the InventoryInput elements present in the DataSource. |
InventoryInput[] |
getInventoryInputArr()
Returns an array of InventoryInput present in the DataSource. |
NEInput[] |
getNEInputArr()
Returns an array of NEInput present in the DataSource. |
java.lang.String[] |
getParams(java.lang.String type)
Returns a String array of NEInput or InventoryInput or DataSourceParam parameter names depending on the type passed. |
UserInput[] |
getUserInputArr()
Returns as array of UserInput present in the DataSource. |
java.lang.String |
toString()
Returns the DataSource in XML format by transforming the DataSource Element. |
| Methods inherited from class com.adventnet.management.config.xml.BaseElement |
addSubTag, getAttribute, getElement, getProperties, getSubTagsByName, hasAttribute, removeSubTagsByName, setAttribute, setProperties |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DataSource(org.w3c.dom.Element element)
throws InvalidTemplateException
element - represents the XML document from which the DataSource will be constructed.InvalidTemplateException - if the element is invalid.
public DataSource(java.lang.String dataSourceXML)
throws InvalidTemplateException
dataSourceXML - the dataSourceXML as a string.InvalidTemplateException - if the string passed is invalid.| Method Detail |
public java.lang.String getDataSourceName()
public java.lang.String[] getAssociatedTasks()
public java.lang.String getDescription()
public NEInput[] getNEInputArr()
NEInput present in the DataSource.public InventoryInput[] getInventoryInputArr()
InventoryInput present in the DataSource.public UserInput[] getUserInputArr()
UserInput present in the DataSource.public java.lang.Object[] getChildElements()
NEInput,
InventoryInput,
UserInputpublic java.lang.String getDataSource()
public java.lang.String[] getDataSourceParams()
public java.lang.String getInventoryHandler()
InventoryHandlerpublic java.lang.String[] getParams(java.lang.String type)
type - the type of the params needed.public java.lang.String toString()
toString in class BaseElement
|
AdventNet Web NMS 4 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||