com.novell.emframe.dev
Class DirPropertyBook

java.lang.Object
  extended bycom.novell.nps.gadgetManager.BaseGadgetInstance
      extended bycom.novell.emframe.dev.Task
          extended bycom.novell.emframe.dev.PropertyBook
              extended bycom.novell.emframe.dev.DirPropertyBook
All Implemented Interfaces:
com.novell.nps.configManager.ConfigurationComplete, com.novell.nps.gadgetManager.GadgetInstance, java.lang.Runnable, java.io.Serializable

public class DirPropertyBook
extends PropertyBook

This class is the default PropertyBook for modifying and viewing attributes of an eDirectory object. As a general rule this should not be extended.

See Also:
Serialized Form

Field Summary
protected  java.lang.String m_eDirTarget
          String containing what is posted to me (packed string or criteria).
protected  boolean m_modifyGroupMembers
          The target sent to this task will be group1.novell, but we really want to modify all the users in the group.
protected  boolean m_mooEnabled
          boolean for does it support Multiple Object Operations (MOO).
protected  com.novell.emframe.fw.TargetCollection m_targets
          TargetCollection for storage of NSObjects.
protected  java.lang.String m_targetType
          String containing the actual target type of the selected object.
protected  boolean m_useShortName
          boolean for whether to use the short name.
protected  java.lang.String m_validObjectTypeDisplayName
          String containing valid object type display names (ex.
protected  java.util.Vector m_validTargetTypes
          Vector containing valid target types (ex.
protected static java.lang.String TEMPLATE_SEARCH
          Search template .jsp file.
 
Fields inherited from class com.novell.emframe.dev.PropertyBook
m_allPages, m_cache, m_command, m_context, m_currentPageId, m_displayName, m_handledAttributeNames, m_iconAlt, m_iconUrl, m_id, m_initialParams, m_pageDocs, m_pages, m_req
 
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
DirPropertyBook()
           
 
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()
          Perform checks before committing page changes.
protected  void doSearch()
          Allows the user to select a target to be modified, such as an eDirectory object.
 MOOManager getMooManager()
          Pages should only call this if isMoo returns true.
 NSObject getNSObject()
          Pages should only call this if isMoo returns false.
 NSObject getPrimaryTarget()
          Deprecated. call getNSObject and getMooManager instead.
protected  java.util.Vector getValidTargetTypes()
          Gets the valid target types.
 void init(PluginContext context, org.jdom.Document doc)
          Initial call when the PropertyBook is created.
protected  void instantiatePages()
          Implementation should instanciate pages and call addPage(page).
 boolean isMoo()
          Returns whether the book was called with Multiple Object Operation enabled (Moo).
protected  void outputMisc()
          Called on every request to output general data to be used in JSP or XSL.
protected  boolean readData()
          Reads data from a data source and stores it in a temporary store.
protected  void refresh()
          Clears the temporary data store (mooManager) after the Apply button is clicked.
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  void verifyPagesExist()
          Verfies that there is at least one page to display.
protected  void writeData()
          Writes data to a data source from a temporary store.
 
Methods inherited from class com.novell.emframe.dev.PropertyBook
doApply, doShow, execute, getCache, getDisplayName, getHandledAttributeNames, getInitialParameter, getInstance, getInstance, getPage, getPageById, getPrefrencesKey, log, log, outputData, printErrorMessage, release, run, setMerge, shouldRun
 
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

m_eDirTarget

protected java.lang.String m_eDirTarget
String containing what is posted to me (packed string or criteria).


m_modifyGroupMembers

protected boolean m_modifyGroupMembers
The target sent to this task will be group1.novell, but we really want to modify all the users in the group.


m_mooEnabled

protected boolean m_mooEnabled
boolean for does it support Multiple Object Operations (MOO).


m_targets

protected com.novell.emframe.fw.TargetCollection m_targets
TargetCollection for storage of NSObjects.


m_targetType

protected java.lang.String m_targetType
String containing the actual target type of the selected object.


m_useShortName

protected boolean m_useShortName
boolean for whether to use the short name.


m_validObjectTypeDisplayName

protected java.lang.String m_validObjectTypeDisplayName
String containing valid object type display names (ex. "Ted Objects" or "All Containers").


m_validTargetTypes

protected java.util.Vector m_validTargetTypes
Vector containing valid target types (ex. "Organization, OU").


TEMPLATE_SEARCH

protected static final java.lang.String TEMPLATE_SEARCH
Search template .jsp file.

See Also:
Constant Field Values
Constructor Detail

DirPropertyBook

public DirPropertyBook()
Method Detail

abortMooUpdate

protected final void abortMooUpdate()
                             throws BookException
Aborts a Multiple Object Operations (Moo) update in the middle of processing objects.

Overrides:
abortMooUpdate in class PropertyBook
Throws:
BookException - if there was a problem aborting the update

addPage

protected final void addPage(PropertyBookPage page)
Adds a page to this book. Should only be called from instantiatePages.

Overrides:
addPage in class PropertyBook
Parameters:
page - The page to be added
See Also:
instantiatePages()

canCommit

protected void canCommit()
                  throws PluginException
Perform checks before committing page changes.

Overrides:
canCommit in class PropertyBook
Throws:
PluginException - if the page changes should not be committed

doSearch

protected final void doSearch()
Allows the user to select a target to be modified, such as an eDirectory object. Set merge template, stuff resultStrings, set up targetChooser.

Specified by:
doSearch in class PropertyBook

getMooManager

public final MOOManager getMooManager()
Pages should only call this if isMoo returns true.

Returns:
MooManager containing the primary target

getNSObject

public final NSObject getNSObject()
Pages should only call this if isMoo returns false.

Returns:
NSObject containing the primary target

getPrimaryTarget

public final NSObject getPrimaryTarget()
Deprecated. call getNSObject and getMooManager instead.

Pages should only call this if isMoo returns false.

Returns:
NSObject containing the primary target
See Also:
getNSObject(), getMooManager()

getValidTargetTypes

protected java.util.Vector getValidTargetTypes()
Gets the valid target types.

Returns:
a vector of Strings (e.g. {"User", "Organization", ...}.

init

public final void init(PluginContext context,
                       org.jdom.Document doc)
Initial call when the PropertyBook is created. Reads configuration data from the xml description of the book.

Overrides:
init in class PropertyBook
Parameters:
context - PluginContext of the plug-in
doc - Document to read configuration data from

instantiatePages

protected void instantiatePages()
                         throws BookException
Implementation should instanciate pages and call addPage(page).

Creates pages and populates the m_pages member variable.

instantiatePages is called by execute and reads the pages from the XML document passed to the init method.

Overrides:
instantiatePages in class PropertyBook
Throws:
BookException - if unable to create pages or no pages exist.
See Also:
PropertyBook.execute(com.novell.emframe.dev.TaskContext, java.util.Properties), init(com.novell.emframe.dev.PluginContext, org.jdom.Document)

isMoo

public final boolean isMoo()
Returns whether the book was called with Multiple Object Operation enabled (Moo).

Returns:
boolean: true if the user selected target contains more than one object, false if otherwise

outputMisc

protected final void outputMisc()
                         throws BookException
Called on every request to output general data to be used in JSP or XSL. Puts these values in the resultString:
eDir$target = packedDnList || criteria

-Book.Target.type
-Book.Target.icon
-Book.Target.displayName
-Book.Icon.Alt
-Book.objectTypeNames
-Book.objectTypeDisplayName
-Book.objectTypeDisplayNameKey
-Book.displayName

Overrides:
outputMisc in class PropertyBook
Throws:
BookException

readData

protected final boolean readData()
                          throws BookException
Reads data from a data source and stores it in a temporary store. For example, readData might read data from eDirectory and store it in an NSObject.

Specified by:
readData in class PropertyBook
Returns:
boolean true if read was successful, false if otherwise
Throws:
BookException - if there was a problem reading

refresh

protected final void refresh()
                      throws BookException
Clears the temporary data store (mooManager) after the Apply button is clicked.

refresh():

Overrides:
refresh in class PropertyBook
Throws:
BookException - if there was a problem refreshing

shouldThreadUpdate

protected final boolean shouldThreadUpdate()
Returns whether the thread should update. Called by PropertyBook; We currently always want to thread the update in Moo

Overrides:
shouldThreadUpdate in class PropertyBook
Returns:
boolean: true if the update (commiting data to datasource) should be done on another thread

updateMooProgressDialog

protected final void updateMooProgressDialog()
                                      throws BookException
Updates the Multiple Object Operations (Moo) progress dialog with which object is currently being operated on.

Overrides:
updateMooProgressDialog in class PropertyBook
Throws:
BookException - if there was a problem updating the dialog

verifyPagesExist

protected final void verifyPagesExist()
                               throws BookException
Verfies that there is at least one page to display.

Throws:
BookException - if there are no pages

writeData

protected final void writeData()
                        throws BookException
Writes data to a data source from a temporary store. For example, writeData might writed data that it retrieves from an NSObject to eDirectory.

Specified by:
writeData in class PropertyBook
Throws:
BookException - if there was a problem writing


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 September 2 2004 0111.