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

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.OwPrivilegesView
All Implemented Interfaces:
OwBaseView, OwDialog.OwDialogListener, OwUpdateTarget, EventListener

public class OwPrivilegesView
extends OwView
implements OwDialog.OwDialogListener

Displays and edits the privileges 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


Field Summary
static String PRIVILEGES_PARAM
           
 
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
OwPrivilegesView(OwUIGenericAccessRightsModul accessRightsView_p, boolean forceLiveUpdate_p)
           
OwPrivilegesView(OwUIGenericAccessRightsModul accessRightsView_p, Map<String,String> privilegeDisplayNames_p, boolean forceLiveUpdate_p)
           
 
Method Summary
protected  OwAddPrivilegeDialog createAddPrivilegeDialog()
          (overridable) Create a dialog which provide the possibility to create new privilege entry.
protected  OwPrivilegesDocument createPrivilegesDocument(OwPermissionsDocument permissionsDocument_p, Map<String,String> privilegeDisplayNames_p)
          (overridable) Factory method to create the document which will be used by the current instance.
 OwPrivilegesDocument getDocument()
          gets the reference to the document
 String getMessage()
          Get the message which should be displayed.
protected  void init()
          init the target after the context is set.
 boolean isReadOnly()
           
 boolean liveUpdate()
          Return if live update is enabled or not.
 void onDialogClose(OwDialog dialogView_p)
          called if the Dialog that was opened by this view closes
 void onOpenAddDialog(javax.servlet.http.HttpServletRequest request_p)
          Handler to open add privilege dialog, called from JSP.
 void onRemovePrivileges(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 privileges views.
 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, isFormTargetExternal, isNamedRegion, isRegion, isShowMaximized, isShowMinimized, isShowNormal, onActivate, onUpdate, render, renderHTMLFormular, renderNamedRegion, renderRegion, 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
 
Methods inherited from interface com.wewebu.ow.server.ui.OwUpdateTarget
onUpdate
 

Field Detail

PRIVILEGES_PARAM

public static final String PRIVILEGES_PARAM
See Also:
Constant Field Values
Constructor Detail

OwPrivilegesView

public OwPrivilegesView(OwUIGenericAccessRightsModul accessRightsView_p,
                        boolean forceLiveUpdate_p)

OwPrivilegesView

public OwPrivilegesView(OwUIGenericAccessRightsModul accessRightsView_p,
                        Map<String,String> privilegeDisplayNames_p,
                        boolean forceLiveUpdate_p)
Method Detail

createPrivilegesDocument

protected OwPrivilegesDocument createPrivilegesDocument(OwPermissionsDocument permissionsDocument_p,
                                                        Map<String,String> privilegeDisplayNames_p)
(overridable) Factory method to create the document which will be used by the current instance.

Parameters:
permissionsDocument_p -
privilegeDisplayNames_p -
Returns:
OwPrivilegesDocument

init

protected void init()
             throws Exception
Description copied from class: OwView
init the target after the context is set.

Overrides:
init in class OwView
Throws:
Exception

getDocument

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

Overrides:
getDocument in class OwView
Returns:
document instance

onSave

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

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

setReadOnly

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

isReadOnly

public boolean isReadOnly()
Returns:
the read only flag
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

getMessage

public String getMessage()
Get the message which should be displayed.

Returns:
String message, or null if not set
Since:
3.1.0.3

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

onRemovePrivileges

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

onOpenAddDialog

public void onOpenAddDialog(javax.servlet.http.HttpServletRequest request_p)
                     throws OwException
Handler to open add privilege dialog, called from JSP.

Parameters:
request_p - a HttpServletRequest object
Throws:
OwException - if could not create or open dialog
Since:
3.2.0.0

createAddPrivilegeDialog

protected OwAddPrivilegeDialog createAddPrivilegeDialog()
                                                 throws OwException
(overridable) Create a dialog which provide the possibility to create new privilege entry.

Returns:
OwAddPrivilegeDialog
Throws:
OwException
Since:
3.2.0.0

onDialogClose

public void onDialogClose(OwDialog dialogView_p)
                   throws Exception
Description copied from interface: OwDialog.OwDialogListener
called if the Dialog that was opened by this view closes

Specified by:
onDialogClose in interface OwDialog.OwDialogListener
Parameters:
dialogView_p - the Dialog that closed.
Throws:
Exception

liveUpdate

public boolean liveUpdate()
Return if live update is enabled or not.

Returns:
boolean
Since:
3.2.0.0


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.