ARoad0.Pattern
Interface AcsFactoryForAcsAddon

All Superinterfaces:
Singleton
All Known Implementing Classes:
AcsFactoryMySQL, AcsFactoryUbuntu

public interface AcsFactoryForAcsAddon
extends Singleton

This interface is responsible for describing an AcsFactory in the gWork package of an AcsAddon. It is used for creating the ACS of any AcsAddon.

The descriptor of the AcsAddon, to set in the menu for creating a new ACS, is returned by the method getPublicAcsAddonName().

Caution: This property has to be defined in every implementation of this interface.

The BaseManagerImpl class, in the generic gBase package, is responsible to return the method getL_AcsAddonDescriptors() describing all the ACS addon editors and names. In this returned list, the form of a value is 'Editor: editor_name - AcsAddon: addon_name'. BaseManagerImpl checks that the 4 standard directories of an AcsAddon are there in the packages tree. These directories are gBase, gBaseBeanInfo, gBaseInterface, and gWork. It also controls that the standard file AcsFactoryXXX is in the directory 'gWork', where 'XXX' is the AcsAddon name. Otherwise, the BaseManagerImpl instance cannot be initialized, an error message is thrown and the program stops.

An AcsAddon must have a 'acsaddon_guide.html' file in the AcsAddon gBase directory, as the first user guide. In this same directory, it may provide an icon for the ACS, at the format JPEG. There is no explicit management of the AcsAddon version, but is is possible to add a version number in the AcsAddon name.

See Also:
for the definition of the ACS type

Method Summary
 ACSImpl configure(ACSImpl _result)
          Creates the initial components in a new ACS.
 ACSImpl create(ImmutableName _iSname, ImmutableName _name, java.lang.String _type, ImmutableName _parent)
          Creates a specific ACS for an AcsAddon.
 java.lang.String getPublicAcsAddonName()
          Gets the descriptor of the AcsAddon, to set in the menu for creating a new ACS.
 

Method Detail

create

ACSImpl create(ImmutableName _iSname,
               ImmutableName _name,
               java.lang.String _type,
               ImmutableName _parent)
               throws BaseError
Creates a specific ACS for an AcsAddon. The method configure() is called after this method by ActionNewACSyst.fillWithAcsObjects(). The ACS vocabulary is set by the AcsAddon ACSFactory directly.

Parameters:
_iSname - the IS of the new ACS. May be null.
_name - of the ACS to create or open. No test of null value nor empty.
_type - must be the right type for the AcsAddon
_parent - is the parent node of the new ACS in the IS. Never null.
Returns:
the new ACS
Throws:
BaseError - if the ACS is known, the ACS is open, the core ACS is null when it is mandatory, or ClassNotFoundException, IOException with invalidClassException if the ACSImpl class HAS CHANGED, or if the type or the specified structure are not correct.

configure

ACSImpl configure(ACSImpl _result)
Creates the initial components in a new ACS. Called by ActionNewACSyst.fillWithAcsObjects().

Parameters:
_result - to construct
Returns:
ACS with the initial and standard set of components.

getPublicAcsAddonName

java.lang.String getPublicAcsAddonName()
Gets the descriptor of the AcsAddon, to set in the menu for creating a new ACS. This method has to return a static variable, because it is called after a call to the empty constructor. This variable is usually called PUBLIC_ACS_ADDON_NAME. It has to contain a '(' character. ActionNewACSyst uses it to define the ACS type, as the beginning of the text up to this first '(' character. For instance, 'Linux Ubuntu 8.04 (by Accbee, France, EU)' is the value of PUBLIC_ACS_ADDON_NAME in the class AcsFactoryUbuntu that implements this interface, and 'Linux Ubuntu 8.04' is the type of the ACS this class creates.