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

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.ecm.ui.OwUISubModul<N>
              extended by com.wewebu.ow.server.ecm.ui.OwUIAccessRightsModul
                  extended by com.wewebu.ow.server.dmsdialogs.views.OwUIGenericAccessRightsModul
All Implemented Interfaces:
OwBaseView, OwUpdateTarget

public class OwUIGenericAccessRightsModul
extends OwUIAccessRightsModul

Generic access rights module. Displays two navigation tabs (policies and privileges) the permissions of a given object. In case that only one of the navigation tabs should be displayed, no tabs are rendered. Also uses the underlying objects and permissions methods to perform the editing of the given permissions.

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 int BOTH
           
static int POLICIES_ONLY
           
static int PRIVILEGES_ONLY
           
 
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
OwUIGenericAccessRightsModul(OwNetwork network_p, OwObject object_p)
           
OwUIGenericAccessRightsModul(OwNetwork network_p, OwObject object_p, int views_p)
          Constructor
OwUIGenericAccessRightsModul(OwNetwork network_p, OwObject object_p, String policyViewTitle_p, String privilegesViewTitle_p, int views_p)
          Constructor
OwUIGenericAccessRightsModul(OwNetwork network_p, OwObject object_p, String policyViewTitle_p, String privilegesViewTitle_p, Map<String,String> privilegeDisplayNames_p, int views_p)
          Constructor
 
Method Summary
protected  OwSubNavigationView createNavigationView()
          (overridable) OwSubNavigationView factory method.
protected  OwPolicyLevelView createPolicyLevelView()
          (overridable) OwPolicyLevelView factory method.
protected  OwPrivilegesView createPrivilegesView()
          (overridable) OwPrivilegesView factory method.
 OwPermissionsDocument getDocument()
          gets the reference to the document
 OwMenu getMenu()
          get the menu of the access rights module
protected  OwObject getObject()
          Deprecated. since 4.0.0.0 use the view's OwPermissionsDocument
protected  Map<String,String> getPrivilegeDisplayNames()
          Return the display names which represents the native privilege to display names.
protected  void init()
          init the target after the context is set.
 void init(OwNetwork theNetwork_p)
          set the base URL to the page
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 form action handler
 void setACLViewMessage(String message_p)
          Setter for OwPrivilegesView message
 void setPolicyViewMessage(String message_p)
          Setter for OwPolicyLevelView message
 void setReadOnly(boolean readOnly_p)
          make the access rights view read-only
protected  String usesFormWithAttributes()
          to get additional form attributes used for the form override if your view needs a form.
 
Methods inherited from class com.wewebu.ow.server.ecm.ui.OwUIAccessRightsModul
getLiveUpdate, setLiveUpdate
 
Methods inherited from class com.wewebu.ow.server.ecm.ui.OwUISubModul
getNetwork
 
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
 
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

POLICIES_ONLY

public static final int POLICIES_ONLY
See Also:
Constant Field Values

PRIVILEGES_ONLY

public static final int PRIVILEGES_ONLY
See Also:
Constant Field Values

BOTH

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

OwUIGenericAccessRightsModul

public OwUIGenericAccessRightsModul(OwNetwork network_p,
                                    OwObject object_p)
                             throws OwException
Throws:
OwException

OwUIGenericAccessRightsModul

public OwUIGenericAccessRightsModul(OwNetwork network_p,
                                    OwObject object_p,
                                    int views_p)
                             throws OwException
Constructor

Parameters:
network_p - the OwNetwork of this module
object_p - the OwObject to display and/or edit the permissions for.
views_p - one of POLICIES_ONLY, PRIVILEGES_ONLY or BOTH
Throws:
OwException
Since:
3.2.0.0

OwUIGenericAccessRightsModul

public OwUIGenericAccessRightsModul(OwNetwork network_p,
                                    OwObject object_p,
                                    String policyViewTitle_p,
                                    String privilegesViewTitle_p,
                                    int views_p)
                             throws OwException
Constructor

Parameters:
network_p - the OwNetwork of this module
object_p - the OwObject to display and/or edit the permissions for.
policyViewTitle_p - title of the policy tab
privilegesViewTitle_p - tite of the privileges view tab
views_p - one of POLICIES_ONLY, PRIVILEGES_ONLY or BOTH
Throws:
OwException
Since:
3.1.0.0

OwUIGenericAccessRightsModul

public OwUIGenericAccessRightsModul(OwNetwork network_p,
                                    OwObject object_p,
                                    String policyViewTitle_p,
                                    String privilegesViewTitle_p,
                                    Map<String,String> privilegeDisplayNames_p,
                                    int views_p)
                             throws OwException
Constructor

Parameters:
network_p - the OwNetwork of this module
object_p - the OwObject to display and/or edit the permissions for.
policyViewTitle_p - title of the policy tab
privilegesViewTitle_p - tite of the privileges view tab
views_p - one of POLICIES_ONLY, PRIVILEGES_ONLY or BOTH
privilegeDisplayNames_p - display name of privileges mapped by name (can be null)
Throws:
OwException
Since:
3.2.0.0
Method Detail

init

public void init(OwNetwork theNetwork_p)
          throws OwException
Description copied from class: OwUISubModul
set the base URL to the page

Overrides:
init in class OwUISubModul
Parameters:
theNetwork_p - reference to the ECM Adapter
Throws:
OwException

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

setReadOnly

public void setReadOnly(boolean readOnly_p)
Description copied from class: OwUIAccessRightsModul
make the access rights view read-only

Specified by:
setReadOnly in class OwUIAccessRightsModul
Parameters:
readOnly_p - true = user can only view the access rights, false = user can edit the access rights (default)

createPolicyLevelView

protected OwPolicyLevelView createPolicyLevelView()
                                           throws Exception
(overridable) OwPolicyLevelView factory method.

Returns:
an OwPolicyLevelView to be used within this module
Throws:
Exception

createPrivilegesView

protected OwPrivilegesView createPrivilegesView()
                                         throws Exception
(overridable) OwPrivilegesView factory method.

Returns:
an OwPrivilegesView to be used within this module
Throws:
Exception

createNavigationView

protected OwSubNavigationView createNavigationView()
(overridable) OwSubNavigationView factory method.

Returns:
an OwSubNavigationView to be used within this module to display the policies and the privileges views

usesFormWithAttributes

protected String usesFormWithAttributes()
Description copied from class: OwView
to get additional form attributes used for the form override if your view needs a form. Base class will then render a form automatically

Overrides:
usesFormWithAttributes in class OwView
Returns:
String with form attributes, or null if view does not render a form

getMenu

public OwMenu getMenu()
Description copied from class: OwUIAccessRightsModul
get the menu of the access rights module

Overrides:
getMenu in class OwUIAccessRightsModul
Returns:
OwMenu or null if not defined

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

onSave

public void onSave(javax.servlet.http.HttpServletRequest request_p,
                   Object reason_p)
            throws Exception
OnSave form action handler

Parameters:
request_p -
reason_p -
Throws:
Exception

setPolicyViewMessage

public void setPolicyViewMessage(String message_p)
Setter for OwPolicyLevelView message

Parameters:
message_p - - the message
Since:
3.1.0.0

setACLViewMessage

public void setACLViewMessage(String message_p)
Setter for OwPrivilegesView message

Parameters:
message_p - - the message
Since:
3.1.0.0

getPrivilegeDisplayNames

protected Map<String,String> getPrivilegeDisplayNames()
Return the display names which represents the native privilege to display names.

Returns:
Map of Strings, native name to display name
Since:
3.2.0.0

getDocument

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

Overrides:
getDocument in class OwView
Returns:
document instance

getObject

protected final OwObject getObject()
Deprecated. since 4.0.0.0 use the view's OwPermissionsDocument

Return current work object.

Returns:
OwObject
Since:
3.2.0.0


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.