ARoad0.gDMak
Class ActionNewEligibleParty

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by ARoad0.gDMak.ActionNewEligibleParty
All Implemented Interfaces:
NewBaseObjectListener, Singleton, java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class ActionNewEligibleParty
extends javax.swing.AbstractAction
implements Singleton, NewBaseObjectListener

An action that creates a new eligible party when the user requests it in the beamer. createEligibleParty() is the main method, and it is invoked by the beamer PropertyEditors. The name has the structure 'IS-name :: ACS-name :: Resource-name'. This class manages all the dialog boxes required for the user input, controls the inputs, creates the eligible party in its ACS, then updates all the open frames in the GUI.

See Also:
Serialized Form

Field Summary
private static ActionNewEligibleParty instance__
          the only instance of the class, following singleton pattern
protected  BaseObject source_
          The value of the ACS which is the source.
 
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 ActionNewEligibleParty()
          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.
 void createEligibleParty(java.lang.Object[] _l_fixedValue)
          Invoked by CollectionPropertyEditor.addElement(), (from information of ACS/DirectoryImplBeanInfo classes in gBase) to create the EP.
static ActionNewEligibleParty getInstance()
          only public method to get the unique instance
 BaseObject getSource()
          Gets the value of the source.
 void handleNewBaseObject(BaseObject _obj)
          This method registers a GroupID in the current ACSTreeBaseListenerImpl as listeners for the 'l_Members' bound property.
static void handleNewGroup(ImmutableGroupID _obj)
          This method has to be invoked just after the creation of a GroupIDImpl, to register the current ACSTreeBaseListenerImpls as listeners of any change among the GroupID members.
 
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

source_

protected BaseObject source_
The value of the ACS which is the source.


instance__

private static ActionNewEligibleParty instance__
the only instance of the class, following singleton pattern

Constructor Detail

ActionNewEligibleParty

private ActionNewEligibleParty()
with this private constructor, the compiler won't generate a default public constructor

Method Detail

getInstance

public static ActionNewEligibleParty getInstance()
only public method to get the unique instance

Returns:
ActionNewEligibleParty, the unique instance

getSource

public BaseObject getSource()
Gets the value of the source.

Specified by:
getSource in interface NewBaseObjectListener
Returns:
the source of the property.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ev)
Manages the actions fired from the main menu, and displays a dialog box. No use.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
ev - ActionEvent

createEligibleParty

public void createEligibleParty(java.lang.Object[] _l_fixedValue)
Invoked by CollectionPropertyEditor.addElement(), (from information of ACS/DirectoryImplBeanInfo classes in gBase) to create the EP. Reduces the arguments array to the 3 first ones if the class to create is GroupID ou UserID. Uses a BaseObjectHandler instance. Calls ACSFactoryUtilityImpl.getL_AcsAddonExtensionClassNames() and getEffectiveClassName().

Parameters:
_l_fixedValue - array of the arguments. They may be all Strings, all ImmutableNames or all BaseObjects, as arguments which has been chosen by the user before the call of this method. The value at the index 0 is the chosen value for the first argument, and so on. A value in the array is null if the argument for this index is not pre-defined. The size of the array may be inferior or superior to the number of arguments.

handleNewBaseObject

public void handleNewBaseObject(BaseObject _obj)
This method registers a GroupID in the current ACSTreeBaseListenerImpl as listeners for the 'l_Members' bound property. Adds the associates, if any, to the EligibleParty. Displays to the user a message on the recommanded groups the new GroupIDMember should belong to. The number of recommanded groups is from 1 to 4, inclusive. Called by BaseObjectHandler for createEligibleParty().

Specified by:
handleNewBaseObject in interface NewBaseObjectListener
Parameters:
_obj - is the eligible party instance which has been created

handleNewGroup

public static void handleNewGroup(ImmutableGroupID _obj)
This method has to be invoked just after the creation of a GroupIDImpl, to register the current ACSTreeBaseListenerImpls as listeners of any change among the GroupID members. Called by BaseObjectHandler for handleNewBaseObject(), gWork.AcsFactory, gBase.AssociateUtilityImpl.addAssociateActions(), ActionNewACSyst.setNewGroup(), and from the AcsAddons. This method may be called several times for the same new group.

Parameters:
_obj - group which is just created