com.wewebu.ow.server.dmsdialogs.views
Class OwPolicyLevelView

java.lang.Object
  extended by com.wewebu.ow.server.ui.OwEventTarget
      extended by com.wewebu.ow.server.ui.OwView
          extended by com.wewebu.ow.server.dmsdialogs.views.OwPolicyLevelView
All Implemented Interfaces:
OwBaseView, OwUpdateTarget

public class OwPolicyLevelView
extends OwView

Displays and edits the policies of a given OwPermissionCollection.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Nested Class Summary
 class OwPolicyLevelView.OwPolicyViewItem
          List box item policy item.Used to provide unique IDs for OwPolicy objects
 
Field Summary
static int MESSAGE_REGION
           
static int SELECT_ALL_POLICIES_REGION
           
 
Fields inherited from class com.wewebu.ow.server.ui.OwView
CURRENT_MODULE_KEY, FORMULAR_PLACEHOLDER_END_DELIMITER, FORMULAR_PLACEHOLDER_START_DELIMITER, m_externalFormEventTarget
 
Fields inherited from interface com.wewebu.ow.server.ui.OwBaseView
EMPTY_STRING
 
Constructor Summary
OwPolicyLevelView(OwUIGenericAccessRightsModul accessRightsView_p, OwUserInfo userInfo_p, boolean readonly_p)
          Constructor
OwPolicyLevelView(OwUIGenericAccessRightsModul accessRightsView_p, OwUserInfo userInfo_p, boolean readonly_p, boolean forceLiveUpdate_p)
          Constructor
 
Method Summary
 boolean canAddMultiPolicy()
           
 boolean canSetPolicies()
           
 void clearOwnedItems()
          Clears the HTML policy items this view owns and reinitializes the unique ID generator index m_lastItemId
 String createAddEventURL()
           
protected  OwPolicyLevelView.OwPolicyViewItem createPolicyItem(OwPolicy policy_p, boolean selected_p)
           
protected  List createPolicyItems(Collection policies_p, Collection selectedPolicies_p)
           
protected  OwPolicyLevelDocument createPolicyLevelDocument(OwPermissionsDocument permissionsDocument_p)
          (overridable)
 String createRemoveEventURL()
           
 String getAllListId()
           
 List getAllPolicyItems()
           
 String getAvailableListId()
           
 List getAvailablePolicyItems()
           
 OwPolicyLevelDocument getDocument()
          gets the reference to the document
 String getEffectiveListId()
           
 List getEffectivePolicyItems()
           
protected  OwPermissionCollection getPermissions()
           
 boolean isForceLiveUpdate()
           
 boolean isReadonly()
           
 void onAdd(javax.servlet.http.HttpServletRequest request_p)
           
 void onRemove(javax.servlet.http.HttpServletRequest request_p)
           
protected  void onRender(Writer w_p)
          called when the view should create its HTML content to be displayed
 void onSave(javax.servlet.http.HttpServletRequest request_p, Object reason_p)
          OnSave OwUIGenericAccessRightsModul delegate for non live updating policy views.
protected  void renderMessageRegion(Writer w_p)
          Render the message.
 void renderRegion(Writer w_p, int region_p)
          render only a region in the view, used by derived classes
 void renderSelectAllPolicies(Writer w_p)
          Renders a HTML select for all available policies using the context defined combo renderer.
 void setMessage(String message_p)
          Set the message to be displayed in the message region.
 void setReadOnly(boolean readOnly_p)
           
 
Methods inherited from class com.wewebu.ow.server.ui.OwView
activate, addView, detach, getBreadcrumbPart, getExternalFormEventTarget, getFormName, getFormTarget, getIcon, getIterator, getMaximizeView, getParent, getRenderedNamedRegion, getRenderedRegion, getTitle, getViewList, init, isFormTargetExternal, isNamedRegion, isRegion, isShowMaximized, isShowMinimized, isShowNormal, onActivate, onUpdate, render, renderHTMLFormular, renderNamedRegion, serverSideDesignInclude, serverSideInclude, setDocument, setExternalFormTarget, setMaximizeView, setParent, showMaximized, showMinimized, showNormal, usesFormWithAttributes
 
Methods inherited from class com.wewebu.ow.server.ui.OwEventTarget
attach, disableRequestListener, enableRequestListener, getAjaxEventURL, getContext, getEventURL, getFormEventFunction, getFormEventURL, getID, onExternalRequest, onFormEvent, onRequest, updateExternalFormTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECT_ALL_POLICIES_REGION

public static final int SELECT_ALL_POLICIES_REGION
See Also:
Constant Field Values

MESSAGE_REGION

public static final int MESSAGE_REGION
See Also:
Constant Field Values
Constructor Detail

OwPolicyLevelView

public OwPolicyLevelView(OwUIGenericAccessRightsModul accessRightsView_p,
                         OwUserInfo userInfo_p,
                         boolean readonly_p)
Constructor

Parameters:
accessRightsView_p -
userInfo_p -
readonly_p - true if this policies can't be edited
Since:
4.0.0.0

OwPolicyLevelView

public OwPolicyLevelView(OwUIGenericAccessRightsModul accessRightsView_p,
                         OwUserInfo userInfo_p,
                         boolean readonly_p,
                         boolean forceLiveUpdate_p)
Constructor

Parameters:
accessRightsView_p -
userInfo_p -
forceLiveUpdate_p - if true the policy view will update the server data using its own triggers (not through save menu buttons)
readonly_p - true if this policies can't be edited
Since:
4.0.0.0
Method Detail

createPolicyLevelDocument

protected OwPolicyLevelDocument createPolicyLevelDocument(OwPermissionsDocument permissionsDocument_p)
(overridable)

Parameters:
permissionsDocument_p -
Returns:
the document of this view
Since:
4.0.0.0

isForceLiveUpdate

public boolean isForceLiveUpdate()

getDocument

public OwPolicyLevelDocument getDocument()
Description copied from class: OwView
gets the reference to the document

Overrides:
getDocument in class OwView
Returns:
document instance

getPermissions

protected OwPermissionCollection getPermissions()

canSetPolicies

public boolean canSetPolicies()

canAddMultiPolicy

public boolean canAddMultiPolicy()

getEffectivePolicyItems

public List getEffectivePolicyItems()

getAvailablePolicyItems

public List getAvailablePolicyItems()

getAllPolicyItems

public List getAllPolicyItems()

createPolicyItems

protected List createPolicyItems(Collection policies_p,
                                 Collection selectedPolicies_p)

createPolicyItem

protected OwPolicyLevelView.OwPolicyViewItem createPolicyItem(OwPolicy policy_p,
                                                              boolean selected_p)

clearOwnedItems

public void clearOwnedItems()
Clears the HTML policy items this view owns and reinitializes the unique ID generator index m_lastItemId


createAddEventURL

public String createAddEventURL()

createRemoveEventURL

public String createRemoveEventURL()

onAdd

public void onAdd(javax.servlet.http.HttpServletRequest request_p)
           throws Exception
Throws:
Exception

onRemove

public void onRemove(javax.servlet.http.HttpServletRequest request_p)
              throws Exception
Throws:
Exception

getEffectiveListId

public String getEffectiveListId()
Returns:
the HTML name/id of the effective policies list

getAvailableListId

public String getAvailableListId()
Returns:
the HTML name/id of the available policies list

getAllListId

public String getAllListId()
Returns:
the HTML name/id of the all policies list

onRender

protected void onRender(Writer w_p)
                 throws Exception
Description copied from class: OwView
called when the view should create its HTML content to be displayed

Overrides:
onRender in class OwView
Parameters:
w_p - Writer object to write HTML to
Throws:
Exception

renderSelectAllPolicies

public void renderSelectAllPolicies(Writer w_p)
                             throws Exception
Renders a HTML select for all available policies using the context defined combo renderer.

Parameters:
w_p -
Throws:
Exception
Since:
3.1.0.0

renderRegion

public void renderRegion(Writer w_p,
                         int region_p)
                  throws Exception
Description copied from class: OwView
render only a region in the view, used by derived classes

Specified by:
renderRegion in interface OwBaseView
Overrides:
renderRegion in class OwView
Parameters:
w_p - Writer object to write HTML to
region_p - ID of the region to render
Throws:
Exception

renderMessageRegion

protected void renderMessageRegion(Writer w_p)
                            throws Exception
Render the message.

Parameters:
w_p - - the writer
Throws:
Exception
Since:
3.1.0.0

isReadonly

public final boolean isReadonly()

setReadOnly

public final void setReadOnly(boolean readOnly_p)
Parameters:
readOnly_p - true if the policy view should be read-only, false otherwise.
Since:
3.1.0.0

onSave

public void onSave(javax.servlet.http.HttpServletRequest request_p,
                   Object reason_p)
            throws OwException
OnSave OwUIGenericAccessRightsModul delegate for non live updating policy views.

Parameters:
request_p -
reason_p -
Throws:
OwException
Since:
3.1.0.0

setMessage

public void setMessage(String message_p)
Set the message to be displayed in the message region.

Parameters:
message_p - - the message (can be null - nothing is displayed).
Since:
3.1.0.0


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.