public class BitFlagsRightsEditor extends java.lang.Object implements RightsEditor, BitFlagsConstants
BitFlagsRights GWT editor.| Modifier and Type | Field and Description |
|---|---|
private Description[] |
description
Description array.
|
private boolean |
enableExecuteBit
Whether the execute bit is enabled
|
BIT_CREATE_ACCESS, BIT_DELETE_ACCESS, BIT_DENIED_ACCESS, BIT_READ_ACCESS, BIT_WRITE_ACCESS, BITSET_SIZE| Constructor and Description |
|---|
BitFlagsRightsEditor()
Default constructor.
|
BitFlagsRightsEditor(boolean enableExecuteBit)
Constructor, which allows to enable editing of the execute bit.
|
| Modifier and Type | Method and Description |
|---|---|
Rights |
createDefaultRights()
Creates an instance of the
Rights, which does not take any input and is
considered a default starting point in editing. |
protected Rights |
createPopulatedRights(BitSet perms)
Creates an instance of the
Rights configured using the given input. |
void |
edit(java.lang.String name,
boolean exact,
Rights rights,
java.util.function.Consumer<Rights> submitHandler,
java.lang.Runnable cancelHandler)
Edits the given instance of the
Rights. |
static java.lang.String |
getResourceType()
Returns the resource type name this editor is capable to edit.
|
protected java.lang.String |
getTitle()
Obtains the window title for the editor.
|
void |
initialize(Description[] description)
Gives a chance to editors to initialize their data structures.
|
private final boolean enableExecuteBit
private Description[] description
public BitFlagsRightsEditor()
public BitFlagsRightsEditor(boolean enableExecuteBit)
enableExecuteBit - Set to true to enable the execute bit.public static java.lang.String getResourceType()
public void initialize(Description[] description)
This is a one time call for this kind of resource for the life time of the admin session.
initialize in interface RightsEditordescription - The rights structure description.public Rights createDefaultRights()
Rights, which does not take any input and is
considered a default starting point in editing.createDefaultRights in interface RightsEditorRights.public void edit(java.lang.String name,
boolean exact,
Rights rights,
java.util.function.Consumer<Rights> submitHandler,
java.lang.Runnable cancelHandler)
Rights.
The implementation should prepare its modal dialog using the initial state from the passed
instance of the Rights, show the dialog, provide event processing until the
Save or Cancel action is applied, then hide the dialog and return the appropriate result.
edit in interface RightsEditorname - name of the resource instance being editedexact - nature of the namerights - instance of Rights to be editedsubmitHandler - Submit handler.cancelHandler - Cancel handler.protected Rights createPopulatedRights(BitSet perms)
Rights configured using the given input.perms - The permissions.Rights.protected java.lang.String getTitle()