|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
org.tentackle.ui.FormDialog
org.tentackle.appworx.SecurityDialog
public class SecurityDialog
Dialog to edit security rules.
The dialog edits the class rules in one tab and the optional object rules
in a second.
The user can create, modify, delete and re-arrange rules to setup
the desired ACLs.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JDialog |
|---|
JDialog.AccessibleJDialog |
| Nested classes/interfaces inherited from class java.awt.Dialog |
|---|
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected String |
className
classname (basename or full) |
protected Class |
clazz
managed class |
protected TrackedArrayList<Security> |
clazzList
security rules for the class |
protected AppDbObjectTablePanel |
clazzPanel
panel for to edit the class rules |
protected ContextDb |
contextDb
database context |
protected long |
id
managed object |
protected boolean |
isAppDbObjectClass
true if clazz is an AppDbObject.class |
protected SecurityManager |
manager
security manager |
protected TrackedArrayList<Security> |
objectList
security rules for the object |
protected AppDbObjectTablePanel |
objPanel
panel to edit the object rules |
protected int |
permissionType
permissiontype |
static String |
TX_SAVE_RULES
transaction name for "save rules" |
protected JLabel |
userLabel
|
protected boolean |
writeAllowed
true if current user has the write permission to security rules |
| Fields inherited from class javax.swing.JDialog |
|---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Dialog |
|---|
DEFAULT_MODALITY_TYPE |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
protected |
SecurityDialog(ContextDb contextDb,
int permissionType,
Class clazz,
long id)
Creates a dialog for editing security rule sets. The constructors are protected because the SecurityDialog should be invoked indirectly by the SecurityManager. |
| Method Summary | |
|---|---|
protected void |
configureTable(FormTable table)
Configures a table. |
ContextDb |
getContextDb()
Gets the database context. |
protected void |
processWindowEvent(WindowEvent e)
Handles window events depending on the state of the defaultCloseOperation property. |
protected boolean |
saveRules()
Saves the rules. |
void |
saveValues()
Sets a savepoint for all components in this container and all sub containers. |
protected void |
setup()
Sets up the dialog. |
protected void |
setupUserLabel()
Sets up the userlabel. |
void |
showDialog()
Shows the (modal) dialog. |
void |
triggerValuesChanged()
Signals that values in the components of the container may have changed. |
| Methods inherited from class java.awt.Dialog |
|---|
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, show, toBack |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.tentackle.ui.FormContainer |
|---|
getTitle, setTitle |
| Field Detail |
|---|
public static final String TX_SAVE_RULES
protected ContextDb contextDb
protected Class clazz
protected String className
protected long id
protected AppDbObjectTablePanel clazzPanel
protected AppDbObjectTablePanel objPanel
protected TrackedArrayList<Security> clazzList
protected TrackedArrayList<Security> objectList
protected int permissionType
protected SecurityManager manager
protected boolean writeAllowed
protected boolean isAppDbObjectClass
protected JLabel userLabel
| Constructor Detail |
|---|
protected SecurityDialog(ContextDb contextDb,
int permissionType,
Class clazz,
long id)
throws ApplicationException
contextDb - the database contextclazz - the class to set security rules for.
(use org.tentackle.appworx.SecurityDialog.class if working on security itself)permissionType - the kind of permission set. If 0, will be determined from clazz (if AppDbObject)
or set to Security.TYPE_PROGRAM otherwise.id - he object id in clazz (if clazz is a AppDbObject) or null
if all objects or clazz is not a AppDbObject.
ApplicationException - is setup failed| Method Detail |
|---|
public ContextDb getContextDb()
protected void setupUserLabel()
protected void setup()
throws ApplicationException
ApplicationException - if setup failedpublic void showDialog()
protected boolean saveRules()
protected void processWindowEvent(WindowEvent e)
defaultCloseOperation property.
Overridden to allow FormHelper keeping track of windows
Overritten so we can exit when window is closed: do some stuff before exit.
processWindowEvent in class FormDialoge - the window eventJDialog.setDefaultCloseOperation(int)public void triggerValuesChanged()
Overridden to enable/disable the save-button.
triggerValuesChanged in interface FormContainertriggerValuesChanged in class FormDialogpublic void saveValues()
Overridden to update the save-button.
saveValues in interface FormContainersaveValues in class FormDialogFormComponent.saveValue()protected void configureTable(FormTable table)
table - the table (object rules or class rules)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||