Class CmsPermissionView

java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractComponentContainer
com.vaadin.ui.AbstractLayout
com.vaadin.ui.CssLayout
org.opencms.ui.dialogs.permissions.CmsPermissionView
All Implemented Interfaces:
com.vaadin.event.ContextClickEvent.ContextClickNotifier, com.vaadin.event.LayoutEvents.LayoutClickNotifier, com.vaadin.event.MethodEventSource, com.vaadin.server.ClientConnector, com.vaadin.server.Sizeable, com.vaadin.shared.Connector, com.vaadin.ui.Component, com.vaadin.ui.ComponentContainer, com.vaadin.ui.HasComponents, com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.Layout, Serializable, Iterable<com.vaadin.ui.Component>

public class CmsPermissionView extends com.vaadin.ui.CssLayout
Displays the permission settings for a single principal.

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    Permission change handler.

    Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector

    com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener

    Nested classes/interfaces inherited from interface com.vaadin.ui.Component

    com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener

    Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents

    com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener

    Nested classes/interfaces inherited from interface com.vaadin.ui.Layout

    com.vaadin.ui.Layout.AlignmentHandler, com.vaadin.ui.Layout.MarginHandler, com.vaadin.ui.Layout.SpacingHandler

    Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable

    com.vaadin.server.Sizeable.Unit
  • Field Summary

    Fields inherited from class com.vaadin.ui.CssLayout

    components

    Fields inherited from class com.vaadin.ui.AbstractComponent

    DESIGN_ATTR_PLAIN_TEXT

    Fields inherited from interface com.vaadin.server.Sizeable

    SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
  • Constructor Summary

    Constructors
    Constructor
    Description
    CmsPermissionView(CmsAccessControlEntry entry, boolean editable, boolean isFolder, String inheritedFrom, CmsPermissionView.PermissionChangeHandler changeHandler)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    getEntryType(int flags, boolean all)
    Determines the type of the current access control entry.
    Gets the name of the principal.
    protected String[]
    getTypes(boolean all)
    Returns a String array with the possible entry types.
    protected int[]
    Returns an int array with possible entry types.
    void
    Hides the denied permissions column.
    protected Boolean
    isAllowed(CmsPermissionSet p, int value)
    Checks if a certain permission of a permission set is allowed.
    protected Boolean
    isDenied(CmsPermissionSet p, int value)
    Checks if a certain permission of a permission set is denied.
    boolean
    Checks if view is editable.
    protected Boolean
    Check if the current permissions are overwriting the inherited ones.
    protected Boolean
    isResponsible(int flags)
    Check if the user is a responsible for the resource.

    Methods inherited from class com.vaadin.ui.CssLayout

    addComponent, addComponent, addComponentAsFirst, addLayoutClickListener, beforeClientResponse, getComponent, getComponentCount, getComponentIndex, getCss, getState, getState, iterator, readDesign, removeComponent, removeLayoutClickListener, replaceComponent, writeDesign

    Methods inherited from class com.vaadin.ui.AbstractLayout

    readMargin, writeMargin

    Methods inherited from class com.vaadin.ui.AbstractComponentContainer

    addComponentAttachListener, addComponentDetachListener, addComponents, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, moveComponentsFrom, removeAllComponents, removeComponentAttachListener, removeComponentDetachListener, setHeight, setWidth

    Methods inherited from class com.vaadin.ui.AbstractComponent

    addContextClickListener, addListener, addShortcutListener, addStyleName, attach, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isReadOnly, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setReadOnly, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthFull, setWidthUndefined

    Methods inherited from class com.vaadin.server.AbstractClientConnector

    addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.server.ClientConnector

    addAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler

    Methods inherited from interface com.vaadin.ui.Component

    addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible

    Methods inherited from interface com.vaadin.ui.ComponentContainer

    addComponents, getComponentIterator, moveComponentsFrom, removeAllComponents

    Methods inherited from interface com.vaadin.shared.Connector

    getConnectorId

    Methods inherited from interface com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier

    addComponentAttachListener, addComponentDetachListener, removeComponentAttachListener, removeComponentDetachListener

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface com.vaadin.server.Sizeable

    getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
  • Constructor Details

  • Method Details

    • getPrincipalName

      Gets the name of the principal.

      Returns:
      String
    • hideDeniedColumn

      public void hideDeniedColumn()
      Hides the denied permissions column.

    • isEditable

      public boolean isEditable()
      Checks if view is editable.

      Returns:
      true if view is editable
    • getEntryType

      protected String getEntryType(int flags, boolean all)
      Determines the type of the current access control entry.

      Parameters:
      flags - the value of the current flags
      all - to include all types, or just user and groups
      Returns:
      String representation of the ace type
    • getTypes

      protected String[] getTypes(boolean all)
      Returns a String array with the possible entry types.

      Parameters:
      all - to include all types, or just user, groups and roles
      Returns:
      the possible types
    • getTypesInt

      protected int[] getTypesInt()
      Returns an int array with possible entry types.

      Returns:
      the possible types as int array
    • isAllowed

      protected Boolean isAllowed(CmsPermissionSet p, int value)
      Checks if a certain permission of a permission set is allowed.

      Parameters:
      p - the current CmsPermissionSet
      value - the int value of the permission to check
      Returns:
      true if the permission is allowed, otherwise false
    • isDenied

      protected Boolean isDenied(CmsPermissionSet p, int value)
      Checks if a certain permission of a permission set is denied.

      Parameters:
      p - the current CmsPermissionSet
      value - the int value of the permission to check
      Returns:
      true if the permission is denied, otherwise false
    • isOverWritingInherited

      protected Boolean isOverWritingInherited(int flags)
      Check if the current permissions are overwriting the inherited ones.

      Parameters:
      flags - value of all flags of the current entry
      Returns:
      true if permissions are overwriting the inherited ones, otherwise false
    • isResponsible

      protected Boolean isResponsible(int flags)
      Check if the user is a responsible for the resource.

      Parameters:
      flags - value of all flags of the current entry
      Returns:
      true if user is responsible for the resource, otherwise false