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
,java.io.Serializable
,java.lang.Iterable<com.vaadin.ui.Component>
public class CmsPermissionView extends com.vaadin.ui.CssLayout
Displays the permission settings for a single principal.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CmsPermissionView.PermissionChangeHandler
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
-
-
Constructor Summary
Constructors Constructor Description CmsPermissionView(CmsAccessControlEntry entry, boolean editable, boolean isFolder, java.lang.String inheritedFrom, CmsPermissionView.PermissionChangeHandler changeHandler)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getEntryType(int flags, boolean all)
Determines the type of the current access control entry.java.lang.String
getPrincipalName()
Gets the name of the principal.protected java.lang.String[]
getTypes(boolean all)
Returns a String array with the possible entry types.protected int[]
getTypesInt()
Returns an int array with possible entry types.void
hideDeniedColumn()
Hides the denied permissions column.protected java.lang.Boolean
isAllowed(CmsPermissionSet p, int value)
Checks if a certain permission of a permission set is allowed.protected java.lang.Boolean
isDenied(CmsPermissionSet p, int value)
Checks if a certain permission of a permission set is denied.boolean
isEditable()
Checks if view is editable.protected java.lang.Boolean
isOverWritingInherited(int flags)
Check if the current permissions are overwriting the inherited ones.protected java.lang.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.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
-
-
-
-
Constructor Detail
-
CmsPermissionView
public CmsPermissionView(CmsAccessControlEntry entry, boolean editable, boolean isFolder, java.lang.String inheritedFrom, CmsPermissionView.PermissionChangeHandler changeHandler)
Constructor.- Parameters:
entry
- the access control entryeditable
- the editable flagisFolder
- the is folder flaginheritedFrom
- the inherited from pathchangeHandler
- the change handler
-
-
Method Detail
-
getPrincipalName
public java.lang.String 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 java.lang.String getEntryType(int flags, boolean all)
Determines the type of the current access control entry.- Parameters:
flags
- the value of the current flagsall
- to include all types, or just user and groups- Returns:
- String representation of the ace type
-
getTypes
protected java.lang.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 java.lang.Boolean isAllowed(CmsPermissionSet p, int value)
Checks if a certain permission of a permission set is allowed.- Parameters:
p
- the current CmsPermissionSetvalue
- the int value of the permission to check- Returns:
- true if the permission is allowed, otherwise false
-
isDenied
protected java.lang.Boolean isDenied(CmsPermissionSet p, int value)
Checks if a certain permission of a permission set is denied.- Parameters:
p
- the current CmsPermissionSetvalue
- the int value of the permission to check- Returns:
- true if the permission is denied, otherwise false
-
isOverWritingInherited
protected java.lang.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 java.lang.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
-
-