public class AdminRightsEditor extends java.lang.Object implements RightsEditor
Constructor and Description |
---|
AdminRightsEditor() |
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. |
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 . |
private void |
editPath(BitSet perms,
java.util.function.Consumer<Rights> submitHandler,
java.lang.Runnable cancelHandler)
Edit path rights.
|
private void |
editRefresh(BitSet perms,
java.util.function.Consumer<Rights> submitHandler,
java.lang.Runnable cancelHandler)
Edit refresh rights.
|
private void |
editUser(BitSet perms,
java.util.function.Consumer<Rights> submitHandler,
java.lang.Runnable cancelHandler)
Edit user rights.
|
static java.lang.String |
getResourceType()
Returns the resource type name this editor is capable to edit.
|
void |
initialize(Description[] description)
Gives chance to editors to initialize their data structures.
|
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 RightsEditor
description
- rights structure descriptionpublic Rights createDefaultRights()
Rights
, which does not take
any input and is considered a default starting point in editing.createDefaultRights
in interface RightsEditor
Rights
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 RightsEditor
name
- name of the resource instance being editedexact
- nature of the namerights
- instance of Rights
to be editedsubmitHandler
- Submit handler.cancelHandler
- Cancel handler.private void editPath(BitSet perms, java.util.function.Consumer<Rights> submitHandler, java.lang.Runnable cancelHandler)
perms
- Permissions bit set.submitHandler
- Submit handler.cancelHandler
- Cancel handler.private void editRefresh(BitSet perms, java.util.function.Consumer<Rights> submitHandler, java.lang.Runnable cancelHandler)
perms
- Permissions bit set.submitHandler
- Submit handler.cancelHandler
- Cancel handler.