|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.novell.nps.gadgetManager.BaseGadgetInstance
com.novell.emframe.dev.Task
com.novell.emframe.dev.PropertyBook
Abstract class to implement to be a Property Book. Extends the Task interface so that property books can be
launched like other tasks.
OutputData issue: In order to support both XSL and HTT in the name PropertyBook, this needs to support outputting data to either xml or properties. In the case of the frameset, menubar, and applybar we now these are currently implemented in htt, so we can output data directly to the resultStrings. However, when we are showing a page we do not now know if we will be showing an xml page or an htt page until after we call the previous page's cache method and the next page's show method (becuase one could throw an exception). Thus we output data using the outputData method. This creates a list of data items. This data is later put into the resultStrings or xml by calling the blastData method.
Moo limitations: Currently pages commit method does not get called if the writeData is being done on a seperate thread (which only happens in Moo - MultipleObjectOperations). The only way pages can participate in Moo is to through the PropertyBook.writeData method. For the DirPropertyBook this means using the MooManager object (NDSNamespace). This is a object specially designed to apply object operations to many eDirectory objects.
XML PropertyBook Params - things books can custimize by adding params to the install xml file.
Book.objectTypeDisplayNameKey urlparam displayName
Book.Icon.name urlparam icon on first page
Book.Icon.alt urlparam alt for icon on first page
eMFrameUtils.setMessage issue: these utilities output data directly to either the XML or Properties. The problem is that the PropertyBook doesn't know if the response will be XML or HTT when it calls this method.
| Field Summary | |
protected java.util.Vector |
m_allPages
Vector containing all pages of the book (including disabled pages). |
protected java.util.Hashtable |
m_cache
Hashtable cache used for sharing objects between PropertyBookPages. |
protected java.lang.String |
m_command
Command to handle in the execute() method. |
protected TaskContext |
m_context
TaskContent of the plug-in. |
protected int |
m_currentPageId
Temporary store of current page. |
java.lang.String |
m_displayName
Display name of the book. |
protected java.lang.String[] |
m_handledAttributeNames
String array containing handled attribute names for use by the Other page. |
java.lang.String |
m_iconAlt
Alt text of the icon. |
java.lang.String |
m_iconUrl
URL to icon. |
protected java.lang.String |
m_id
ID of this book. |
protected java.util.HashMap |
m_initialParams
HashMap of initial parameters. |
protected org.jdom.Document[] |
m_pageDocs
All inforamtion about a particular page. |
protected java.util.Vector |
m_pages
Vector containing all pages of the book (excluding disabled pages). |
protected com.novell.webaccess.common.I18NServletRequest |
m_req
I18NServletRequest. |
| Fields inherited from class com.novell.nps.gadgetManager.BaseGadgetInstance |
CONFIGURABLE, gadgetAssignment, gadgetAssignmentDN, gadgetCode, gadgetInstanceID, GETDATA, HANDLE_ACTION_ERROR_STATE, helpURL, m_doc, m_JSPDataObject, m_moduleStylesheet, m_previousState, myLocale, PROCESSREQUEST, repeatable, resBundle, session, state, STATE_SHOW_USER_CONFIG, STATE_USER_CONFIG_COMPLETE, windowState |
| Fields inherited from interface com.novell.nps.gadgetManager.GadgetInstance |
FULLPAGE_BRANDING_AREA_MODE, FULLPAGE_DATA_MODE, FULLPAGE_REQUEST_PROPERTY, GADGET_DN, GADGET_INSTANCE_ARGS, GADGET_INSTANCE_CLASS, GADGET_INSTANCE_ID_PROPERTY, LAUNCH_TYPE_DELEGATE, LAUNCH_TYPE_LAUNCH, LIFECYCLE_TYPE_EXISTING, LIFECYCLE_TYPE_NEW, LIFECYCLE_TYPE_RECREATE, LIFECYCLE_TYPE_RESET, LIFECYCLE_TYPE_REUSE, PARAM_RETURN_STATUS, RETURN_STATUS_CANCEL, RETURN_STATUS_CANCEL_ABORT, RETURN_STATUS_CANCEL_CONTINUE, RETURN_STATUS_ERROR_ABORT, RETURN_STATUS_ERROR_CONTINUE, RETURN_STATUS_FINISHED, STATE_PROPERTY, TEXT_HTML, TEXT_XML, WINDOW_STATE_MAXIMIZED, WINDOW_STATE_MINIMIZED |
| Constructor Summary | |
PropertyBook()
|
|
| Method Summary | |
protected void |
abortMooUpdate()
Aborts a Multiple Object Operations (Moo) update in the middle of processing objects. |
protected void |
addPage(PropertyBookPage page)
Adds a page to this book. |
protected void |
canCommit()
Overwrite this method if you want to perform checks before committing page changes. |
protected void |
doApply()
Called when user clicks apply or ok. |
protected abstract void |
doSearch()
Allows the user to select a target to be modified, such as an eDirectory object. |
protected void |
doShow()
Displays the property book pages. |
boolean |
execute(TaskContext context,
java.util.Properties resultStrings)
Main method for the PropertyBook to read information from the request and output the correct .jsp file. |
java.util.Hashtable |
getCache()
Gets a Hashtable cache used for sharing objects between PropertyBookPages. |
java.lang.String |
getDisplayName()
Returns the localized display name of the book. |
java.lang.String[] |
getHandledAttributeNames()
Returns a String array of all attributes that this page is going to take care of. |
java.lang.String |
getInitialParameter(java.lang.String key)
Get initial parameters based on a specific key used to instanciate this book. |
protected PropertyBookPage |
getInstance(org.jdom.Document doc)
Given an xml file this will create a page. |
protected PropertyBookPage |
getInstance(org.jdom.Document doc,
boolean verifyDevice)
Given an xml file this will create a page. |
protected PropertyBookPage |
getPage(int index)
Gets pages by the index; index is determined by ordering. |
PropertyBookPage |
getPageById(java.lang.String pageId)
Gets a page from its id as defined in the xml description of the page. |
protected java.lang.String |
getPrefrencesKey()
Returns the key to use for storing and reading page orders to and from preferences. |
void |
init(PluginContext context,
org.jdom.Document doc)
Initial call when the PropertyBook is created. |
protected void |
instantiatePages()
Creates pages and populates the m_pages member variable. |
protected static void |
log(java.lang.String message)
Log a message to the debug log. |
protected static void |
log(java.lang.Throwable e)
Log an exception to the debug log. |
protected void |
outputData(java.lang.String key,
java.lang.String value)
Puts all data in a list. |
protected void |
outputMisc()
Called on every request to output general data to be used in JSP or XSL. |
protected static void |
printErrorMessage(java.lang.String message)
Prints an error message to the log. |
protected abstract boolean |
readData()
Reads data from a data source and stores it in a temporary store. |
protected void |
refresh()
Clears temporary data store (mooManager) after apply pressed. |
void |
release()
Called by iManager when the task has been released and should be collected in the future. |
void |
run()
This is the Runnable.run method. |
protected void |
setMerge(java.lang.String merge)
Set the merge jsp file. |
static void |
shouldRun(javax.servlet.http.HttpServletRequest req,
java.lang.String sServiceName)
Returns whether this PropertyBook should be able to run. |
protected boolean |
shouldThreadUpdate()
Returns whether the thread should update. |
protected void |
updateMooProgressDialog()
Updates the Multiple Object Operations (Moo) progress dialog with which object is currently being operated on. |
protected abstract void |
writeData()
Writes data to a data source from a temporary store. |
| Methods inherited from class com.novell.emframe.dev.Task |
buildQueryString, execute, execute, isInitialized, isPluginAvailable, setInitialized, setUIPage |
| Methods inherited from class com.novell.nps.gadgetManager.BaseGadgetInstance |
addActionListener, callGetData, clearDocument, configureApply, configureCancel, configureComplete, createDocument, findURIForLocFile, getAction, getActionIcons, getAllowProcessRequestAsync, getConfig, getConfigObjectSetting, getConfigObjectSettings, getConfigSetting, getConfigSetting, getConfigSettings, getConfigSettingValue, getConfigSettingValues, getConfiguredUniqueID, getContainedGadgetInstanceStylesheets, getCustomizeQueryString, getData, getDataFromLastTry, getDocument, getFullPageMode, getGadgetAssignment, getGadgetAssignmentDN, getGadgetInstanceID, getGadgetXMLEndTag, getGadgetXMLStartTag, getHandleActionErrorStateData, getIntConfigSetting, getJSPDataObject, getJSPPage, getLangResourceURI, getLaunchType, getLifeCycleType, getLocale, getLocHelpURL, getLocResourceURI, getManagementServiceSet, getOriginalServiceName, getParam, getParentInstance, getPortalConnection, getPreferredDataType, getPreferredName, getPreferredName, getPrimary, getProxyServer, getRedirectionOrSelf, getRepeatParams, getResourceBundle, getResourcePathBase, getReturnStatus, getRootDelegator, getRootNodeName, getSession, getState, getStylesheetAndResourceSets, getStyleSheetName, getUserConfigCompleteData, getWindowState, handleAction, handlePostRequestActions, hasHelp, init, isConfigSettingCumulative, isConfigSettingOverwriteable, isForceRead, isTimedOut, onPageMaximize, onPageMinimize, onPortalInit, onShowUserConfigAction, onUserConfigCompleteAction, outputHTMLError, parseMultipartFormData, prepare, processRequest, processRequest, processSecondaryGadgetResults, removeActionListener, reset, returnToPrimary, setAllowProcessRequestAsync, setConfigSetting, setConfigSetting, setForceRead, setGadgetAssignment, setGadgetAssignmentDN, setGadgetInstanceID, setGetDataFromLastTry, setLaunchType, setLifeCycleType, setLocale, setModuleStylesheet, setParentInstance, setPrimary, setRedirectionOrSelf, setRepeatParams, setRequestedDataType, setResourceBundle, setRootDelegator, setSession, setState, setTimedOut, setWindowState, supportsDeviceCharacteristics, writeConfig, writeGadgetXMLEndTag, writeGadgetXMLStartTag |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.Vector m_allPages
protected java.util.Hashtable m_cache
protected java.lang.String m_command
protected TaskContext m_context
protected int m_currentPageId
public java.lang.String m_displayName
protected java.lang.String[] m_handledAttributeNames
public java.lang.String m_iconAlt
public java.lang.String m_iconUrl
protected java.lang.String m_id
protected java.util.HashMap m_initialParams
protected org.jdom.Document[] m_pageDocs
protected java.util.Vector m_pages
protected com.novell.webaccess.common.I18NServletRequest m_req
| Constructor Detail |
public PropertyBook()
| Method Detail |
protected void abortMooUpdate()
throws BookException
BookException - if there was a problem aborting the updateprotected void addPage(PropertyBookPage page)
page - The page to be addedinstantiatePages()
protected void canCommit()
throws PluginException
PluginException - if the page changes should not be committed
protected void doApply()
throws PluginException
PluginException - if there is a problem applying the changesprotected abstract void doSearch()
protected void doShow()
throws BookException
doShow is called in two circumstances:
This method first calls the old page's cache method to save changes. It then displays the next page.
BookException
public boolean execute(TaskContext context,
java.util.Properties resultStrings)
execute in class Taskcontext - TaskContext of the plug-inresultStrings - Properties object containing setting names and values to be automatically added to the
request.
Task.init(com.novell.emframe.dev.PluginContext, org.jdom.Document),
Task.setUIPage(java.lang.String),
PluginContext,
eMFrameUtilspublic java.util.Hashtable getCache()
public java.lang.String getDisplayName()
public java.lang.String[] getHandledAttributeNames()
public java.lang.String getInitialParameter(java.lang.String key)
key - Params passed across url to instanciate book
protected PropertyBookPage getInstance(org.jdom.Document doc)
doc - Document object containing the definition of the page
addPage(com.novell.emframe.dev.PropertyBookPage)
protected PropertyBookPage getInstance(org.jdom.Document doc,
boolean verifyDevice)
doc - Document object containing the definition of the pageverifyDevice - Check to see if the page supports the current device type
addPage(com.novell.emframe.dev.PropertyBookPage)protected PropertyBookPage getPage(int index)
index - The index number of the page requested.
Page object requestedpublic PropertyBookPage getPageById(java.lang.String pageId)
pageId - String from the xml description of the page
protected java.lang.String getPrefrencesKey()
public void init(PluginContext context,
org.jdom.Document doc)
init in class Taskcontext - PluginContext of the plug-indoc - Document to read configuration data from
protected void instantiatePages()
throws BookException
m_pages member variable.
instantiatePages is called by
execute and reads the pages from the XML
document passed to the init method.
BookException - if unable to create pages or no pages exist.execute(com.novell.emframe.dev.TaskContext, java.util.Properties),
init(com.novell.emframe.dev.PluginContext, org.jdom.Document)protected static void log(java.lang.String message)
message - String containing the message to logprotected static void log(java.lang.Throwable e)
e - Throwable containing the exception to log
protected final void outputData(java.lang.String key,
java.lang.String value)
key - String containing the key to put as an attribute on the HttpServletRequestvalue - Value of the key
protected void outputMisc()
throws BookException
BookExceptionprotected static void printErrorMessage(java.lang.String message)
message - String containing the message to log
protected abstract boolean readData()
throws BookException
BookException - if there was a problem reading
protected void refresh()
throws BookException
BookException - if there was a problem refreshingpublic void release()
release in interface com.novell.nps.gadgetManager.GadgetInstancerelease in class Taskpublic void run()
run in interface java.lang.Runnableprotected final void setMerge(java.lang.String merge)
merge - String containing the next .jsp file to use
public static void shouldRun(javax.servlet.http.HttpServletRequest req,
java.lang.String sServiceName)
throws java.lang.Exception
req - HttpServletRequestsServiceName - String containing the id of this PropertyBook
java.lang.Exception - if this PropertyBook cannot runprotected boolean shouldThreadUpdate()
protected void updateMooProgressDialog()
throws BookException
BookException - if there was a problem updating the dialog
protected abstract void writeData()
throws BookException
BookException - if there was a problem writing
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||