This class is responsible for creating, by the mean of panels, associations
to do as calls to constructors and methods in gBase, with all the required arguments.
It is used by ACSFactoryImpl to define the list of associations to perform
when a new object is created in an ACS, and to define a list of creations
when a child ACS is opening, to update its ACSObject roots in its parent ACS.
This class reads and updates a modifiable property map
of a gBase JavaBean, for which the type is a Map,
and where the map values are the associations.
The map keys have the format 'keyStarting.subkey' as criteria for defining
the new objects which comply to the required associations by the acs designer.
This class works with gBase.AssociateUtilityImpl strongly for the values updating.
The map updating is never done through a write method or a 'choiceMethodForNew' in
the property descriptor, but through 'add/remove' methods defined in the property
descriptor.
See the Copyright.
Field Summary
protected java.lang.String
limitedValuesMethodKey_
The key to use as argument in the call of the limited values method.
valueOf(BaseObject _source,
java.beans.PropertyDescriptor _propertyDescriptor)
Factory method to use when a AssociationMapPropertyEditor is delegating to us.
The key to use as argument in the call of the limited values method.
On the contrary of the super class, the argument is not the currently selected
key in the map. The argument is static, and the limited values method returns
only the first value of the values array. The set of the first values is smaller
when this class is the property editor of a child ACS. To detect this case,
the BeanInfo must have a 'ForChildACS' property which initializes this property.
In other cases, this property should remains null.
Constructor Detail
AssociationMapPropertyEditor
AssociationMapPropertyEditor()
Constructor FOR USE ONLY through the valueOf() method,
EMPTY_INSTANCE and the subclasses.
Factory method to use when a AssociationMapPropertyEditor is delegating to us.
It constructs the read method for the property, from the BeanInfo information.
The property must be a map of Strings as keys, and String arrays as values.
Overrides the super method and calls it.
Called by BeamerManager.addPropertyEditor().
Parameters:
_source - owning the property.
_propertyDescriptor - is the descriptor of the property
Returns:
a AssociationMapPropertyEditor instance
Throws:
java.lang.NullPointerException - if _source or _displayName is null
ProcessError - if BeanInfo and PropertyDecriptor calls fail
Called by actionPerformed() when the user clicks on the button 'NewV' to
add new values in the map.
The allowed String map values depends lightly on the map key.
The values define one or several actions to do if the key matches.
The possible formats for the first value of the action N, are get
from the method limitedValuesMethod_ among this set:
- .XXX which specifies the class name XXX in gBase, without the Impl String,
of an associate object to build up or to finalize when the master is build up
or finalized
- ..YYY which specifies the method YYY to call on the master,
- ..YYY which specifies the method YYY to call on the master ACS,
- ..C.ZZZ which specifies the method ZZZ
to call on the associate previously created by the action number C.