com.filenet.wcm.apps.server.ui.info
Class WcmPropertiesInfoPage

java.lang.Object
  extended bycom.filenet.wcm.toolkit.server.base.WcmDpContainer
      extended bycom.filenet.wcm.toolkit.server.base.WcmModule
          extended bycom.filenet.wcm.toolkit.server.base.GlobalEventModule
              extended bycom.filenet.wcm.toolkit.server.base.WcmUiModule
                  extended bycom.filenet.wcm.toolkit.server.ui.WcmXSLModule
                      extended bycom.filenet.wcm.apps.server.ui.info.WcmPropertiesInfoPage
All Implemented Interfaces:
com.filenet.wcm.toolkit.server.base.WcmModuleInterface, com.filenet.wcm.toolkit.server.base.WcmPanelInterface, com.filenet.wcm.toolkit.server.base.WcmPanelValidationInterface, com.filenet.wcm.toolkit.server.base.WcmUiModuleInterface, com.filenet.wcm.toolkit.server.base.WcmViewPanelInterface
Direct Known Subclasses:
ComponentRelationshipPropertiesInfoPage, RMRecordsClassInfoPage, SecurityPolicyInfoPage, WcmPropDescsInfoPage, WebContentCFWPropertiesInfoPage, WebContentPropertiesInfoPage

public class WcmPropertiesInfoPage
extends com.filenet.wcm.toolkit.server.ui.WcmXSLModule
implements com.filenet.wcm.toolkit.server.base.WcmViewPanelInterface, com.filenet.wcm.toolkit.server.base.WcmPanelValidationInterface

This class handles output of properties in a number of different scenarios. It works in conjunction with WcmPropertiesInfoPage.xsl and the properties xml returned from the Authoring Data Provider or, in some cases, the xml created here for new objects. This class makes great use of WcmPropertiesUtil.

See Also:
WcmPropertiesUtil

Nested Class Summary
 class WcmPropertiesInfoPage.OVPReader
           
 
Field Summary
protected  com.filenet.wcm.toolkit.server.dp.WcmAuthoringDataProvider adp
           
protected  WcmAuthoringState aState
           
protected  com.filenet.wcm.toolkit.server.util.prefs.PrefsLabel classLabel
           
protected  com.filenet.wcm.toolkit.server.base.WcmController controller
           
protected  java.util.List exceptions
           
protected  boolean isInfoPage
           
protected  int nType
          Set this value in the constructor to one of the static ints defined above.
protected  java.lang.String propCacheKey
           
protected  java.lang.String rootClassId
           
protected  boolean showCompoundDocument
           
 
Fields inherited from class com.filenet.wcm.toolkit.server.ui.WcmXSLModule
transformUtil
 
Fields inherited from class com.filenet.wcm.toolkit.server.base.WcmModule
locale, NAME_DELIMITER
 
Constructor Summary
protected WcmPropertiesInfoPage()
          protected Constructor sets the default type, the name and creates the WcmPropertiesUtil object.
  WcmPropertiesInfoPage(int type)
          Constructor sets the Property type to one of the static int values defined above.
 
Method Summary
 void cleanup()
          Cleanup module properties
 java.lang.String getClassName()
          Provides the class name for display.
 java.util.List getExceptions()
           
 java.lang.String getFormName()
          Overridden to return the form name used so wizard navigation will submit it.
protected  org.w3c.dom.Document getOutputXML()
          Gets the Document interface on the properties XML
protected  org.w3c.dom.Document getPropertiesXML()
          Gets the Document interface on the properties XML.
protected  boolean getShowCompoundDocument(java.lang.String classId)
           
 java.util.Iterator getValidationErrors()
          Unused.
 void initialize()
          Initializes data providers, XSL parameters, the authoring state and other state values.
 void initializePropertiesWithCommandXml(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 boolean isApplyButtonRequired()
          Tells the Info page if it should put up an Apply button.
 boolean isModified()
          Indicates that the state has changed as a result of a wizardSave call.
 void onAddChild(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void onChangePage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Used by links to redirect to secondary property pages after it submits the form by calling onSubmit.
 void onCollapse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handle Collapse on expanded object property
 void onExpand(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handle Expand on object Property
 void onGetInfo(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void onSelectObject(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handle Select Object event.
 void onSetClass(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void onSetObject(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void onShowChildren(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void onStartPage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Set XSL parameters and other setup before showing the property page.
 void onSubmit(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This event updates the output XML from the request data.
 void onSystemProperties(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void onUpdateChild(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 boolean pageValidate()
          Validates the properties but this method don't display error stack.
 void panelFinish(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Calls setProperties on the object.
 void panelInitClientProperties(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Called only when in App Integration/Client mode.
 void panelSave(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Calls onSubmit
 boolean panelValidate()
          Validates the properties
 void removeSingleProperty()
          Provides the mechanism for removing a single property value.
 void render(java.io.Writer w)
          Renders the properties.
 void reset()
          Resets data provider and module properties.
 void setFormName(java.lang.String formName)
          Sets the form name string
 void setReadOnly(boolean bReadOnly)
          Pass true to set this property page as read only.
 void setRootClass(java.lang.String classId)
           
 void setSelectedClass(java.lang.String newClassId)
          Set the select class.
 void showCompoundDocument(boolean value)
           
 void showSelectClassLink(boolean value)
           
 void showSingleProperty(java.lang.String propertySymname)
          Used for Intermediate Select Object page that provides the remove Object assignment link.
protected  org.w3c.dom.Document transformXML(org.w3c.dom.Document domSource, java.lang.String type)
          Merge mime type or container type to link xml.
 
Methods inherited from class com.filenet.wcm.toolkit.server.ui.WcmXSLModule
convertToNodeList, getXML, getXSLParameter, renderXSL, setXML, setXML, setXML, setXML, setXSL, setXSLParameter, setXSLParameter, setXSLParameter, setXSLParameter, setXSLParameter, setXSLParameter
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.WcmUiModule
getActive, getBasePath, getBaseUrl, getBaseURLBuilder, getControllerEventUrl, getControllerEventUrl, getEventFormFields, getEventFormFields, getEventFormTag, getEventFormTag, getEventUrl, getEventUrl, getEventUrl, getEventUrl, getFormSubmitUrl, getFormSubmitUrl, getGlobalEventUrl, getGlobalEventUrl, getPageUrl, getPageUrl, getPageUrl, getPageUrl, getUiParent, peekEvent, renderJSP, routeEvent, routeEvent, serverSideInclude, serverSideInclude, setActive, setJSP
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.GlobalEventModule
subscribeGlobalEvent
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.WcmModule
addChild, addChild, addChild, debugTrace, getClassProperty, getClassProperty, getClassPropertyKeys, getConfiguration, getController, getDataStore, getModuleProperty, getModuleProperty, getModuleProperty, getModuleProperty, getModulePropertyKeys, getName, getParent, getWindowProperty, getWindowProperty, persist, queryDataProvider, setClassProperty, setClassProperty, setController, setModuleProperty, setModuleProperty, setName, setParent, setPortletParent, setWindowProperty
 
Methods inherited from class com.filenet.wcm.toolkit.server.base.WcmDpContainer
addDataProvider, addDataProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.filenet.wcm.toolkit.server.base.WcmModuleInterface
addDataProvider, getDataStore, getModuleProperty, getName, getParent, persist, queryDataProvider, setController, setModuleProperty, setName, setParent
 

Field Detail

rootClassId

protected java.lang.String rootClassId

nType

protected int nType
Set this value in the constructor to one of the static ints defined above.


adp

protected com.filenet.wcm.toolkit.server.dp.WcmAuthoringDataProvider adp

aState

protected WcmAuthoringState aState

propCacheKey

protected java.lang.String propCacheKey

isInfoPage

protected boolean isInfoPage

exceptions

protected java.util.List exceptions

controller

protected com.filenet.wcm.toolkit.server.base.WcmController controller

classLabel

protected com.filenet.wcm.toolkit.server.util.prefs.PrefsLabel classLabel

showCompoundDocument

protected boolean showCompoundDocument
Constructor Detail

WcmPropertiesInfoPage

protected WcmPropertiesInfoPage()
                         throws java.lang.Exception
protected Constructor sets the default type, the name and creates the WcmPropertiesUtil object. Used internally.

Throws:
java.lang.Exception

WcmPropertiesInfoPage

public WcmPropertiesInfoPage(int type)
                      throws java.lang.Exception
Constructor sets the Property type to one of the static int values defined above.

Parameters:
type - One of the defined int field types.
Throws:
java.lang.Exception
Method Detail

initialize

public void initialize()
                throws java.lang.Exception
Initializes data providers, XSL parameters, the authoring state and other state values.

Specified by:
initialize in interface com.filenet.wcm.toolkit.server.base.WcmModuleInterface
Throws:
java.lang.Exception

onCollapse

public void onCollapse(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws java.lang.Exception
Handle Collapse on expanded object property

Parameters:
request - The request Object
response - The response Object
Throws:
java.lang.Exception

onExpand

public void onExpand(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws java.lang.Exception
Handle Expand on object Property

Parameters:
request - The request Object
response - The response Object
Throws:
java.lang.Exception

onSelectObject

public void onSelectObject(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws java.lang.Exception
Handle Select Object event. Redirects to the Select Object operation page for selecting a value for an object valued property.

Parameters:
request - The request Object
response - The response Object
Throws:
java.lang.Exception

onSetObject

public void onSetObject(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                 throws java.lang.Exception
Throws:
java.lang.Exception

onStartPage

public void onStartPage(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                 throws java.lang.Exception
Set XSL parameters and other setup before showing the property page.

Specified by:
onStartPage in interface com.filenet.wcm.toolkit.server.base.WcmUiModuleInterface
Parameters:
request - HttpServletRequest object
response - HttpServletResponse object
Throws:
java.lang.Exception

getShowCompoundDocument

protected boolean getShowCompoundDocument(java.lang.String classId)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

onAddChild

public void onAddChild(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws java.lang.Exception
Throws:
java.lang.Exception

onShowChildren

public void onShowChildren(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws java.lang.Exception
Throws:
java.lang.Exception

onUpdateChild

public void onUpdateChild(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                   throws java.lang.Exception
Throws:
java.lang.Exception

setReadOnly

public void setReadOnly(boolean bReadOnly)
                 throws java.lang.Exception
Pass true to set this property page as read only.

Parameters:
bReadOnly - Value desired for read only.
Throws:
java.lang.Exception

showSingleProperty

public void showSingleProperty(java.lang.String propertySymname)
                        throws java.lang.Exception
Used for Intermediate Select Object page that provides the remove Object assignment link. This will cause the property page to show only the indicated property.

Parameters:
propertySymname - The symbolic name of the property to show.
Throws:
java.lang.Exception

removeSingleProperty

public void removeSingleProperty()
                          throws java.lang.Exception
Provides the mechanism for removing a single property value.

Throws:
java.lang.Exception

render

public void render(java.io.Writer w)
            throws java.lang.Exception
Renders the properties.

Specified by:
render in interface com.filenet.wcm.toolkit.server.base.WcmUiModuleInterface
Parameters:
w - Writer object to write to.
Throws:
java.lang.Exception

getPropertiesXML

protected org.w3c.dom.Document getPropertiesXML()
                                         throws java.lang.Exception
Gets the Document interface on the properties XML. Also sets the class property for the output XML.

Returns:
The property descriptions xml.
Throws:
java.lang.Exception

getOutputXML

protected org.w3c.dom.Document getOutputXML()
                                     throws java.lang.Exception
Gets the Document interface on the properties XML

Returns:
The output xml.
Throws:
java.lang.Exception

getFormName

public java.lang.String getFormName()
Overridden to return the form name used so wizard navigation will submit it.

Specified by:
getFormName in interface com.filenet.wcm.toolkit.server.base.WcmUiModuleInterface
Returns:
Returns the form name.

setFormName

public void setFormName(java.lang.String formName)
Sets the form name string

Parameters:
formName - String

onGetInfo

public void onGetInfo(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws java.lang.Exception
Throws:
java.lang.Exception

onChangePage

public void onChangePage(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws java.lang.Exception
Used by links to redirect to secondary property pages after it submits the form by calling onSubmit.

Parameters:
request - HttpServletRequest object
response - HttpServletResponse object
Throws:
java.lang.Exception

initializePropertiesWithCommandXml

public void initializePropertiesWithCommandXml(javax.servlet.http.HttpServletRequest request,
                                               javax.servlet.http.HttpServletResponse response)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

onSubmit

public void onSubmit(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws java.lang.Exception
This event updates the output XML from the request data.

Parameters:
request - HttpServletRequest object
response - HttpServletResponse object
Throws:
java.lang.Exception

onSystemProperties

public void onSystemProperties(javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response)
                        throws java.lang.Exception
Throws:
java.lang.Exception

panelInitClientProperties

public void panelInitClientProperties(javax.servlet.http.HttpServletRequest request,
                                      javax.servlet.http.HttpServletResponse response)
                               throws java.lang.Exception
Called only when in App Integration/Client mode. Initializes the properties page with any propertiesXml parameters that are provided as property values.

Parameters:
request - HttpServletRequest object
response - HttpServletResponse object
Throws:
java.lang.Exception

panelSave

public void panelSave(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws java.lang.Exception
Calls onSubmit

Specified by:
panelSave in interface com.filenet.wcm.toolkit.server.base.WcmPanelInterface
Parameters:
request - HttpServletRequest object
response - HttpServletResponse object
Throws:
java.lang.Exception

panelValidate

public boolean panelValidate()
                      throws java.lang.Exception
Validates the properties

Specified by:
panelValidate in interface com.filenet.wcm.toolkit.server.base.WcmPanelValidationInterface
Returns:
true if no exception is thrown
Throws:
java.lang.Exception

pageValidate

public boolean pageValidate()
                     throws java.lang.Exception
Validates the properties but this method don't display error stack.

Returns:
true if we have all requried properties, false otherwise.
Throws:
java.lang.Exception

getExceptions

public java.util.List getExceptions()

getValidationErrors

public java.util.Iterator getValidationErrors()
Unused.

Specified by:
getValidationErrors in interface com.filenet.wcm.toolkit.server.base.WcmPanelValidationInterface
Returns:
null

panelFinish

public void panelFinish(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                 throws java.lang.Exception
Calls setProperties on the object.

Specified by:
panelFinish in interface com.filenet.wcm.toolkit.server.base.WcmPanelInterface
Parameters:
request - HttpServletRequest object
response - HttpServletResponse object
Throws:
java.lang.Exception

cleanup

public void cleanup()
             throws java.lang.Exception
Cleanup module properties

Specified by:
cleanup in interface com.filenet.wcm.toolkit.server.base.WcmModuleInterface
Throws:
java.lang.Exception

reset

public void reset()
           throws java.lang.Exception
Resets data provider and module properties.

Throws:
java.lang.Exception

isModified

public boolean isModified()
                   throws java.lang.Exception
Indicates that the state has changed as a result of a wizardSave call.

Specified by:
isModified in interface com.filenet.wcm.toolkit.server.base.WcmViewPanelInterface
Returns:
true if page's state has changed.
Throws:
java.lang.Exception

isApplyButtonRequired

public boolean isApplyButtonRequired()
                              throws java.lang.Exception
Tells the Info page if it should put up an Apply button.

Specified by:
isApplyButtonRequired in interface com.filenet.wcm.toolkit.server.base.WcmViewPanelInterface
Returns:
true.
Throws:
java.lang.Exception

transformXML

protected org.w3c.dom.Document transformXML(org.w3c.dom.Document domSource,
                                            java.lang.String type)
                                     throws java.lang.Exception
Merge mime type or container type to link xml.

Parameters:
domSource - Folder contents DOM object
Returns:
Merged property DOM object.
Throws:
java.lang.Exception

setSelectedClass

public void setSelectedClass(java.lang.String newClassId)
                      throws java.lang.Exception
Set the select class. Updates the output xml with selected class and class properties. The class description xml and object store name must be already loaded into the module properties.

Parameters:
newClassId - String new object class id
Throws:
java.lang.Exception

onSetClass

public void onSetClass(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws java.lang.Exception
Throws:
java.lang.Exception

getClassName

public java.lang.String getClassName()
                              throws java.lang.Exception
Provides the class name for display.

Returns:
The chosen class name.
Throws:
java.lang.Exception

showSelectClassLink

public void showSelectClassLink(boolean value)
                         throws java.lang.Exception
Throws:
java.lang.Exception

setRootClass

public void setRootClass(java.lang.String classId)
                  throws java.lang.Exception
Throws:
java.lang.Exception

showCompoundDocument

public void showCompoundDocument(boolean value)
                          throws java.lang.Exception
Throws:
java.lang.Exception


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.