|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.html.dynamic.DynamicHtml
public class DynamicHtml
This class helps to generate run time or dynamic html pages for the instrumented MBeans. This class has certain methods like generateIndexFile(), generateDomainIndexFile() etc. the user should invoke these methods from the DynamicMain Class. This class is actually used to perform the following tasks: 1) Gets the required data from the DataProvider class. 2) Gives the data to the HtmlCreation class.
com.adventnet.html.dynamic;| Field Summary | |
|---|---|
static int |
CANCEL
If cancel button is invoked from the client |
static int |
DELETE_ROW
|
static int |
DO_GET
If get or refresh button is invoked from the client |
static int |
DO_OPER
If Get Operation is performed on the Attribute |
int |
endIndex
|
static int |
ERR
|
static int |
NEW_ROW
If new row button is invoked from the client |
static int |
NEXT_ROW
|
(package private) boolean |
nextRowFlag
|
static int |
OPER_ERROR
|
java.lang.String |
page
|
static int |
POST_ERROR
If any error in the post |
static int |
PREV_NEXT
|
static int |
PREV_ROW
|
(package private) boolean |
prevRowFlag
|
static int |
REFRESH
If refresh button is invoked from the client |
static int |
REGISTER
|
int |
stIndex
|
static int |
UNREGISTER
|
static long |
viewId
|
| Constructor Summary | |
|---|---|
DynamicHtml(ServerOperations serverOp)
Default constructor to initialize the object parameters. |
|
| Method Summary | |
|---|---|
java.lang.String |
generateAboutUsFile()
This method is used for generating the About us page |
java.lang.String |
generateAdminFile()
This method generates Admin page. |
java.lang.String |
generateAttrbArrayHtmlFile(java.lang.String objName,
java.lang.String searchAttrbName,
boolean addRow,
boolean ischkBox,
java.lang.String viewName)
This method generates the html page for an attribute in a MBean which has some operations associated with it. |
java.lang.String |
generateDeleteView(java.util.Hashtable table)
|
java.lang.String |
generateDomainIndexFile(java.lang.String file)
This method generates the Index pages of the registered domains. |
java.lang.String |
generateHashtableHtmlFile(java.lang.String objName,
java.lang.String searchAttrbName,
java.lang.String viewName)
This method generates the html page for an attribute in a MBean which has some operations associated with it. |
java.lang.String |
generateIndexFile(java.lang.String file,
boolean isauthentication,
boolean isAdminUser,
java.util.Hashtable viewTable)
This method is the method that generates the initial page of the dynamic html generation. |
java.lang.String |
generateLoginPage(boolean chLogin)
Generates the login page |
java.lang.String |
generateNewRowHtmlFile(java.lang.String objName,
java.lang.String viewName)
This method generates the html page for adding a new row in a table. |
java.lang.String |
generateNewView()
Generates the html page for creating a new view for the users.This page is only for the administrator. |
java.lang.String |
generateNotificationFile(int stIndex,
int endIndex)
This method generates the Notifications |
java.lang.String |
generateOperationsHtmlFile(java.lang.String objName,
java.lang.String viewName)
This method generates the html page for Operations associated with an MBean. |
java.lang.String |
generateOperationsPageForValues(javax.management.ObjectName objName,
java.lang.String actionName,
java.lang.Object obj,
java.lang.String[] signature,
java.lang.String viewName)
This function will take the MBean's ObjectName as input and generate the corresponding runtime html page with necessary information. |
java.lang.String |
generateOptionsHtmlFile()
|
java.lang.String |
generatePageProperties()
|
java.lang.String |
generateRegisterFile()
|
java.lang.String |
generateScalarHtmlFile(java.lang.String objName,
java.lang.String viewName)
This method generates the html page for an MBean which is registered as a Scalar.. |
java.lang.String |
generateSearchFile()
This method generates the Search page. |
java.lang.String |
generateSessionExpirePage()
Generates the Session Expire page |
java.lang.String |
generateTableHtmlFile(java.lang.String objName,
java.lang.String viewName)
This method generates the html page for a MBean which is a Table. |
java.lang.String |
generateUnRegisterFile()
|
java.lang.String |
generateUserDefinedTypeHtmlFile(java.lang.String objName,
java.lang.String searchAttrbName,
java.lang.String viewName,
java.lang.String className)
This method generates the html page for an attribute in a MBean which has some operations associated with it. |
java.lang.String |
generateUserInfoFile()
Generates the User Information html page.This page is only for the administrator to view.This page lists the Page Properties and the HtmlAuth MBean registered with the server if authentication is enabled. |
java.lang.String |
generateVectorHtmlFile(java.lang.String objName,
java.lang.String searchAttrbName,
java.lang.String viewName)
This method generates the html page for an attribute in a MBean which has some operations associated with it. |
java.lang.String |
generateViewForViewName(java.lang.String viewName,
java.util.Hashtable table)
|
java.lang.String |
generateViewOptions()
Generates the html page for creating, modifying, deleting views for the users.This page is only for the administrator. |
HtmlPageProp |
getHtmlPageProp()
|
boolean |
isTable(java.lang.String ObjName)
This method checks whether a particular mbean is a table or a scalar. |
void |
processAdminRequest(java.util.Hashtable table)
This method is used to process the Admin request, namely register/unregister an MBean.Depending on the file requested, the correspoing action is taken.If the file requested is register.html, then a MBean is registered, Otherwise if the file requested is unregister.html, then a MBean is unregistered. |
boolean |
processDeleteView(java.util.Hashtable table,
java.util.Hashtable viewTable)
|
java.lang.String |
processNewView(java.util.Hashtable table)
|
HtmlPageProp |
processPageProperties(java.util.Hashtable table)
|
boolean |
processSaveView(java.util.Hashtable table,
java.util.Hashtable viewTable)
|
java.lang.String |
processSearchRequest(java.util.Hashtable table,
boolean isAdminUser)
This method generates the html page for a search done in the server. |
int |
setAttributeValue(java.util.Hashtable table)
It is used to set the attributes value received from the client(browser). |
void |
setEndIndex(int value)
Sets the End Index of a row in a table. |
void |
setHtmlInterface(HtmlInterface htmlIntf)
Sets the HtmlInterface. |
void |
setHtmlPageProp(HtmlPageProp htmlPageProp)
Sets the HtmlPageProp. |
void |
setNextRowFlag(boolean value)
Sets the Next row flag for a table. |
void |
setPrevRowFlag(boolean value)
Sets the Previous row flag for a table. |
void |
setStartIndex(int value)
Sets the Start Index of a row in a table. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int CANCEL
public static int DO_GET
public static int NEW_ROW
public static int REFRESH
public static int OPER_ERROR
public static int REGISTER
public static int UNREGISTER
public static int ERR
public static long viewId
public static int POST_ERROR
public static int DO_OPER
public java.lang.String page
public static int DELETE_ROW
public static int NEXT_ROW
public static int PREV_ROW
public static int PREV_NEXT
boolean nextRowFlag
boolean prevRowFlag
public int stIndex
public int endIndex
| Constructor Detail |
|---|
public DynamicHtml(ServerOperations serverOp)
| Method Detail |
|---|
public void setHtmlInterface(HtmlInterface htmlIntf)
HtmlInterface - htmlIntfpublic void setHtmlPageProp(HtmlPageProp htmlPageProp)
HtmlPageProp - htmlPageProppublic HtmlPageProp getHtmlPageProp()
public void setStartIndex(int value)
value - an integer specifying the starting row.public void setEndIndex(int value)
value - an integer specifying the ending row.public void setNextRowFlag(boolean value)
value - a boolean true if next row flag needed or false otherwisepublic void setPrevRowFlag(boolean value)
value - a boolean true if previous row flag needed or false otherwise
public java.lang.String generateIndexFile(java.lang.String file,
boolean isauthentication,
boolean isAdminUser,
java.util.Hashtable viewTable)
file - - a String
public boolean isTable(java.lang.String ObjName)
throws java.lang.Exception
ObjName - - the ObjectName in String
java.lang.Exceptionpublic java.lang.String generateSearchFile()
public java.lang.String generateAboutUsFile()
public java.lang.String generateAdminFile()
public java.lang.String generateRegisterFile()
public java.lang.String generateUnRegisterFile()
public java.lang.String generateNotificationFile(int stIndex,
int endIndex)
stIndex - specifies the Start IndexendIndex - specifies the End Index
public java.lang.String generateDomainIndexFile(java.lang.String file)
file - specifies whether the file is
to create the Adaptors index page or
domain index page.
public java.lang.String generateScalarHtmlFile(java.lang.String objName,
java.lang.String viewName)
ObjName - A String specifying the ObjectName
with which the MBean was registered..
public java.lang.String generateOperationsHtmlFile(java.lang.String objName,
java.lang.String viewName)
ObjName - A String specifying the ObjectName
with which the MBean was registered..
public java.lang.String generateUserDefinedTypeHtmlFile(java.lang.String objName,
java.lang.String searchAttrbName,
java.lang.String viewName,
java.lang.String className)
ObjName - A String specifying the ObjectName
with which the MBean was registered.
public java.lang.String generateHashtableHtmlFile(java.lang.String objName,
java.lang.String searchAttrbName,
java.lang.String viewName)
ObjName - A String specifying the ObjectName
with which the MBean was registered.
public java.lang.String generateVectorHtmlFile(java.lang.String objName,
java.lang.String searchAttrbName,
java.lang.String viewName)
ObjName - A String specifying the ObjectName
with which the MBean was registered.
public java.lang.String generateAttrbArrayHtmlFile(java.lang.String objName,
java.lang.String searchAttrbName,
boolean addRow,
boolean ischkBox,
java.lang.String viewName)
ObjName - A String specifying the ObjectName
with which the MBean was registered.
public java.lang.String generateTableHtmlFile(java.lang.String objName,
java.lang.String viewName)
ObjName - A String specifying the ObjectName
with which the MBean was registered.
public java.lang.String generateNewRowHtmlFile(java.lang.String objName,
java.lang.String viewName)
ObjName - A String specifying the ObjectName
with which the MBean was registered.
public int setAttributeValue(java.util.Hashtable table)
table - the hash table cotains param and its value.
public void processAdminRequest(java.util.Hashtable table)
table - the Hashtable consists of data
provided by the client.
public java.lang.String processSearchRequest(java.util.Hashtable table,
boolean isAdminUser)
table - hashtable consists of the search String
from the client and other informations like
whether the search request is for a table or
for a scalar.
public java.lang.String generateOperationsPageForValues(javax.management.ObjectName objName,
java.lang.String actionName,
java.lang.Object obj,
java.lang.String[] signature,
java.lang.String viewName)
objName - the objectName of the registered MBean.actionName - the operation to be invoked.obj - the object returned by the operationsignature - the information about the parameters.
public java.lang.String generateLoginPage(boolean chLogin)
chLogin - if false creates the whole page
starting from frames, otherwise creates
the main page alone.public java.lang.String generateSessionExpirePage()
name - chLogin if false creates the whole page
starting from frames, otherwise creates
the main page alone.public java.lang.String generateUserInfoFile()
public java.lang.String generateViewOptions()
public java.lang.String generateNewView()
public java.lang.String generateDeleteView(java.util.Hashtable table)
public java.lang.String processNewView(java.util.Hashtable table)
public boolean processSaveView(java.util.Hashtable table,
java.util.Hashtable viewTable)
public java.lang.String generateViewForViewName(java.lang.String viewName,
java.util.Hashtable table)
public boolean processDeleteView(java.util.Hashtable table,
java.util.Hashtable viewTable)
public java.lang.String generatePageProperties()
public HtmlPageProp processPageProperties(java.util.Hashtable table)
public java.lang.String generateOptionsHtmlFile()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||