public class EntityPermissionsFrame extends AbstractFrame
Modifier and Type | Class and Description |
---|---|
static interface |
EntityPermissionsFrame.Companion |
protected class |
EntityPermissionsFrame.EntityOperationControl |
ScreenFragment.AfterInitEvent, ScreenFragment.AttachEvent, ScreenFragment.DetachEvent, ScreenFragment.InitEvent
Frame.MessageMode, Frame.MessageType, Frame.NotificationType, Frame.Wrapper
ExpandingLayout.ExpandDirection
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.OptionsStyleProvider
frame, messages
NO_OPTIONS, WINDOW_CLOSE_ACTION, WINDOW_COMMIT_AND_CLOSE_ACTION, WINDOW_DISCARD_AND_CLOSE_ACTION
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE, UNITS_PERCENTAGE, UNITS_PIXELS
Constructor and Description |
---|
EntityPermissionsFrame() |
Modifier and Type | Method and Description |
---|---|
void |
applyFilter() |
void |
applyPermissionMask() |
protected void |
applyPermissions(boolean editable) |
protected void |
attachAllCheckBoxListener(CheckBox checkBox,
PermissionVariant activeVariant) |
protected void |
attachCheckBoxListener(CheckBox checkBox,
java.lang.String metaProperty,
EntityOp operation,
PermissionVariant activeVariant) |
protected void |
deselectAllCheckers() |
protected EntityPermissionsFrame.EntityOperationControl |
getOperationControl(CheckBox checkBox) |
protected java.util.Map<java.lang.String,java.lang.Object> |
getParamsForDatasource() |
protected Permission |
getWildcardPermission(EntityOp entityOp) |
void |
init(java.util.Map<java.lang.String,java.lang.Object> params)
Called by the framework after creation of all components and before showing the screen.
|
protected void |
initCheckBoxesControls() |
protected void |
initWildcardCheckboxes() |
protected void |
initWildcardCheckboxListener(CheckBox checkBox,
EntityOp entityOp) |
protected boolean |
isSingleSelection() |
protected void |
markItemPermission(java.lang.String property,
EntityOp operation,
PermissionVariant permissionVariant) |
protected void |
markTargetPermission(OperationPermissionTarget target,
java.lang.String property,
EntityOp operation,
PermissionVariant permissionVariant) |
protected void |
updateCheckBoxes(OperationPermissionTarget item) |
protected void |
updateCheckBoxes(PermissionVariant permissionVariant,
CheckBox allowCheckBox,
CheckBox denyCheckBox) |
protected void |
updateCheckboxesEnabledByWildcard() |
protected void |
updateCheckboxesEnabledForEntityOpByWildcard(boolean wildcardPermissionIsSet,
EntityOp entityOp) |
protected void |
updateEditPane(OperationPermissionTarget item,
java.util.Set selected)
Update edit controls visibility
|
add, add, addAction, addAction, addFacet, addStyleName, dispose, expand, expand, formatMessage, getAction, getActions, getAlignment, getCaption, getCompanion, getComponent, getComponent, getComponent, getComponents, getComposition, getContext, getDescription, getDsContext, getExpandDirection, getExpandRatio, getFacet, getFacets, getFrame, getFrameOwner, getHeight, getHeightSizeUnit, getIcon, getMargin, getMessage, getMessagesPack, getOwnComponent, getOwnComponents, getOwnComponentsStream, getParent, getSpacing, getStyleName, getWidth, getWidthSizeUnit, getWindowManager, getWrappedFrame, indexOf, init, isEnabled, isEnabledRecursive, isExpanded, isResponsive, isValid, isVisible, isVisibleRecursive, remove, removeAction, removeAction, removeAll, removeAllActions, removeFacet, removeStyleName, resetExpanded, setAlignment, setCaption, setCompanion, setDescription, setDsContext, setEnabled, setExpandRatio, setFragment, setFrame, setHeight, setIcon, setIconFromSet, setId, setMargin, setMessagesPack, setParent, setResponsive, setSpacing, setStyleName, setVisible, setWidth, setWrappedFrame, showValidationErrors, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, validate, validate, validateAll, withUnwrapped, withUnwrappedComposition
addAfterInitListener, addAttachEventListener, addDetachEventListener, addInitListener, fireEvent, getBeanLocator, getEventHub, getExtensions, getFragment, getHostController, getHostScreen, getId, getScreenData, getUiEventListeners, init, setBeanLocator, setExtensions, setHostController, setScreenData, setUiEventListeners
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFacetNN
getXmlDescriptor, setXmlDescriptor
getActionNN, getSubPart
getComponentNN
add, focusFirstComponent, getComponentNN, remove
getHeightUnits, getId, getWidthUnits, isEnabledItself, isVisibleItself, requestFocus, setHeightAuto, setHeightFull, setSizeAuto, setSizeFull, setWidthAuto, setWidthFull
openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openFrame, openFrame, openLookup, openLookup, openLookup, openLookup, openWindow, openWindow, showMessageDialog, showNotification, showNotification, showNotification, showOptionDialog, showOptionDialog, showWebPage
@Inject protected EntityPermissionsFrame.Companion companion
@Inject protected Datasource<Role> roleDs
@Inject protected RestorablePermissionDatasource entityPermissionsDs
@Inject protected EntityPermissionTargetsDatasource entityTargetsDs
@Inject protected Table<OperationPermissionTarget> entityPermissionsTable
@Inject protected Label<java.lang.String> selectedTargetCaption
@Inject protected Label<java.lang.String> selectedTargetLocalCaption
@Inject protected UserSession userSession
@Inject protected Security security
@Inject protected Metadata metadata
@Inject protected TextField<java.lang.String> entityFilter
@Inject protected CheckBox assignedOnlyCheckBox
@Inject protected CheckBox systemLevelCheckBox
@Inject protected BoxLayout applyPermissionPane
@Inject protected BoxLayout selectedEntityPanel
@Inject protected CheckBox allAllowCheck
@Inject protected CheckBox allDenyCheck
@Inject protected Label<java.lang.String> denyLabel
@Inject protected RolesService rolesService
@Inject protected CheckBox createWildcardCheckBox
@Inject protected CheckBox readWildcardCheckBox
@Inject protected CheckBox updateWildcardCheckBox
@Inject protected CheckBox deleteWildcardCheckBox
@Inject protected GroupBoxLayout entityWildcardGroupBox
protected int rolesPolicyVersion
protected EntityPermissionsFrame.EntityOperationControl[] operationControls
protected boolean itemChanging
protected boolean permissionsLoaded
public void init(java.util.Map<java.lang.String,java.lang.Object> params)
AbstractFrame
init
in class AbstractFrame
params
- parameters passed from caller's code, usually from
HasWindowManager.openWindow(String, WindowManager.OpenType)
and similar methods, or set in
screens.xml
for this registered screenpublic void applyFilter()
public void applyPermissionMask()
protected void applyPermissions(boolean editable)
protected void initCheckBoxesControls()
protected void updateEditPane(OperationPermissionTarget item, java.util.Set selected)
item
- Target ds itemselected
- Selected set in tableprotected void updateCheckBoxes(PermissionVariant permissionVariant, CheckBox allowCheckBox, CheckBox denyCheckBox)
protected void updateCheckBoxes(OperationPermissionTarget item)
protected void deselectAllCheckers()
protected boolean isSingleSelection()
protected EntityPermissionsFrame.EntityOperationControl getOperationControl(CheckBox checkBox)
protected void attachAllCheckBoxListener(CheckBox checkBox, PermissionVariant activeVariant)
protected void attachCheckBoxListener(CheckBox checkBox, java.lang.String metaProperty, EntityOp operation, PermissionVariant activeVariant)
protected void markItemPermission(java.lang.String property, EntityOp operation, PermissionVariant permissionVariant)
protected void markTargetPermission(OperationPermissionTarget target, java.lang.String property, EntityOp operation, PermissionVariant permissionVariant)
protected java.util.Map<java.lang.String,java.lang.Object> getParamsForDatasource()
protected void initWildcardCheckboxes()
protected Permission getWildcardPermission(EntityOp entityOp)
protected void initWildcardCheckboxListener(CheckBox checkBox, EntityOp entityOp)
protected void updateCheckboxesEnabledByWildcard()
protected void updateCheckboxesEnabledForEntityOpByWildcard(boolean wildcardPermissionIsSet, EntityOp entityOp)