public abstract class PropertyBook extends Task implements java.lang.Runnable
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.
| Modifier and Type | Field and Description |
|---|---|
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.
|
protected java.lang.String[] |
m_delayedAttributes
List of all attributes that should not be read when NSObject.getDetails is called
|
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.lang.String |
m_pageOrders
String containing the PageOrders.
|
protected java.util.Vector |
m_pages
Vector containing all pages of the book (excluding disabled pages).
|
protected javax.servlet.http.HttpServletRequest |
m_req
I18NServletRequest.
|
initialized, nextTaskExtraParameters, NOT_CHANGED, onCancelString, onCompleteString, repeatParams, res, taskCompleteFlagCONFIGURABLE, 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, windowStateFULLPAGE_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 and Description |
|---|
PropertyBook() |
| Modifier and Type | Method and Description |
|---|---|
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(TaskContext context,
org.jdom.Document doc)
Initial call when the PropertyBook is created.
|
protected void |
instantiatePages()
Creates pages and populates the
m_pages member variable. |
boolean |
isAttributeSupported(java.lang.String attributeName)
Verifies that an attribute is supported in the current schema.
|
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.
|
addAllUrlParams, buildQueryString, execute, execute, getParameter, getUIPage, init, isInitialized, isPluginAvailable, setInitialized, setUIPagegetDocument, getJSPDataObjectOrNull, getLegacyTaskInfo, getRepeatParams, getTaskId, setRepeatableaddActionListener, callGetData, clearDocument, configureApply, configureCancel, configureComplete, createDocument, findURIForLocFile, getAction, getActionIcons, getAllowProcessRequestAsync, getConfig, getConfigObjectSetting, getConfigObjectSettings, getConfigSetting, getConfigSetting, getConfigSettings, getConfigSettingValue, getConfigSettingValues, getConfiguredUniqueID, getContainedGadgetInstanceStylesheets, getCustomizeQueryString, getData, getDataFromLastTry, 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, 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, writeGadgetXMLStartTagprotected TaskContext m_context
protected javax.servlet.http.HttpServletRequest m_req
protected java.util.Vector m_allPages
protected java.util.Vector m_pages
protected java.lang.String m_command
public java.lang.String m_displayName
public java.lang.String m_iconUrl
public java.lang.String m_iconAlt
protected org.jdom.Document[] m_pageDocs
protected java.util.HashMap m_initialParams
protected java.util.Hashtable m_cache
protected int m_currentPageId
protected java.lang.String[] m_handledAttributeNames
protected java.lang.String m_id
protected java.lang.String[] m_delayedAttributes
protected java.lang.String m_pageOrders
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(TaskContext, Document),
Task.setUIPage(java.lang.String),
TaskContext,
eMFrameUtilsprotected java.lang.String getPrefrencesKey()
public void init(TaskContext context, org.jdom.Document doc)
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 PropertyBookjava.lang.Exception - if this PropertyBook cannot runprotected void addPage(PropertyBookPage page)
page - The page to be addedinstantiatePages()protected PropertyBookPage getPage(int index)
index - The index number of the page requested.Page object requestedprotected 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(TaskContext, Document)protected PropertyBookPage getInstance(org.jdom.Document doc)
doc - Document object containing the definition of the pageaddPage(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 typeaddPage(com.novell.emframe.dev.PropertyBookPage)protected void outputMisc()
throws BookException
BookExceptionprotected 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.
BookExceptionprotected void canCommit()
throws PluginException
PluginException - if the page changes should not be committedprotected void doApply()
throws PluginException
PluginException - if there is a problem applying the changespublic void run()
run in interface java.lang.Runnablepublic java.lang.String getDisplayName()
protected static void printErrorMessage(java.lang.String message)
message - String containing the message to logpublic PropertyBookPage getPageById(java.lang.String pageId)
pageId - String from the xml description of the pagepublic java.lang.String getInitialParameter(java.lang.String key)
key - Params passed across url to instanciate bookpublic java.util.Hashtable getCache()
protected abstract boolean readData()
throws BookException
BookException - if there was a problem readingprotected abstract void writeData()
throws BookException
BookException - if there was a problem writingprotected abstract void doSearch()
protected void updateMooProgressDialog()
throws BookException
BookException - if there was a problem updating the dialogprotected void abortMooUpdate()
throws BookException
BookException - if there was a problem aborting the updateprotected void refresh()
throws BookException
BookException - if there was a problem refreshingprotected boolean shouldThreadUpdate()
protected final void setMerge(java.lang.String merge)
merge - String containing the next .jsp file to useprotected 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 keypublic java.lang.String[] getHandledAttributeNames()
public void release()
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 logpublic boolean isAttributeSupported(java.lang.String attributeName)
throws BookException
attributeName - String containing the name of the attribute to be verifiedBookException
API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated ${TODAY} ${TSTAMP}.