|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.adventnet.html.dynamic.DataProvider
This class helps to generate run time or dynamic html pages for the instrumented MBeans. This class having certain methods like createDynamicIndexFile(), createHtmlPage(), etc, the user should invoke these methods from the servlet.
Even most of the html pages created in the run time, this class allows certain levels of customization like author, header, title, description, footer message, logo, background colour, etc. All these attributes have default values, if you don't want those settings the user can set his own values.
com.adventnet.ssiparser.HtmlParser| Field Summary | |
static int |
DO_OPER
If Get Operation is performed on the Attribute |
boolean |
isNextButtonNeeded
|
boolean |
isPrevButtonNeeded
|
static int |
POST_ERROR
|
| Constructor Summary | |
DataProvider(ServerOperations serverOp)
Default constructor to initialize the object parameters. |
|
| Method Summary | |
void |
addDynamicView(java.util.Hashtable hash)
|
void |
addStaticView(java.util.Hashtable hash)
|
boolean |
checkDateAndTime(java.lang.String objName,
java.lang.String attrbName)
|
boolean |
checkForMBeanType(java.lang.String objName,
java.lang.String className,
java.lang.String mbeanType)
|
byte[] |
cloneByteArray(byte[] arr)
|
boolean |
containsElement(java.lang.String[] names,
java.lang.String element)
|
(package private) java.lang.String |
convertArrayToString(java.lang.String attrbType,
java.lang.Object attrbValue)
Converts an array to String with ";" appended between two strings. |
java.lang.String |
convertByteArrayToString(java.lang.Object attrbValue)
|
java.lang.String |
convertDelimString(java.lang.String str)
|
void |
convertHashTabletoVector(java.util.Hashtable table,
java.util.Vector vect)
|
java.lang.Byte[] |
convertStringToByteArray(java.lang.String paramValue)
|
java.lang.Object |
convertTypesToObject(java.lang.String objName,
java.lang.String attrb,
java.lang.String attrbType,
java.lang.String paramValue,
boolean isTable)
|
(package private) void |
createAttrbNameAccessTypeVector(java.lang.Object mbean,
java.util.Vector variable,
java.util.Vector access,
java.util.Vector type)
Create vectors for attribute names, their access and their basic data types from the xml file. |
CompositeData[] |
createCompositeDataForModifyOrDelete(java.util.Hashtable table,
java.lang.String objName,
java.util.Vector[] indexVec,
boolean modifyFlag)
Used to create a Composite Data.This method is used for both modifications and deletions. |
void |
createNewRowInfo(java.lang.String name,
java.lang.String searchAttrbName,
java.lang.String rowstatus,
java.util.Vector variable,
java.util.Vector access,
java.util.Vector type,
java.util.Vector indexVect)
This function is used generated a run time html page which will get the necessary information for a table row and submit to the server. |
TabularData |
createTabularDataForModifyOrDelete(java.util.Hashtable table,
java.lang.String objName,
boolean modifyFlag)
Used to create a Tabular Data.This method is used for both modifications and deletions. |
void |
deleteViews(java.util.Hashtable getAllParameters,
java.lang.String userName)
|
void |
fillHeaderForTables(java.util.Vector headerVect)
This method populates the header Vector with the header names. |
java.util.Vector |
filterSearch(java.util.Hashtable table)
This method is used to search a list of MBeans matching a certain Search criteria. |
static java.lang.String |
findReplace(java.lang.String str,
java.lang.String find,
java.lang.String replace)
This method replaces all occurences of the String find in String str with String replace. |
java.util.Hashtable |
getAdaptorMbeansTable(java.lang.String name)
This method gets all the Adaptors registered with the MBeanServer and puts it in a hash table. |
java.util.Hashtable |
getAllDomainMbeansTable(java.lang.String name)
This method gets all the registered MBeans and puts it in a hash table. |
java.util.Hashtable |
getAppMBeans()
|
java.util.Hashtable |
getAppMBeans(java.lang.String filter)
|
java.util.Hashtable |
getAppMBeans(java.lang.String filter,
java.lang.String queryExp,
java.lang.String attribName,
java.lang.String attribValue,
java.lang.String attribType)
|
java.util.Hashtable |
getAttrbArrayInfo(java.lang.String name,
java.lang.String searchAttrbName)
|
void |
getAttrbArrayInfo(java.lang.String name,
java.lang.String domainName,
java.lang.String searchAttrbName,
java.util.Hashtable valTable,
java.util.Vector accessVect,
java.util.Vector typeVect)
This method is used to generate information about a particular attribute of an MBean which is an array type.The Hashtable valTable will conists of the values that are present in the array as of now.The Vector accessVect will have the type of the attribute.The type of the attribute is in typeVect. |
java.util.Vector |
getAttributes()
|
java.util.Hashtable |
getAttributesForView(java.lang.String userName,
java.lang.String viewName)
|
java.lang.String |
getClassName(ObjectName objName)
Getter for the MBean name. |
java.util.Hashtable |
getDomainMbeansTable(java.lang.String domainName)
This method gets all the registered MBeans of a particilar domain and puts it in a hash table. |
java.util.Hashtable |
getDomainReference(java.lang.String name)
This method gets the domain reference |
java.util.Set |
getDomains(java.lang.String filter)
|
int |
getEndIndex()
|
java.lang.String |
getErrorString()
|
boolean |
getImplementsModelListener(ObjectName objectName)
Checks whether the MBean implements the Table Model Listener. |
java.lang.Object |
getMBean(java.lang.String objName)
Getter for the MBean. |
java.lang.String |
getMbeanName(ObjectName objName)
Getter for the MBean name. |
java.util.Hashtable |
getMbeansOfObjectName(java.lang.String domainName)
|
java.lang.String |
getMessage()
|
java.util.Hashtable |
getNewRowInfo(java.lang.String name)
|
java.util.Vector |
getNoAuthOperationsInfo(java.lang.String objName)
This method is used to get infomation about the list of operations available for a particular MBean. |
java.util.ArrayList |
getNotifInfo()
Gets the notification list |
java.lang.Object |
getObjectInfo(java.lang.String name,
java.lang.String searchAttrbName)
|
java.util.Vector |
getOperationsInfo(java.lang.String objName)
This method is used to get infomation about the list of operations available for a particular MBean. |
void |
getOperationsInfo(java.lang.String objName,
java.util.Hashtable table,
java.util.Hashtable paramTable)
This method is used to get infomation about the list of operations available for a particular MBean. |
java.lang.String |
getQueryExp(java.lang.String comparatorValue)
|
java.lang.String |
getRenderedValue(java.util.Map properties)
|
MBeanAttributeInfo[] |
getScalarInfo(java.lang.String name,
java.lang.String domainName,
java.util.Hashtable table)
This method gets the ObjectName, MBeanName information and checks if that MBean has any attribute.If it has, then it returns the MBeanAttributeInfo[].The method also constructs a hashtable which consists of complete information about the MBean's attributes.For example, the table consists of attrbiute Name, its type, access, value, etc. |
int |
getStartIndex()
|
void |
getTableInfo(java.util.Hashtable valTable,
java.lang.String name,
java.util.Hashtable table,
java.util.Vector vect,
int flag)
This method is used to collect information about the attributes in the MBean which is a table.The Hashtable consists of the list of variables, its access type, its type and the list of indexes present in the table. |
java.util.Hashtable |
getTableInfo(java.lang.String name)
|
java.util.Hashtable |
getTableInfo(java.lang.String name,
int flag)
|
java.lang.Exception |
getTargetException(java.lang.Exception ex)
|
ValueExp |
getValueExp(java.lang.String attribValue,
java.lang.String attribType)
|
java.util.Vector |
getViewNames(java.lang.String userName)
|
java.util.Hashtable |
getViewNamesAndTypes(java.lang.String userName)
|
boolean |
isDataTypeSupported(java.util.Map props)
|
boolean |
isDynamicMBean(java.lang.String name)
|
boolean |
isModelMBean(java.lang.String name)
|
boolean |
isRegisteredView(java.lang.String viewName,
java.lang.String userName)
|
boolean |
isTable(java.lang.String name)
This method gets a MBean as input and checks whether it is a Scalar or a Table.If the MBean contains an attribute which is of type TabularData then the MBean is considered a Table otherwise it is considered as a Scalar. |
boolean |
isURL(java.util.Map properties)
|
static boolean |
isUserDefinedDataType(java.lang.String type)
|
boolean |
registerMBean(java.lang.String domain,
java.lang.String keys,
java.lang.String className,
java.lang.String loader,
java.lang.String xmlFile)
It is used to instantiate and register an MBean from the browser. |
void |
resultsFound(java.lang.StringBuffer strBuf,
java.lang.String name,
boolean searchForScalar,
boolean searchForTable,
java.util.Vector resultVec)
This method builds the vector resultVec for all the MBeans that matches the search criteria. |
int |
setArrayValues(java.util.Hashtable table)
This methods is used to set new values to the MBean's attributes. |
void |
setEndIndex(int eIndex)
|
void |
setErrorString(java.lang.String msg)
|
void |
setHtmlPageProp(HtmlPageProp htmlPageProp)
|
void |
setMessage(java.lang.String str)
|
java.lang.Object |
setOperationParameters(java.util.Hashtable table)
|
java.lang.Object |
setOperationParameters(java.lang.String name,
java.util.Hashtable table,
java.util.Vector signatureVec)
It will invoke the operation from the given MBean. |
int |
setScalarValues(java.util.Hashtable table)
This methods is used to set new values to the MBean's attributes. |
void |
setStartIndex(int sIndex)
|
int |
setTableValues(java.util.Hashtable table,
java.lang.String objName,
boolean implementsModelListener,
boolean addRowFlag,
boolean deleteRowFlag)
This methods is used to set new values to the MBean's attributes. |
java.lang.Object[] |
stackTrace(java.lang.String str)
|
java.lang.Object[] |
stackTrace(java.lang.Throwable e)
* Converts an exception to a String depicting the stacktrace. |
boolean |
unregisterMBean(java.lang.String domain,
java.lang.String keys)
It is used to unregister an MBean from the MBeanServer. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static int POST_ERROR
public static int DO_OPER
public boolean isNextButtonNeeded
public boolean isPrevButtonNeeded
| Constructor Detail |
public DataProvider(ServerOperations serverOp)
| Method Detail |
public java.lang.String getErrorString()
public void setErrorString(java.lang.String msg)
public void setStartIndex(int sIndex)
public void setEndIndex(int eIndex)
public int getStartIndex()
public int getEndIndex()
public void setHtmlPageProp(HtmlPageProp htmlPageProp)
public java.util.Hashtable getDomainMbeansTable(java.lang.String domainName)
domainName - Specifies the name of the domain with
which a particular MBean is registered.public java.util.Hashtable getMbeansOfObjectName(java.lang.String domainName)
public java.util.Hashtable getAppMBeans()
public java.util.Hashtable getAppMBeans(java.lang.String filter,
java.lang.String queryExp,
java.lang.String attribName,
java.lang.String attribValue,
java.lang.String attribType)
throws java.lang.Exception
public java.util.Hashtable getAppMBeans(java.lang.String filter)
public ValueExp getValueExp(java.lang.String attribValue,
java.lang.String attribType)
public java.util.Hashtable getAllDomainMbeansTable(java.lang.String name)
name - Specifies the name of the domain with
which a particular MBean is registered.public java.util.Hashtable getAdaptorMbeansTable(java.lang.String name)
name - Specifies the name of the domain with
which a particular Adaptor is registered.public java.util.Hashtable getDomainReference(java.lang.String name)
name - Specifies the name of the domain with
which a particular MBean is registered.
public boolean isTable(java.lang.String name)
throws java.lang.Exception
name - Specifies the MBean Name in string
public MBeanAttributeInfo[] getScalarInfo(java.lang.String name,
java.lang.String domainName,
java.util.Hashtable table)
throws java.lang.Exception
name - ObjectName in StringdomainName - Domain Name of the object Name.table - the consists of every information about the attributes
of the MBean.public byte[] cloneByteArray(byte[] arr)
public void getAttrbArrayInfo(java.lang.String name,
java.lang.String domainName,
java.lang.String searchAttrbName,
java.util.Hashtable valTable,
java.util.Vector accessVect,
java.util.Vector typeVect)
throws java.lang.Exception
name - ObjectName in StringdomainName - Domain Name of the object Name.searchAttrbName - the attribute name which is the array type.table - will have the list of values present in the array.accessVect - will have the access type (Read Only/Read Write, etc)typeVect - will have the type of the attribute.
public java.util.Hashtable getAttrbArrayInfo(java.lang.String name,
java.lang.String searchAttrbName)
throws java.lang.Exception
public java.util.ArrayList getNotifInfo()
throws java.lang.Exception
public java.lang.String getMbeanName(ObjectName objName)
objName - the ObjectName of the MBean.public java.lang.String getClassName(ObjectName objName)
objName - the ObjectName of the MBean.public java.lang.Object getMBean(java.lang.String objName)
objName - - the string representation of the ObjectName.
void createAttrbNameAccessTypeVector(java.lang.Object mbean,
java.util.Vector variable,
java.util.Vector access,
java.util.Vector type)
throws java.lang.Exception
modelMBean - the registered mbean.variable - vector to store variable (column) name.access - vector to store the access of the variable (column).type - vector to store the type of the variable (coulmn).
java.lang.String convertArrayToString(java.lang.String attrbType,
java.lang.Object attrbValue)
attrbType - data type of the attribute.attrbValue - value of the attributepublic void fillHeaderForTables(java.util.Vector headerVect)
public void getTableInfo(java.util.Hashtable valTable,
java.lang.String name,
java.util.Hashtable table,
java.util.Vector vect,
int flag)
throws java.lang.Exception
valTable - Hashtable consists of the list of rows in the table.name - ObjectName of the MBean.table - hashtable which has the details of each and every attribute
of the MBean.vect - Vector containing the list of indexes in the table.
public java.util.Hashtable getTableInfo(java.lang.String name)
throws java.lang.Exception
public java.util.Hashtable getTableInfo(java.lang.String name,
int flag)
throws java.lang.Exception
public void createNewRowInfo(java.lang.String name,
java.lang.String searchAttrbName,
java.lang.String rowstatus,
java.util.Vector variable,
java.util.Vector access,
java.util.Vector type,
java.util.Vector indexVect)
throws java.lang.Exception
name - the ObjectName of the MBean.searchAttrbName - is not null if the attribute type is
an array type.rowstatus - used only if it is an array Type.variable - Vector representing the list of attributes name
that are present in the MBeanaccess - Vector representing the list of attributes' access Types.type - Vector representing the list of attributes' data type.indexVect - Vector representing the list of indexes present in the MBean.
public java.util.Hashtable getNewRowInfo(java.lang.String name)
throws java.lang.Exception
public int setScalarValues(java.util.Hashtable table)
throws java.lang.Exception
table - Hashtable consists of the data submitted by the client
for setting the values to the MBean's attributes.public int setArrayValues(java.util.Hashtable table)
table - Hashtable consists of the data submitted by the client
for setting the values to the MBean's attributes.
public int setTableValues(java.util.Hashtable table,
java.lang.String objName,
boolean implementsModelListener,
boolean addRowFlag,
boolean deleteRowFlag)
throws java.lang.Exception
table - Hashtable consists of the data submitted by the client
for setting the values to the MBean's attributes.objName - the Object Name of the MBeanboolean - implementsModelListener true if it Implements
Table Model Listener, otherwise false.boolean - addRowFlag true if Add Row is clicked, otherwise falseboolean - deleteRowFlag true if Delete Row is clicked, otherwise false
public TabularData createTabularDataForModifyOrDelete(java.util.Hashtable table,
java.lang.String objName,
boolean modifyFlag)
throws java.lang.Exception
table - consists of values submitted by the client browser.ObjName - the ObjectName of the MBean in String.modifyFlag - is true if "SaveValues" is clicked, otherwise
it is false.
public CompositeData[] createCompositeDataForModifyOrDelete(java.util.Hashtable table,
java.lang.String objName,
java.util.Vector[] indexVec,
boolean modifyFlag)
throws java.lang.Exception
table - consists of values submitted by the client browser.ObjName - the ObjectName of the MBean in String.indexVec - contains the list of Indexes if present, otherwise
is passes as nullmodifyFlag - is true if "SaveValues" is clicked, otherwise
it is false.
public boolean getImplementsModelListener(ObjectName objectName)
throws java.lang.Exception
objectName - ObjectName of the MBean.
public boolean registerMBean(java.lang.String domain,
java.lang.String keys,
java.lang.String className,
java.lang.String loader,
java.lang.String xmlFile)
throws java.lang.Exception
domain - the DomanName of the ObjectName of MBean.keys - the key list of the ObjectName.className - the class name of the MBean.loader - the loader object namexmlFile - the xml file name in the case of model mbean.
public boolean unregisterMBean(java.lang.String domain,
java.lang.String keys)
throws java.lang.Exception
domain - the DomanName of the ObjectName of MBean.keys - the key list of the ObjectName.public java.util.Vector filterSearch(java.util.Hashtable table)
table - Hashtable consits of data submitted
by the client.
public void resultsFound(java.lang.StringBuffer strBuf,
java.lang.String name,
boolean searchForScalar,
boolean searchForTable,
java.util.Vector resultVec)
strBuf - StringBuffername - MBean name.boolean - searchForScalar if true, then this method
searches for only the MBeans which are scalar.boolean - searchForTable if true, then this method
searches for only the MBeans which are table.resultVec - has list of MBeans which match the search
criteria.
public java.util.Vector getNoAuthOperationsInfo(java.lang.String objName)
throws java.lang.Exception
objName - ObjectName of the MBean in String.table - Hashtable which after completion of the
will consists of information like the operation
name, its type, etc.paramTable - consists of list of parameters for every operation
public java.util.Vector getOperationsInfo(java.lang.String objName)
throws java.lang.Exception
objName - ObjectName of the MBean in String.table - Hashtable which after completion of the
will consists of information like the operation
name, its type, etc.paramTable - consists of list of parameters for every operation
public void getOperationsInfo(java.lang.String objName,
java.util.Hashtable table,
java.util.Hashtable paramTable)
throws java.lang.Exception
objName - ObjectName of the MBean in String.table - Hashtable which after completion of the
will consists of information like the operation
name, its type, etc.paramTable - consists of list of parameters for every operation
public java.lang.Object setOperationParameters(java.util.Hashtable table)
throws java.lang.Exception
public java.lang.Object setOperationParameters(java.lang.String name,
java.util.Hashtable table,
java.util.Vector signatureVec)
throws java.lang.Exception
name - - the ObjectName of the MBean.table - the hashtable contains parameters of the operation.public java.lang.String convertDelimString(java.lang.String str)
str - public java.lang.String convertByteArrayToString(java.lang.Object attrbValue)
public boolean checkDateAndTime(java.lang.String objName,
java.lang.String attrbName)
public java.lang.Byte[] convertStringToByteArray(java.lang.String paramValue)
public java.lang.Object convertTypesToObject(java.lang.String objName,
java.lang.String attrb,
java.lang.String attrbType,
java.lang.String paramValue,
boolean isTable)
throws java.lang.Exception
public void convertHashTabletoVector(java.util.Hashtable table,
java.util.Vector vect)
public java.lang.Object getObjectInfo(java.lang.String name,
java.lang.String searchAttrbName)
throws java.lang.Exception
public static boolean isUserDefinedDataType(java.lang.String type)
public boolean containsElement(java.lang.String[] names,
java.lang.String element)
public java.lang.String getRenderedValue(java.util.Map properties)
public boolean isURL(java.util.Map properties)
public java.util.Vector getAttributes()
public boolean isDynamicMBean(java.lang.String name)
public boolean isModelMBean(java.lang.String name)
public boolean isDataTypeSupported(java.util.Map props)
public static java.lang.String findReplace(java.lang.String str,
java.lang.String find,
java.lang.String replace)
str - - original String.find - - String to find.replace - - String to replace.public java.lang.Object[] stackTrace(java.lang.Throwable e)
e - public java.lang.Object[] stackTrace(java.lang.String str)
public java.lang.Exception getTargetException(java.lang.Exception ex)
public void setMessage(java.lang.String str)
public java.lang.String getMessage()
public java.lang.String getQueryExp(java.lang.String comparatorValue)
public boolean checkForMBeanType(java.lang.String objName,
java.lang.String className,
java.lang.String mbeanType)
public java.util.Vector getViewNames(java.lang.String userName)
throws java.lang.Exception
public void addDynamicView(java.util.Hashtable hash)
throws java.lang.Exception
public boolean isRegisteredView(java.lang.String viewName,
java.lang.String userName)
public void deleteViews(java.util.Hashtable getAllParameters,
java.lang.String userName)
throws java.lang.Exception
public java.util.Hashtable getAttributesForView(java.lang.String userName,
java.lang.String viewName)
throws java.lang.Exception
public java.util.Hashtable getViewNamesAndTypes(java.lang.String userName)
public void addStaticView(java.util.Hashtable hash)
throws java.lang.Exception
public java.util.Set getDomains(java.lang.String filter)
throws java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||