public abstract class PropertyBookPage extends Plugin
DirPropertyBookPage instead of just PropertyBookPage to take advantage of eDirectory Access Service
features.
A PropertyBookPage consists of Business Logic, Presentation Logic, and a Plug-in Descriptor:
Business Logic
AuthenticationBroker.
PropertyBookPages can also make their own connection to any back end resource, and the PropertyBookPage is
responsible for cleaning up any connections made. Current iManager credentials can also be obtained through the
AuthenticationBroker to assist in single sign-on. The AuthenticationBroker can be obtained from the
PropertyPageContext object (which extends the TaskContext object) passed into many methods using
context.getAuthenticationBroker().Presentation Logic
Plug-in Descriptor
All elements of a PropertyBookPage are zipped up in a module file with a .npm extension. See the iManager Developer Kit for more information on writing PropertyBookPages, the iManager file structure of where to put the different elements of the PropertyBookPage, and how to build .npm files.
Do NOT hardcode the "nps" name in any paths to files in JSPs or referenced by your business logic. The web application name "nps" may change in the future, and you can use the PluginContext method context.getModulesPath() to return the path in your JSP file to the webapps/nps/portal/modules directory.
Helper classes
The PropertyPageContext and TaskContext objects are based upon TaskContext.
The PluginContext given in many methods allows you access to all information needed for your PropertyBookPage.
See TaskContext for details as to the objects you can access.
There are several static classes that may be of help to you. See the
eMFrameUtils and DirUtils classes for more information. Some of the DirUtils
methods require an instantiated DirUtils object. You can obtain an instantiated DirUtils object from the
PluginContext passed into many methods using context.getDirUtils().
Debug logging is available through static methods on the D class. Debug output always shows up on STDERR,
but can be configured to go to the STDOUT and to a file with various debugging levels.
Order of methods called on your PropertyBookPage:
shouldRun(javax.servlet.http.HttpServletRequest, java.lang.String) - Before your class is instantiated, this method is called to see if iManager should
instantiate your PropertyBookPage and display it for selection by the user. If you have special considerations to
check before your PropertyBookPage is shown (such as your PropertyBookPage will only work on a particular operating
system, if you require schema extentions to be performed, etc...), overwrite the shouldRun call and do any checking.
Make sure to call the parent shouldRun method as well.Plugin.init(TaskContext, Document) - When your class is instantiated, this method is called to perform any initialization. Your
PropertyBookPage will be instantiated when the PropertyBook containing your PropertyBookPage is instantiated.RuntimePlugin.shouldShow - If you have extended the RuntimePlugin interface, this method is called when
your PropertyBookPage should be shown but allows you to check the selected object for information before showing
your PropertyBookPage.show(TaskContext, Properties) - This method is called when your PropertyBookPage is first selected.cache(com.novell.emframe.dev.PropertyPageContext) - This method is called when another PropertyBookPage is selected and you should cache any data.canCommit(PropertyPageContext) - This method is called when the user presses OK or Apply. Your PropertyBookPage is given
the chance to look at the data and veto the save.commit(com.novell.emframe.dev.PropertyPageContext) - This method is called when your PropertyBookPage should save any changes made.release() - This method is called when your PropertyBookPage's lifecycle is complete. Overwrite
this method if you need to perform any cleanup before your PropertyBookPage is released.Objects based on classes derived from DirPropertyBookPage can either be added to a PropertyBook
object or run independently. If run independently, eMFrame will create a PropertyBook object
displaying only the DirPropertyBookPage object.
| Modifier and Type | Field and Description |
|---|---|
protected Chapter |
m_chapter
Chapter that contains this page.
|
protected java.lang.String[] |
m_delayedAttributes
Attributes that should not be read when getDetails is called on an NSObject
|
protected java.lang.String |
m_displayName
Localized display name of the page.
|
protected java.lang.String[] |
m_handledAttributeNames
Attributes this page handles.
|
protected java.lang.String |
m_helpfile
Helpfile of the page.
|
protected java.lang.String |
m_id
Unique ID of the page.
|
boolean |
m_IsDirty
Has information changed on this page (dirty).
|
boolean |
m_isXML
Is this page XML.
|
protected java.util.Properties |
m_JSPDataObject
Deprecated.
Use request.setAttribute(String, Object) instead
or implemen
|
protected org.jdom.Document |
m_pageDoc
XML Document describing the page.
|
protected java.util.Properties |
m_parameters
Properties of this page.
|
PropertyBook |
m_propertyBook
PropertyBook that contains this page.
|
protected java.lang.String |
m_template
Template of the page.
|
| Constructor and Description |
|---|
PropertyBookPage() |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(TaskContext context,
java.util.Properties resultStrings)
Deprecated.
Use commit(PropertyPageContext context) instead
|
void |
cache(PropertyPageContext context)
The cache method is called when another PropertyBookPage has been chosen.
|
void |
canCommit(PropertyPageContext context)
This method is called when the user clicks the "OK" or "Apply" buttons.
|
void |
canCommit(TaskContext context,
java.util.Properties resultStrings)
Deprecated.
Use canCommit(PropertyPageContext context) instead
|
void |
commit(PropertyPageContext context)
This method is to COMMIT the changes to the data source.
|
Chapter |
getChapter()
Gets the chapter (tab).
|
java.lang.String[] |
getDelayedAttributes()
Returns a list of eDirectory attributes that should not be read during
the initial NSObject.getDetails call.
|
java.lang.String[] |
getHandledAttributeNames()
Returns a String[] of all attributes that this page
is going to take care of.
|
java.lang.String |
getHelpFilename()
Should return the filename as a string in the form moduleName.fileName (ex base.userHelpFile).
|
java.lang.String |
getId()
Get the unique ID of this page.
|
java.lang.String |
getName(TaskContext context)
Gets the page's localized display name.
|
java.lang.String |
getTemplate()
Gets the merge template (.jsp).
|
void |
init(PluginContext context,
org.jdom.Document doc)
Deprecated.
as of 2.6 use init(TaskContext, Document)
|
void |
release()
Called by iManager when the PropertyBookPage has been released and should be collected in the future.
|
void |
save(TaskContext context,
java.util.Properties resultStrings)
Deprecated.
Use cache(PropertyPageContext context) instead
|
void |
setChapter(Chapter chapter)
The chapter is the tab which the page shows up on.
|
static void |
shouldRun(javax.servlet.http.HttpServletRequest req,
java.lang.String sServiceName)
Returns whether this PropertyBookPage should be able to run.
|
void |
show(PropertyPageContext context)
The show method is called when a PropertyBookPage is first selected.
|
void |
show(TaskContext context,
java.util.Properties resultStrings)
Deprecated.
Use show(PropertyPageContext context) instead
|
init, isPluginAvailable, isPluginAvailablepublic PropertyBook m_propertyBook
public boolean m_IsDirty
protected Chapter m_chapter
protected java.util.Properties m_parameters
protected java.lang.String m_helpfile
protected org.jdom.Document m_pageDoc
protected java.lang.String m_displayName
protected java.lang.String m_template
protected java.lang.String m_id
public boolean m_isXML
protected java.lang.String[] m_handledAttributeNames
protected java.lang.String[] m_delayedAttributes
protected java.util.Properties m_JSPDataObject
public void init(PluginContext context, org.jdom.Document doc)
init in class Plugincontext - PluginContext of the plug-indoc - XML Document registering this pagePlugin.init(TaskContext, Document)public Chapter getChapter()
setChapter(com.novell.emframe.dev.Chapter)public void setChapter(Chapter chapter)
chapter - Chapter object to contain this pagegetChapter()public java.lang.String getHelpFilename()
public java.lang.String getName(TaskContext context)
context - TaskContext of the plug-inpublic java.lang.String getTemplate()
public java.lang.String getId()
public void show(PropertyPageContext context) throws PageException
context - PropertyPageContext based upon the TaskContext and the PropertyBookPagePageExceptionpublic void show(TaskContext context, java.util.Properties resultStrings) throws PageException
context - TaskContext of the plug-inresultStrings - Properties object to be added to the requestPageExceptionshow(PropertyPageContext)public void cache(PropertyPageContext context) throws PageException
The primary goal of this method should be to cache the data posted from the client in some in-memory object. For those writing to eDirectory this should most often be by saving the data to an NSObject. You can get a reference to the NSObject by calling getDirPropertyBook().getNSObject(). You should never call nsobj.update(). This will be called by the framework when the "OK" of "Apply" button is pressed.
context - PropertyPageContext based upon the TaskContext and the PropertyBookPagePageExceptionpublic void save(TaskContext context, java.util.Properties resultStrings) throws PageException
context - TaskContext of the plug-inresultStrings - Properties object to be added to the requestPageExceptioncache(com.novell.emframe.dev.PropertyPageContext)public void commit(PropertyPageContext context) throws PageException
context - PropertyPageContext based upon the TaskContext and the PropertyBookPagePageExceptionpublic void apply(TaskContext context, java.util.Properties resultStrings) throws PageException
context - TaskContext of the plug-inresultStrings - Properties object to be added to the requestPageExceptioncommit(com.novell.emframe.dev.PropertyPageContext)public void canCommit(TaskContext context, java.util.Properties resultStrings) throws PageException
context - TaskContext of the plug-inresultStrings - Properties object to be added to the requestPageExceptioncanCommit(PropertyPageContext)public void canCommit(PropertyPageContext context) throws PageException
context - PropertyPageContext based upon the TaskContext and the PropertyBookPagePageExceptionpublic void release()
public java.lang.String[] getHandledAttributeNames()
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 PropertyBookPagejava.lang.Exception - if this PropertyBookPage cannot runpublic java.lang.String[] getDelayedAttributes()
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}.