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>
Displays the permission settings for a single principal.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacePermission 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.DetachListenerNested 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.ListenerNested 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.ComponentDetachListenerNested classes/interfaces inherited from interface com.vaadin.ui.Layout
com.vaadin.ui.Layout.AlignmentHandler, com.vaadin.ui.Layout.MarginHandler, com.vaadin.ui.Layout.SpacingHandlerNested classes/interfaces inherited from interface com.vaadin.server.Sizeable
com.vaadin.server.Sizeable.Unit -
Field Summary
Fields inherited from class com.vaadin.ui.CssLayout
componentsFields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXTFields 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
ConstructorsConstructorDescriptionCmsPermissionView(CmsAccessControlEntry entry, boolean editable, boolean isFolder, String inheritedFrom, CmsPermissionView.PermissionChangeHandler changeHandler) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetEntryType(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.voidHides the denied permissions column.protected BooleanisAllowed(CmsPermissionSet p, int value) Checks if a certain permission of a permission set is allowed.protected BooleanisDenied(CmsPermissionSet p, int value) Checks if a certain permission of a permission set is denied.booleanChecks if view is editable.protected BooleanisOverWritingInherited(int flags) Check if the current permissions are overwriting the inherited ones.protected BooleanisResponsible(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, writeDesignMethods inherited from class com.vaadin.ui.AbstractLayout
readMargin, writeMarginMethods inherited from class com.vaadin.ui.AbstractComponentContainer
addComponentAttachListener, addComponentDetachListener, addComponents, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, moveComponentsFrom, removeAllComponents, removeComponentAttachListener, removeComponentDetachListener, setHeight, setWidthMethods 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, setWidthUndefinedMethods 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, updateDiffstateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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, setErrorHandlerMethods 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, setVisibleMethods inherited from interface com.vaadin.ui.ComponentContainer
addComponents, getComponentIterator, moveComponentsFrom, removeAllComponentsMethods inherited from interface com.vaadin.shared.Connector
getConnectorIdMethods inherited from interface com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier
addComponentAttachListener, addComponentDetachListener, removeComponentAttachListener, removeComponentDetachListenerMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
-
Constructor Details
-
CmsPermissionView
public CmsPermissionView(CmsAccessControlEntry entry, boolean editable, boolean isFolder, 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 Details
-
getPrincipalName
Gets the name of the principal.- Returns:
- String
-
hideDeniedColumn
Hides the denied permissions column. -
isEditable
Checks if view is editable.- Returns:
- true if view is editable
-
getEntryType
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
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
Returns an int array with possible entry types.- Returns:
- the possible types as int array
-
isAllowed
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
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
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
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
-