|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
ARoad0.gDMak.ActionNewACSyst
public class ActionNewACSyst
An action that creates a new access control system and the related new components in an information system. This class manages all the dialog boxes required for the user input, controls the inputs, creates through gBase.ACSFactoryImpl the ACS in the base, invokes ACSTree.createACSExplorer(), then displays the new ACS resources in a tree with InternalFrame.showTreeFrame(), and updates the explorer through InternalFrame.
Field Summary | |
---|---|
private javax.swing.JTextField |
acsField_
|
private javax.swing.JTextField |
componentField_
|
private javax.swing.JList |
componentList_
|
private ImmutableName |
currentAncestor_
|
private static javax.swing.JDialog |
dialog__
|
private java.awt.Dimension |
dimension_
|
private ACSFactoryImpl |
factory_
Current factory when the class instance is working for building up an ACS from the user choices |
private javax.swing.ButtonGroup |
group_
|
private static ActionNewACSyst |
instance__
the only instance of the class, following singleton pattern |
private javax.swing.JTextField |
isField_
|
private Name |
iSname_
|
(package private) java.util.List<java.lang.String> |
l_addonDescriptors_
The list from getL_AcsAddonDescriptors in the class BaseManagerImpl. |
private static java.lang.String |
lineSepar__
|
private java.util.Map |
m_currentPropertyEditors_
Current CommonPropertyEditors in the user dialog. |
private Name |
name_
|
private java.lang.String |
nickName_
|
private Name |
parent_
|
private boolean |
toFinalize_
In createUserDefinedACS() and createFirstACSproperties(), used to detect the frame closing from the okButton |
Fields inherited from class javax.swing.AbstractAction |
---|
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary | |
---|---|
private |
ActionNewACSyst()
with this private constructor, the compiler won't generate a default public constructor |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ev)
Manages the actions fired from the main menu, and displays a dialog box. |
private void |
addPreACSinGUI(ACSRun _acs)
Invoked by createFirstACSproperties() to allow the displaying of the ACS rights in the explorer. |
private void |
createACS()
Called by prepareACS(), setCurrentAncestor() and handleSelectionDialog() to create the ACS. |
private void |
createFirstACSproperties(ACSImpl _refAcs)
Called by createACS() to create the specific ACS rights, or to display an AcsAddon frame for some specific properties to edit. |
private ACSImpl |
createRBAC(Name _name)
Invoked by createACS() to create a Role-Based Access Control application on a Linux, and to display the new ACS in the explorer. |
void |
createUserDefinedACS(javax.swing.JPanel _panel,
javax.swing.JTabbedPane _tPane)
Called by createFirstACSproperties() to create a specific ACS and, before, to display its properties in a generic frame for allowing the user to enter the main values. |
private void |
endACScreation(ACSImpl _acs)
Invoked by setCurrentAncestor(), handleCreationDialog() and createUserDefinedACS() with a null argument, or by createACS() to display the ACS. |
private void |
fillAcsRightsForDerivedACS(ACS _refAcs)
Called by createACS() to fill the new acs factory with all the ACS rights from the ACS to be copied. |
private void |
fillDerivedACSproperties(ACSImpl _refAcs)
This important method fills the ACSFactory with all the ACS properties to be copied from the ACS reference. |
private void |
fillWithAcsObjects(ACSImpl _acs)
Adds the immutable objects under the subACS nodes or the groups tree roots. |
private void |
finalizePropertyEditors()
Finalizes the current property editors. |
static ActionNewACSyst |
getInstance()
single public method to get the unique instance |
StringRight[] |
getRestrictedUpperRightsForRight(java.lang.Integer _newRightKey,
StringRight _meta)
Called by BaseObjectHandler for defining the allowed upper rights to which the new acsright may be connected. |
void |
handleCreationDialog(boolean _data)
Called by DialogBox.showBackedJLists() for setNewComponent() which may be recalled. |
private void |
prepareACS()
Invoked by actionPerformed() to check and to select the parent ACS. |
static void |
removePreACSinGUI(ImmutableName _objectName)
Remove the node associated to an ACSRun in the explorer. |
private java.lang.String |
selectNoNX_ACSType()
Invoked by createUserDefinedACS() to select a generic type from ACSImpl.getL_AcsTypes(), or to create a new one. |
void |
setCurrentAncestor()
Called by prepareACS() to select the current ancestor in the IS. |
void |
setNewComponent(ImmutableName _currentAncestor)
Called by setCurrentAncestor() to create a new logical or physical component as an ancestor of the new ACS. |
private void |
setNewGroup(ACS _acs,
java.lang.String _typeStarting)
Handles the definition by the user of the type and name of a new group, and creates it. |
private void |
setNewResource(ACS _acs,
Directory _parent,
java.lang.String _typeStarting)
Handles the definition by the user of the type, name and account of a new resource, and creates it. |
Methods inherited from class javax.swing.AbstractAction |
---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static ActionNewACSyst instance__
private static javax.swing.JDialog dialog__
private java.util.Map m_currentPropertyEditors_
private javax.swing.JTextField isField_
private javax.swing.JTextField acsField_
private Name parent_
private java.awt.Dimension dimension_
private javax.swing.ButtonGroup group_
private Name name_
private Name iSname_
private java.lang.String nickName_
private ACSFactoryImpl factory_
java.util.List<java.lang.String> l_addonDescriptors_
private boolean toFinalize_
private static java.lang.String lineSepar__
private javax.swing.JList componentList_
private javax.swing.JTextField componentField_
private ImmutableName currentAncestor_
Constructor Detail |
---|
private ActionNewACSyst()
Method Detail |
---|
public static ActionNewACSyst getInstance()
public void actionPerformed(java.awt.event.ActionEvent ev)
actionPerformed
in interface java.awt.event.ActionListener
ev
- ActionEventprivate void prepareACS()
public void setCurrentAncestor()
public void setNewComponent(ImmutableName _currentAncestor)
_currentAncestor
- current node in the IS nametreepublic void handleCreationDialog(boolean _data)
handleCreationDialog
in interface CreationDialogListener
_data
- true if the user clicks on OK, and false if the user clicks on Cancelprivate void createACS()
private void createFirstACSproperties(ACSImpl _refAcs)
_refAcs
- is the reference ACS from which the new acs is derived. Null else.public void createUserDefinedACS(javax.swing.JPanel _panel, javax.swing.JTabbedPane _tPane)
_panel
- created in createFirstACSproperties()_tPane
- created in createFirstACSproperties(). It contains empty
properties or the derived ones from a reference ACSprivate void endACScreation(ACSImpl _acs)
_acs
- after its creation. Null for a LAMP server or when the process is aborted.private ACSImpl createRBAC(Name _name)
_name
- is the name of the new application
private java.lang.String selectNoNX_ACSType()
private void addPreACSinGUI(ACSRun _acs) throws BaseError
_acs
- is an uncomplet ACSFactoryImpl
BaseError
public static final void removePreACSinGUI(ImmutableName _objectName)
_objectName
- of the ACSpublic StringRight[] getRestrictedUpperRightsForRight(java.lang.Integer _newRightKey, StringRight _meta)
_newRightKey
- the internal key of the acsright to create_meta
- the selected metaright for the new acsright. May be null.
private void finalizePropertyEditors()
private void fillAcsRightsForDerivedACS(ACS _refAcs)
_refAcs
- reference ACS from which the new ACS is build up when
it is a derived ACSprivate void fillDerivedACSproperties(ACSImpl _refAcs)
_refAcs
- is the reference acs from which the new acs is build up when
it is a derived acsprivate void fillWithAcsObjects(ACSImpl _acs)
On the contrary of a creation through coding, it is not possible for the user to add a tree of Resources, since the resources which may be created there, are all under a Resources subACS node. Called by endACScreation() before the opening of the new ACS in the explorer.
_acs
- is a new ACS having some subACSs or groups tree rootsprivate void setNewResource(ACS _acs, Directory _parent, java.lang.String _typeStarting)
_acs
- the new ACS_parent
- the parent of the new directory to create_typeStarting
- the starting of the type for the new directoryprivate void setNewGroup(ACS _acs, java.lang.String _typeStarting)
_acs
- the new ACS_typeStarting
- the starting of the type for the new group
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |