com.adventnet.snmp.ui
Class DefaultMibBrowserModel

java.lang.Object
  extended by com.adventnet.snmp.ui.DefaultMibBrowserModel
All Implemented Interfaces:
MibBrowserModel

 class DefaultMibBrowserModel
extends java.lang.Object
implements MibBrowserModel

This class is the default implementation for the MibBrowserModel interface. It has all the Snmp related method. The Api methods of the MibBrowser bean will use these methods


Field Summary
(package private)  MibBrowser browser
           
(package private)  MibBrowserUI browserUi
           
(package private)  MibModule currModule
           
(package private)  java.lang.String description
           
(package private)  boolean errorShown
           
(package private)  boolean hideJdbc
           
(package private)  boolean inited
           
(package private)  com.adventnet.snmp.ui.LoadDialog load
           
(package private)  boolean loadJdbc
           
(package private)  MibOperations mibOps
           
(package private)  NodeSystemTreeModel model
           
(package private)  boolean moduleCheck
           
(package private)  java.util.Enumeration moduleEnum
           
(package private)  MibNode remNode
           
(package private)  java.lang.StringBuffer sb
           
(package private)  java.lang.String searchString
           
(package private)  MbSettingsFrame settingsFrame
           
(package private)  SnmpTasks snmptasks
           
(package private)  java.util.StringTokenizer spaceToken
           
(package private)  java.util.StringTokenizer st
           
(package private)  MibModule tempModule
           
(package private)  java.util.Vector tempModVector
           
(package private)  int trapport
           
(package private)  MibTree tree
           
(package private)  java.lang.String[] values
           
 
Constructor Summary
DefaultMibBrowserModel(SnmpTasks snmptasks, MibBrowserUI browserUi)
           
 
Method Summary
 java.util.Vector addPathInfo(javax.swing.tree.TreePath[] tp)
           
 void addSnmpPropertyListener(SnmpPropertyListener l)
          add SnmpPropertyListener object into listener vector
 void cleanUp()
          Destroys this components resources.
 int create_v3_tables()
           
 void deleteMib(MibTree tree)
           
 void deleteMibs(MibTree tree)
           
 boolean findNext(java.lang.String nodeName, boolean findAll, boolean matchCase, boolean matchWord)
           
 java.lang.String getAccess(NodeData selected)
           
 java.lang.String getAgentPort()
          Deprecated. Replaced by getTargetPort().
 java.lang.String getAuthPassword()
          Get AuthPassword
 int getAuthProtocol()
          Get AuthProtocol
 java.lang.String getCommunity()
          Get community in MIB Browser.
 java.lang.String getContextID()
          Get the SNMP V3 contextID
 java.lang.String getContextName()
          Get the SNMP V3 Context name
 java.lang.String getDescription(NodeData selected)
           
 MbDisplayPanel getDisplay()
           
 java.lang.String getHostname()
          Deprecated. Replaced by getTargetHost().
 java.util.Vector getIndexNames(NodeData selected)
           
 MibBrowser getMibBrowser()
           
 java.lang.String getMibModules()
          Return a list of loaded MIB Modules
 MibNode getMibNode(java.lang.String nodeLabel, boolean matchCase, boolean matchWord)
           
 MibOperations getMibOperations()
          returns MibOperations instance
 MibTree getMibTree()
          Get the MibTree instance used in the MIB browser
 java.lang.String getMultipleObjectID()
          Get Object ID in MIB Browser.
 java.util.Vector getMultipleOids()
           
 java.lang.String getNumberedOIDString(NodeData selected)
           
 java.lang.String getNumericObjectID()
          Get the numeric OID of selected Mib Node.
 java.lang.String getObjectID()
          Get Object ID in MIB Browser.
 java.lang.String getOIDString(NodeData selected)
           
 boolean getOverwriteCMI()
          Gets the overwrite compiled mibs boolean.
(package private)  java.util.Vector getPathInfo()
           
 java.lang.String getPrincipal()
          Get Principal
 java.lang.String getPrivPassword()
          Get PrivPassword
 java.lang.String getReference(NodeData selected)
           
 java.lang.String getRetries()
          Get Retries
 java.lang.String getSecurityLevel()
          Get SecurityLevel
 MibModule getSelectedModule()
          Returns the Selected MIB Module
 java.lang.String getSerializedMibFileName()
          Gets the name of the Serialized Mib file
 MbSettingsFrame getSettingsFrame()
          Returns the MibBrowser Settings Frame.
 java.lang.String getSetValue()
          Get Set Value in MIB Browser.
 java.lang.String[] getSetValues()
           
 SnmpEngineTable getSnmpEngineTable()
          Get the reference to SnmpEngineTable.
 SnmpTasks getSnmpTasks()
          returns SnmpTasks of MibBrowser
 int getSnmpVersion()
          Get the SNMP target SNMP Version.
 java.lang.String getStatus(NodeData selected)
           
 java.lang.String getSyntax(NodeData selected)
           
 java.lang.String getTargetHost()
          Get hostname in MIB Browser.
 java.util.Vector getTargetHostNames()
          Get hostname in MIB Browser.
 int getTargetPort()
          Get Port
 java.lang.String getTimeout()
          Get Timeout
 int getTrapPort()
          Get Trap Port
 USMUserTable getUSMTable()
          Get the reference to the USMUserTable.
 int getVersion()
          Deprecated. replaced by getSnmpVersion()
(package private)  java.lang.String getVersionString()
           
 java.lang.String getWriteCommunity()
          Get write community in MIB Browser.
(package private)  void hideJdbc(boolean hide)
           
 void initJdbcParams(java.lang.String driverName, java.lang.String URL, java.lang.String userName, java.lang.String passWord)
          If you need to use database support, this method should be invoked to initialize the Jdbc Parameters.
 void initSecurityProvider()
           
 boolean isLoadFromCompiledMibs()
          Gets the loadFromCompiledMibs boolean
 boolean isLoadFromSerializedMibs()
          Gets the loadFromSerializedMibs boolean
 boolean isLoadMibsFromDatabase()
          Gets the loadFromDatabase boolean
 boolean isOverwriteMibsInDatabase()
          Gets the overwrite mibs in Database boolean.
 boolean isReadDesc()
          Returns true if reading descriptions from compiled modules is enabled
 boolean isSerialize()
          Returns the status of serialization of USMUserTable and SnmpEngineTable
 boolean isSerializeMibs()
          Gets the serializeMibs boolean
 boolean isSupportedSecurityModel(int m)
           
 boolean isV3DatabaseFlag()
          To check whether v3 database flag is set or not.
 void loadMib(java.lang.String mib)
          Add another MIB file after startup
(package private)  void logErrorMessage(java.lang.String error)
           
(package private)  void logInfoMessage(java.lang.String info)
           
 void manage_v3_tables()
           
 MibNode partialFind(java.lang.String nodeLabel, MibModule currModule, boolean matchCase, boolean matchWord)
           
 boolean readFile()
           
 void removeSnmpPropertyListener(SnmpPropertyListener l)
          remove SnmpPropertyListener object from listener vector
 void setAgentPort(java.lang.String port)
          Deprecated. Replaced by setTargetPort(int).
 void setAuthPassword(java.lang.String password)
          Set AuthPassword
 void setAuthProtocol(int protocol)
          Set AuthProtocol
 void setCommunity(java.lang.String s)
          Set community in MIB Browser.
 void setContextID(java.lang.String ctxtID)
          Set the SNMP V3 contextID
 void setContextName(java.lang.String cName)
          Set the SNMP V3 Context name
 void setDebug(boolean debug)
          Set whether to print debug information
 void setEngineID(byte[] eID)
           
 void setHostname(java.lang.String s)
          Deprecated. Replaced by setTargetHost(String).
 void setLoadFromCompiledMibs(boolean flag)
          Defines whether to load mib from compiled MIBs.
 void setLoadFromSerializedMibs(boolean flag)
          Method defines whether to load MIB from serialized file.
 void setLoadMibsFromDatabase(boolean flag)
          Defines whether to load mib from DataBase.
 void setMibBrowser(MibBrowser browser)
           
 void setMibModules(java.lang.String mibs)
          Add MIB files at startup time
 void setMibTree(MibTree tree)
           
 void setMibTreeExpandable(boolean flag)
          Set whether to expand the MibTree based on the result oid node.
 void setMultipleObjectID(java.lang.String s)
          Set Object ID in MIB Browser.
 void setObjectID(java.lang.String s)
          Set Object ID in MIB Browser.
 void setOverwriteCMI(boolean overWrite)
          Defines whether to overwrite the existing compiled MIB files.
 void setOverwriteMibsInDatabase(boolean overWrite)
          Defines whether to overwrite the MIB in the DataBase.
 void setPrincipal(java.lang.String userName)
          Set Principal
 void setPrivPassword(java.lang.String password)
          Set PrivPassword
 void setReadDesc(boolean readFlag)
          Sets the flag to read descriptions from compiled mib modules.
 void setRetries(java.lang.String retries)
          Set Retries
 void setSecurityLevel(byte sLevel)
          Set SecurityLevel
 void setSerializedMibFileName(java.lang.String serFileName)
          Method defines the name of the Serialized MIB File.
 void setSerializeMibs(boolean flag)
          Method defines whether to serialize the MibModule.
 void setSettingsFrame(MbSettingsFrame settingFrame)
          set the Settings Frame.
 void setSetValue(java.lang.String s)
          Set Set Value in MIB Browser.
 void setSnmpVersion(int i)
          Set the SNMP target SNMP Version.
 void setTargetHost(java.lang.String s)
          Set hostname in MIB Browser.
 void setTargetHostNames(java.util.Vector hosts)
          Set host names in MIB Browser.
 void setTargetPort(int port)
          Set the remote Port
 void setTimeout(java.lang.String timeout)
          Set Timeout
 void setTrapPort(int port)
          Set Trap Port
 void setV3DatabaseFlag(boolean v3Flag)
          If you need to use database support for V3 , set this flag to true.
 void setVersion(int i)
          Deprecated. replaced by setSnmpVersion(int)
(package private)  void setVersionString(java.lang.String version)
           
 void setWriteCommunity(java.lang.String s)
          Set write community in MIB Browser.
 void unloadMib(java.lang.String mib)
          Unload the mib
(package private)  void updateUI(java.lang.String mibs)
           
 void v3Settings()
           
 void valueChangedPassed(NodeData selected)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

snmptasks

SnmpTasks snmptasks

browserUi

MibBrowserUI browserUi

mibOps

MibOperations mibOps

settingsFrame

MbSettingsFrame settingsFrame

browser

MibBrowser browser

tree

MibTree tree

load

com.adventnet.snmp.ui.LoadDialog load

inited

boolean inited

hideJdbc

boolean hideJdbc

loadJdbc

boolean loadJdbc

values

java.lang.String[] values

errorShown

boolean errorShown

trapport

int trapport

currModule

MibModule currModule

tempModule

MibModule tempModule

tempModVector

java.util.Vector tempModVector

searchString

java.lang.String searchString

moduleEnum

java.util.Enumeration moduleEnum

moduleCheck

boolean moduleCheck

model

NodeSystemTreeModel model

remNode

MibNode remNode

description

java.lang.String description

st

java.util.StringTokenizer st

spaceToken

java.util.StringTokenizer spaceToken

sb

java.lang.StringBuffer sb
Constructor Detail

DefaultMibBrowserModel

public DefaultMibBrowserModel(SnmpTasks snmptasks,
                              MibBrowserUI browserUi)
Method Detail

getSettingsFrame

public MbSettingsFrame getSettingsFrame()
Returns the MibBrowser Settings Frame.

Specified by:
getSettingsFrame in interface MibBrowserModel

setSettingsFrame

public void setSettingsFrame(MbSettingsFrame settingFrame)
set the Settings Frame.

Specified by:
setSettingsFrame in interface MibBrowserModel

getSnmpTasks

public SnmpTasks getSnmpTasks()
returns SnmpTasks of MibBrowser

Specified by:
getSnmpTasks in interface MibBrowserModel

getSnmpEngineTable

public SnmpEngineTable getSnmpEngineTable()
Get the reference to SnmpEngineTable.

Specified by:
getSnmpEngineTable in interface MibBrowserModel
Returns:
the reference to SnmpEngineTable.

getUSMTable

public USMUserTable getUSMTable()
Get the reference to the USMUserTable.

Specified by:
getUSMTable in interface MibBrowserModel
Returns:
the reference to the USMUserTable.

isSerialize

public boolean isSerialize()
Returns the status of serialization of USMUserTable and SnmpEngineTable

Specified by:
isSerialize in interface MibBrowserModel

addSnmpPropertyListener

public void addSnmpPropertyListener(SnmpPropertyListener l)
add SnmpPropertyListener object into listener vector

Specified by:
addSnmpPropertyListener in interface MibBrowserModel

removeSnmpPropertyListener

public void removeSnmpPropertyListener(SnmpPropertyListener l)
remove SnmpPropertyListener object from listener vector

Specified by:
removeSnmpPropertyListener in interface MibBrowserModel

setMibModules

public void setMibModules(java.lang.String mibs)
Add MIB files at startup time

Specified by:
setMibModules in interface MibBrowserModel

updateUI

void updateUI(java.lang.String mibs)

getMibModules

public java.lang.String getMibModules()
Return a list of loaded MIB Modules

Specified by:
getMibModules in interface MibBrowserModel

getSelectedModule

public MibModule getSelectedModule()
Returns the Selected MIB Module

Specified by:
getSelectedModule in interface MibBrowserModel

loadMib

public void loadMib(java.lang.String mib)
Add another MIB file after startup

Specified by:
loadMib in interface MibBrowserModel

unloadMib

public void unloadMib(java.lang.String mib)
Unload the mib

Specified by:
unloadMib in interface MibBrowserModel

getMibTree

public MibTree getMibTree()
Get the MibTree instance used in the MIB browser

Specified by:
getMibTree in interface MibBrowserModel

setMibTreeExpandable

public void setMibTreeExpandable(boolean flag)
Set whether to expand the MibTree based on the result oid node. Default it is expandable. Set false to not to expand the MibTree for the result oid node.

Specified by:
setMibTreeExpandable in interface MibBrowserModel

setDebug

public void setDebug(boolean debug)
Set whether to print debug information

Specified by:
setDebug in interface MibBrowserModel

setRetries

public void setRetries(java.lang.String retries)
                throws java.lang.NumberFormatException
Set Retries

Specified by:
setRetries in interface MibBrowserModel
Throws:
java.lang.NumberFormatException - is thrown on error

getRetries

public java.lang.String getRetries()
                            throws java.lang.NumberFormatException
Get Retries

Specified by:
getRetries in interface MibBrowserModel
Throws:
java.lang.NumberFormatException - is thrown on error

setTimeout

public void setTimeout(java.lang.String timeout)
                throws java.lang.NumberFormatException
Set Timeout

Specified by:
setTimeout in interface MibBrowserModel
Throws:
java.lang.NumberFormatException - is thrown on error

getTimeout

public java.lang.String getTimeout()
Get Timeout

Specified by:
getTimeout in interface MibBrowserModel

getContextName

public java.lang.String getContextName()
Get the SNMP V3 Context name

Specified by:
getContextName in interface MibBrowserModel

setContextName

public void setContextName(java.lang.String cName)
Set the SNMP V3 Context name

Specified by:
setContextName in interface MibBrowserModel

setEngineID

public void setEngineID(byte[] eID)
Specified by:
setEngineID in interface MibBrowserModel

getContextID

public java.lang.String getContextID()
Get the SNMP V3 contextID

Specified by:
getContextID in interface MibBrowserModel

setContextID

public void setContextID(java.lang.String ctxtID)
Set the SNMP V3 contextID

Specified by:
setContextID in interface MibBrowserModel

setPrincipal

public void setPrincipal(java.lang.String userName)
Set Principal

Specified by:
setPrincipal in interface MibBrowserModel

getPrincipal

public java.lang.String getPrincipal()
Get Principal

Specified by:
getPrincipal in interface MibBrowserModel

setAuthPassword

public void setAuthPassword(java.lang.String password)
Set AuthPassword

Specified by:
setAuthPassword in interface MibBrowserModel

getAuthPassword

public java.lang.String getAuthPassword()
Get AuthPassword

Specified by:
getAuthPassword in interface MibBrowserModel

setPrivPassword

public void setPrivPassword(java.lang.String password)
Set PrivPassword

Specified by:
setPrivPassword in interface MibBrowserModel

getPrivPassword

public java.lang.String getPrivPassword()
Get PrivPassword

Specified by:
getPrivPassword in interface MibBrowserModel

setAuthProtocol

public void setAuthProtocol(int protocol)
Set AuthProtocol

Specified by:
setAuthProtocol in interface MibBrowserModel

getAuthProtocol

public int getAuthProtocol()
Get AuthProtocol

Specified by:
getAuthProtocol in interface MibBrowserModel

getSecurityLevel

public java.lang.String getSecurityLevel()
Get SecurityLevel

Specified by:
getSecurityLevel in interface MibBrowserModel

setSecurityLevel

public void setSecurityLevel(byte sLevel)
Set SecurityLevel

Specified by:
setSecurityLevel in interface MibBrowserModel

create_v3_tables

public int create_v3_tables()
Specified by:
create_v3_tables in interface MibBrowserModel

manage_v3_tables

public void manage_v3_tables()
Specified by:
manage_v3_tables in interface MibBrowserModel

initSecurityProvider

public void initSecurityProvider()
                          throws SnmpException
Throws:
SnmpException

isSupportedSecurityModel

public boolean isSupportedSecurityModel(int m)

setTargetPort

public void setTargetPort(int port)
Set the remote Port

Specified by:
setTargetPort in interface MibBrowserModel

setAgentPort

public void setAgentPort(java.lang.String port)
                  throws java.lang.NumberFormatException
Deprecated. Replaced by setTargetPort(int).

Set Port

Specified by:
setAgentPort in interface MibBrowserModel
Throws:
java.lang.NumberFormatException - is thrown on error

getTargetPort

public int getTargetPort()
Get Port

Specified by:
getTargetPort in interface MibBrowserModel

getAgentPort

public java.lang.String getAgentPort()
Deprecated. Replaced by getTargetPort().

Get Port

Specified by:
getAgentPort in interface MibBrowserModel

getTrapPort

public int getTrapPort()
Get Trap Port

Specified by:
getTrapPort in interface MibBrowserModel

setTrapPort

public void setTrapPort(int port)
Set Trap Port

Specified by:
setTrapPort in interface MibBrowserModel

getSnmpVersion

public int getSnmpVersion()
Get the SNMP target SNMP Version. 0 is Version 1 (default), 1 is Version V2C and 3 is Version V3.

Specified by:
getSnmpVersion in interface MibBrowserModel
Returns:
integer as SNMP Version.

getVersion

public int getVersion()
Deprecated. replaced by getSnmpVersion()

Specified by:
getVersion in interface MibBrowserModel
See Also:
getSnmpVersion()

setSnmpVersion

public void setSnmpVersion(int i)
Set the SNMP target SNMP Version. 0 is Version 1 (default), 1 is Version V2C and 3 is Version V3.

Specified by:
setSnmpVersion in interface MibBrowserModel
Parameters:
integer - to set SNMP version.

setVersion

public void setVersion(int i)
Deprecated. replaced by setSnmpVersion(int)

Specified by:
setVersion in interface MibBrowserModel
See Also:
setSnmpVersion(int)

setTargetHost

public void setTargetHost(java.lang.String s)
Set hostname in MIB Browser.

Specified by:
setTargetHost in interface MibBrowserModel

setHostname

public void setHostname(java.lang.String s)
Deprecated. Replaced by setTargetHost(String).

Set hostname in MIB Browser.

Specified by:
setHostname in interface MibBrowserModel

getTargetHost

public java.lang.String getTargetHost()
Get hostname in MIB Browser.

Specified by:
getTargetHost in interface MibBrowserModel

getHostname

public java.lang.String getHostname()
Deprecated. Replaced by getTargetHost().

Get hostname in MIB Browser.

Specified by:
getHostname in interface MibBrowserModel

setTargetHostNames

public void setTargetHostNames(java.util.Vector hosts)
Set host names in MIB Browser.

Specified by:
setTargetHostNames in interface MibBrowserModel

getTargetHostNames

public java.util.Vector getTargetHostNames()
Get hostname in MIB Browser.

Specified by:
getTargetHostNames in interface MibBrowserModel

setCommunity

public void setCommunity(java.lang.String s)
Set community in MIB Browser.

Specified by:
setCommunity in interface MibBrowserModel

getCommunity

public java.lang.String getCommunity()
Get community in MIB Browser.

Specified by:
getCommunity in interface MibBrowserModel

setWriteCommunity

public void setWriteCommunity(java.lang.String s)
Set write community in MIB Browser.

Specified by:
setWriteCommunity in interface MibBrowserModel

getWriteCommunity

public java.lang.String getWriteCommunity()
Get write community in MIB Browser.

Specified by:
getWriteCommunity in interface MibBrowserModel

setObjectID

public void setObjectID(java.lang.String s)
Set Object ID in MIB Browser.

Specified by:
setObjectID in interface MibBrowserModel

getObjectID

public java.lang.String getObjectID()
Get Object ID in MIB Browser.

Specified by:
getObjectID in interface MibBrowserModel

setMultipleObjectID

public void setMultipleObjectID(java.lang.String s)
Set Object ID in MIB Browser.

Specified by:
setMultipleObjectID in interface MibBrowserModel

getMultipleObjectID

public java.lang.String getMultipleObjectID()
Get Object ID in MIB Browser.

Specified by:
getMultipleObjectID in interface MibBrowserModel

getSetValues

public java.lang.String[] getSetValues()
Specified by:
getSetValues in interface MibBrowserModel

getMultipleOids

public java.util.Vector getMultipleOids()
Specified by:
getMultipleOids in interface MibBrowserModel

setSetValue

public void setSetValue(java.lang.String s)
Set Set Value in MIB Browser.

Specified by:
setSetValue in interface MibBrowserModel

getSetValue

public java.lang.String getSetValue()
Get Set Value in MIB Browser.

Specified by:
getSetValue in interface MibBrowserModel

getNumericObjectID

public java.lang.String getNumericObjectID()
Get the numeric OID of selected Mib Node. Add a .0 if scalar

Specified by:
getNumericObjectID in interface MibBrowserModel

cleanUp

public void cleanUp()
Destroys this components resources. Should be called only from applet destroy() routines

Specified by:
cleanUp in interface MibBrowserModel

readFile

public boolean readFile()
Specified by:
readFile in interface MibBrowserModel

setSerializeMibs

public void setSerializeMibs(boolean flag)
Method defines whether to serialize the MibModule. This flag should be set before loading the MIBs. If this is set to true it will serialize the loaded MIBs. For ex: if RMON2-MIB is loaded, it will serialize this module along with the Imported Modules viz ., RFC1271-MIB,RFC1213-MIB,TOKEN-RING-RMON and saves it in a single file.The name of the serialized file can be set using the setSerializedMibFileName() method. In case,if serialized file name is not set,it will save the serialized file with the MIB file name along with ".ser" extention.Here, it will save it as RMON2-MIB.ser. Serialization is not supported in applets.

Specified by:
setSerializeMibs in interface MibBrowserModel

isSerializeMibs

public boolean isSerializeMibs()
Gets the serializeMibs boolean

Specified by:
isSerializeMibs in interface MibBrowserModel

setLoadFromSerializedMibs

public void setLoadFromSerializedMibs(boolean flag)
Method defines whether to load MIB from serialized file. This flag should be set before loading the MIBs. If both serializeMibs and loadFromSerializedMibs is set to true, it will just try to load the MIB as a serialized file.

Specified by:
setLoadFromSerializedMibs in interface MibBrowserModel

setLoadFromCompiledMibs

public void setLoadFromCompiledMibs(boolean flag)
Defines whether to load mib from compiled MIBs. This flag should be set before loading the MIBs (By default it is set to false). If this flag is set to true, it will load from compiled file( i.e; .cmi and .cds files). For ex: RMON2-MIB is loaded, it will automatically load RMON2-MIB.cmi if it exists. otherwise it creates compiled files by parsing and then loads from it. If this flag is set to false, the mib is loaded without creating .cmi and .cds files. This is recommended in case of applets where you have security restrictions for file creation. This is slightly slower than loading from precompiled mibs. In Applets, precompiled mibs can be loaded but it cannot create/write compiled files.

If both loadFromSerializedMibs and loadFromCompiledMibs is set to true, it will just try to load the MIB as a serialized file.

Specified by:
setLoadFromCompiledMibs in interface MibBrowserModel

setOverwriteCMI

public void setOverwriteCMI(boolean overWrite)
Defines whether to overwrite the existing compiled MIB files. NOTE: This applies only when the setLoadFromCompiledMibs is set to true.

Specified by:
setOverwriteCMI in interface MibBrowserModel

getOverwriteCMI

public boolean getOverwriteCMI()
Gets the overwrite compiled mibs boolean. NOTE: This applies only when the setLoadFromCompiledMibs is set to true.

Specified by:
getOverwriteCMI in interface MibBrowserModel

initJdbcParams

public void initJdbcParams(java.lang.String driverName,
                           java.lang.String URL,
                           java.lang.String userName,
                           java.lang.String passWord)
                    throws java.lang.ClassNotFoundException,
                           java.sql.SQLException
If you need to use database support, this method should be invoked to initialize the Jdbc Parameters.

Specified by:
initJdbcParams in interface MibBrowserModel
Parameters:
driverName - Name of the DataBase driver.
URL - URL pointing to the DataBase file name
userName - userName
passWord - password
Throws:
java.lang.ClassNotFoundException
java.sql.SQLException

setLoadMibsFromDatabase

public void setLoadMibsFromDatabase(boolean flag)
Defines whether to load mib from DataBase. The Jdbc Parameters should be set, using the initJdbcParams(), before calling this method. This flag should be set before loading the MIBs (By default it is set to false). If this flag is set to true, it will parse the mibs,and store it in the database. For ex: RMON2-MIB is loaded, it will parse the mib and store it in the database.

Specified by:
setLoadMibsFromDatabase in interface MibBrowserModel
Parameters:
flag - boolean
See Also:
initJdbcParams(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

setOverwriteMibsInDatabase

public void setOverwriteMibsInDatabase(boolean overWrite)
Defines whether to overwrite the MIB in the DataBase. NOTE: This applies only when the setLoadFromDataBase is set to true.

Specified by:
setOverwriteMibsInDatabase in interface MibBrowserModel

isOverwriteMibsInDatabase

public boolean isOverwriteMibsInDatabase()
Gets the overwrite mibs in Database boolean.

Specified by:
isOverwriteMibsInDatabase in interface MibBrowserModel

isLoadMibsFromDatabase

public boolean isLoadMibsFromDatabase()
Gets the loadFromDatabase boolean

Specified by:
isLoadMibsFromDatabase in interface MibBrowserModel

isV3DatabaseFlag

public boolean isV3DatabaseFlag()
To check whether v3 database flag is set or not.

Specified by:
isV3DatabaseFlag in interface MibBrowserModel
Returns:
boolean v3 database flag.

setV3DatabaseFlag

public void setV3DatabaseFlag(boolean v3Flag)
If you need to use database support for V3 , set this flag to true.

Specified by:
setV3DatabaseFlag in interface MibBrowserModel
Parameters:
v3Flag - flag to be set.

setReadDesc

public void setReadDesc(boolean readFlag)
Sets the flag to read descriptions from compiled mib modules. Default is true. Set it to false if you don't need the descriptions. NOTE: This applies only when the setLoadFromCompiledMibs is set to true.

Specified by:
setReadDesc in interface MibBrowserModel

isReadDesc

public boolean isReadDesc()
Returns true if reading descriptions from compiled modules is enabled

Specified by:
isReadDesc in interface MibBrowserModel

isLoadFromSerializedMibs

public boolean isLoadFromSerializedMibs()
Gets the loadFromSerializedMibs boolean

Specified by:
isLoadFromSerializedMibs in interface MibBrowserModel

isLoadFromCompiledMibs

public boolean isLoadFromCompiledMibs()
Gets the loadFromCompiledMibs boolean

Specified by:
isLoadFromCompiledMibs in interface MibBrowserModel

setSerializedMibFileName

public void setSerializedMibFileName(java.lang.String serFileName)
Method defines the name of the Serialized MIB File. The Serialized file will be saved with this filename in the directory from which the mib is loaded.

Specified by:
setSerializedMibFileName in interface MibBrowserModel

getSerializedMibFileName

public java.lang.String getSerializedMibFileName()
Gets the name of the Serialized Mib file

Specified by:
getSerializedMibFileName in interface MibBrowserModel

hideJdbc

void hideJdbc(boolean hide)

v3Settings

public void v3Settings()
Specified by:
v3Settings in interface MibBrowserModel

findNext

public boolean findNext(java.lang.String nodeName,
                        boolean findAll,
                        boolean matchCase,
                        boolean matchWord)
Specified by:
findNext in interface MibBrowserModel

getMibNode

public MibNode getMibNode(java.lang.String nodeLabel,
                          boolean matchCase,
                          boolean matchWord)
Specified by:
getMibNode in interface MibBrowserModel

partialFind

public MibNode partialFind(java.lang.String nodeLabel,
                           MibModule currModule,
                           boolean matchCase,
                           boolean matchWord)
Specified by:
partialFind in interface MibBrowserModel

getNumberedOIDString

public java.lang.String getNumberedOIDString(NodeData selected)
Specified by:
getNumberedOIDString in interface MibBrowserModel

getOIDString

public java.lang.String getOIDString(NodeData selected)
Specified by:
getOIDString in interface MibBrowserModel

getSyntax

public java.lang.String getSyntax(NodeData selected)
Specified by:
getSyntax in interface MibBrowserModel

getAccess

public java.lang.String getAccess(NodeData selected)
Specified by:
getAccess in interface MibBrowserModel

getStatus

public java.lang.String getStatus(NodeData selected)
Specified by:
getStatus in interface MibBrowserModel

getReference

public java.lang.String getReference(NodeData selected)
Specified by:
getReference in interface MibBrowserModel

getIndexNames

public java.util.Vector getIndexNames(NodeData selected)
Specified by:
getIndexNames in interface MibBrowserModel

getDescription

public java.lang.String getDescription(NodeData selected)
Specified by:
getDescription in interface MibBrowserModel

valueChangedPassed

public void valueChangedPassed(NodeData selected)
Specified by:
valueChangedPassed in interface MibBrowserModel

deleteMibs

public void deleteMibs(MibTree tree)
                throws java.lang.Exception
Specified by:
deleteMibs in interface MibBrowserModel
Throws:
java.lang.Exception

deleteMib

public void deleteMib(MibTree tree)
               throws java.lang.Exception
Specified by:
deleteMib in interface MibBrowserModel
Throws:
java.lang.Exception

getMibOperations

public MibOperations getMibOperations()
returns MibOperations instance

Specified by:
getMibOperations in interface MibBrowserModel

addPathInfo

public java.util.Vector addPathInfo(javax.swing.tree.TreePath[] tp)
Specified by:
addPathInfo in interface MibBrowserModel

setMibBrowser

public void setMibBrowser(MibBrowser browser)
Specified by:
setMibBrowser in interface MibBrowserModel

getMibBrowser

public MibBrowser getMibBrowser()
Specified by:
getMibBrowser in interface MibBrowserModel

setMibTree

public void setMibTree(MibTree tree)
Specified by:
setMibTree in interface MibBrowserModel

getDisplay

public MbDisplayPanel getDisplay()
Specified by:
getDisplay in interface MibBrowserModel

getPathInfo

java.util.Vector getPathInfo()

getVersionString

java.lang.String getVersionString()

setVersionString

void setVersionString(java.lang.String version)

logErrorMessage

void logErrorMessage(java.lang.String error)

logInfoMessage

void logInfoMessage(java.lang.String info)