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

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.WcmSecurityInfoPage
All Implemented Interfaces:
com.filenet.wcm.toolkit.server.base.WcmModuleInterface, com.filenet.wcm.toolkit.server.base.WcmPanelInterface, com.filenet.wcm.toolkit.server.base.WcmUiModuleInterface, com.filenet.wcm.toolkit.server.base.WcmViewPanelInterface
Direct Known Subclasses:
WcmEntrySecurityInfoPage

public class WcmSecurityInfoPage
extends com.filenet.wcm.toolkit.server.ui.WcmXSLModule
implements com.filenet.wcm.toolkit.server.base.WcmViewPanelInterface

The WcmSecurityInfoPage class displays the security for document, folder or stored search/publish template objects. It uses the WcmSecurityInfoPage.xsl to display the security data returned by the WcmAuthoringDataProvider. This class uses the WcmSecurityUtil class extensively to compute and process the security data.


Field Summary
protected  int mode
           
 
Fields inherited from class com.filenet.wcm.toolkit.server.ui.WcmXSLModule
transformUtil
 
Fields inherited from class com.filenet.wcm.toolkit.server.base.WcmModule
NAME_DELIMITER
 
Constructor Summary
WcmSecurityInfoPage()
          Create a new WcmSecurityInfoPage object for displaying the object security data.
WcmSecurityInfoPage(int mode)
          Constructor sets the WcmSecurityInfoPage mode to one of the static int values defined by the WcmPageMode.
 
Method Summary
 void cleanup()
          Cleans up session data to reduce resource usage.
protected  org.w3c.dom.Document getClassPermissionXML(boolean refresh)
          Add Entry template uses this method to prevent refreshing of security data.
 java.lang.String getFormName()
          Returns the form name used by the WcmSecurityInfoPage UI so that the wizard navigation can use the same form name to submit events.
 java.lang.String getSecurityPolicyId()
          Returns the security policy id associated with the selected object.
 WcmSecurityPolicyModule getSecurityPolicyModule()
          Accessor method to return the WcmSecurityPolicyModule object.
 WcmSecurityUtil getSecurityUtil()
          Accessor method to return the WcmSecurityUtil object.
 void initialize()
          Initializes data providers, XSL parameters, the authoring state, and other state values.
 boolean isApplyButtonRequired()
          Returns true to indicate the WcmSecurityInfoPage is not readonly and an apply button is required.
 boolean isModified()
          Returns true if the WcmSecurityInfoPage has been changed by the user.
 void onAddNew(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles the Add New event triggered by the user selecting the Add New link on the summary page
 void onNewGranteeAdded(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles the New Grantee Added event triggered by the user selecting users from the Select Grantees page.
 void onPageChange(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles the Page Change event triggered by the user selecting a new page.
 void onReturn(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles the Return event triggered when the user returns from the security secondary page.
 void onSelectItem(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles the Select Item event triggered by the user selecting a user or group from the active current permission setting list.
 void onSelectRemove(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles the Select Remove event triggered by the user selecting the Remove Checkbox.
 void onStartPage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles the Start Page event triggered by the controller.
 void panelFinish(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles the panelFinish event.
 void panelSave(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles the panelSave event.
 void render(java.io.Writer w)
          Renders the WcmSecurityInfoPage Module HTML.
 void reset()
          Resets module data to its initial state.
 void setReadOnly(boolean bReadOnly)
          Set the WcmSecurityInfoPage to read only state.
 void setSecurityPolicyId(java.lang.String securityPolicyId)
          Set the security policy id.
 
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

mode

protected int mode
Constructor Detail

WcmSecurityInfoPage

public WcmSecurityInfoPage()
                    throws java.lang.Exception
Create a new WcmSecurityInfoPage object for displaying the object security data.

Throws:
java.lang.Exception - All errors.

WcmSecurityInfoPage

public WcmSecurityInfoPage(int mode)
                    throws java.lang.Exception
Constructor sets the WcmSecurityInfoPage mode to one of the static int values defined by the WcmPageMode.

Parameters:
mode - int specifying the operation mode
Throws:
java.lang.Exception - All errors.
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 - All errors.

getFormName

public java.lang.String getFormName()
Returns the form name used by the WcmSecurityInfoPage UI so that the wizard navigation can use the same form name to submit events.

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

onStartPage

public void onStartPage(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                 throws java.lang.Exception
Handles the Start Page event triggered by the controller.

The selected ids are verified and the security info page is initialized with the new selected ids.

Specified by:
onStartPage in interface com.filenet.wcm.toolkit.server.base.WcmUiModuleInterface
Parameters:
request - The Java™Server Pages (JSP) request object.
response - The JSP response object.
Throws:
java.lang.Exception - All errors.

onSelectItem

public void onSelectItem(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws java.lang.Exception
Handles the Select Item event triggered by the user selecting a user or group from the active current permission setting list.

The selected granteeName and granteeType are retrieved and then redirected to the WcmSecurityAccessSelect page. The WcmSecurityAccessSelect page allows the user to view the detail of the selected grantee security access right and also allows the user to modify the security access rights.

Parameters:
request - The JSP request object.
response - The JSP response object.
Throws:
java.lang.Exception - All errors.

onSelectRemove

public void onSelectRemove(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws java.lang.Exception
Handles the Select Remove event triggered by the user selecting the Remove Checkbox.

The selected grantee is marked for removal if it is not yet marked. Otherwise the selected grantee is restored back to modified state. This method uses the WcmSecurityUtil module to set the grantee's state.

Parameters:
request - The JSP request object.
response - The JSP response object.
Throws:
java.lang.Exception - All errors.

onPageChange

public void onPageChange(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws java.lang.Exception
Handles the Page Change event triggered by the user selecting a new page.

Parameters:
request - The JSP request object.
response - The JSP response object.
Throws:
java.lang.Exception - All errors.

onAddNew

public void onAddNew(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws java.lang.Exception
Handles the Add New event triggered by the user selecting the Add New link on the summary page

Parameters:
request - The JSP request object.
Throws:
java.lang.Exception - All errors.

onNewGranteeAdded

public void onNewGranteeAdded(javax.servlet.http.HttpServletRequest request,
                              javax.servlet.http.HttpServletResponse response)
                       throws java.lang.Exception
Handles the New Grantee Added event triggered by the user selecting users from the Select Grantees page.

The selected grantee is added to the permission XML.

Parameters:
request - The JSP request object.
response - The JSP response object.
Throws:
java.lang.Exception - All errors.

render

public void render(java.io.Writer w)
            throws java.lang.Exception
Renders the WcmSecurityInfoPage Module HTML.

Data is retrieved from the WcmAuthoringDataProvider and all XSL parameter are set for the XSL rendering process. The security user interface is rendered using XSLT and sent back to the client.

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

cleanup

public void cleanup()
             throws java.lang.Exception
Cleans up session data to reduce resource usage.

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

panelSave

public void panelSave(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws java.lang.Exception
Handles the panelSave event.

Any changes to the security policy during the add and checkin document wizard are saved to the properties xml.

Specified by:
panelSave in interface com.filenet.wcm.toolkit.server.base.WcmPanelInterface
Parameters:
request - The JSP request object.
response - The JSP response object.
Throws:
java.lang.Exception - All errors.

panelFinish

public void panelFinish(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                 throws java.lang.Exception
Handles the panelFinish event.

Any changes to the security will be saved to the repository using the WcmAuthoringDataProvider module. Data is refetched from the repository after save.

Only use in INFO_MODE.

Specified by:
panelFinish in interface com.filenet.wcm.toolkit.server.base.WcmPanelInterface
Parameters:
request - The JSP request object.
response - The JSP response object.
Throws:
java.lang.Exception - All errors.

isModified

public boolean isModified()
                   throws java.lang.Exception
Returns true if the WcmSecurityInfoPage has been changed by the user.

Specified by:
isModified in interface com.filenet.wcm.toolkit.server.base.WcmViewPanelInterface
Returns:
Boolean true or false.
Throws:
java.lang.Exception - All errors.

isApplyButtonRequired

public boolean isApplyButtonRequired()
                              throws java.lang.Exception
Returns true to indicate the WcmSecurityInfoPage is not readonly and an apply button is required.

Specified by:
isApplyButtonRequired in interface com.filenet.wcm.toolkit.server.base.WcmViewPanelInterface
Returns:
boolean true or false.
Throws:
java.lang.Exception - All errors.

getSecurityUtil

public WcmSecurityUtil getSecurityUtil()
                                throws java.lang.Exception
Accessor method to return the WcmSecurityUtil object.

Returns:
WcmSecurityUtil object.
Throws:
java.lang.Exception - All errors.

getSecurityPolicyId

public java.lang.String getSecurityPolicyId()
                                     throws java.lang.Exception
Returns the security policy id associated with the selected object.

Returns:
String The security policy id.
Throws:
java.lang.Exception - All errors.

setReadOnly

public void setReadOnly(boolean bReadOnly)
                 throws java.lang.Exception
Set the WcmSecurityInfoPage to read only state.

Parameters:
bReadOnly - True or false
Throws:
java.lang.Exception - All errors.

setSecurityPolicyId

public void setSecurityPolicyId(java.lang.String securityPolicyId)
                         throws java.lang.Exception
Set the security policy id.

Parameters:
securityPolicyId - The new security policy id.
Throws:
java.lang.Exception - All errors.

getClassPermissionXML

protected org.w3c.dom.Document getClassPermissionXML(boolean refresh)
                                              throws java.lang.Exception
Add Entry template uses this method to prevent refreshing of security data. The Enty Template Add wizard overrides this method to set the class permissions accordingly.

Parameters:
refresh - Get fresh data from servers.
Returns:
The class permission xml.
Throws:
java.lang.Exception

reset

public void reset()
           throws java.lang.Exception
Resets module data to its initial state.

Throws:
java.lang.Exception - All errors.

onReturn

public void onReturn(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws java.lang.Exception
Handles the Return event triggered when the user returns from the security secondary page.

Parameters:
request - The JSP request object.
response - The JSP response object.
Throws:
java.lang.Exception - All errors.

getSecurityPolicyModule

public WcmSecurityPolicyModule getSecurityPolicyModule()
                                                throws java.lang.Exception
Accessor method to return the WcmSecurityPolicyModule object.

Returns:
WcmSecurityPolicyModule object.
Throws:
java.lang.Exception - All errors.


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