|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.Extension
public abstract class Extension
Provides the common base for any extensions of J2ME Polish.
Copyright Enough Software 2005
history
04-Apr-2005 - rob creation
| Field Summary | |
|---|---|
protected org.apache.tools.ant.Project |
antProject
|
protected String |
autoStartCondition
|
protected Environment |
environment
|
protected ExtensionDefinition |
extensionDefinition
|
protected ExtensionManager |
extensionManager
|
protected ExtensionSetting |
extensionSetting
|
protected ExtensionTypeDefinition |
extensionTypeDefinition
|
protected boolean |
isBuildStarted
|
| Constructor Summary | |
|---|---|
Extension()
Creates a new extension. |
|
| Method Summary | |
|---|---|
void |
configure(Variable[] parameters)
Configures this extension with conditional parameters. |
abstract void |
execute(Device device,
Locale locale,
Environment env)
Executes this extension. |
void |
executeAntTarget(String targetName,
List antPropertiesList)
Executes an Ant target. |
void |
executeAntTarget(String targetName,
Variable[] antProperties)
Executes an Ant target. |
void |
finalize(Device device,
Locale locale,
Environment env)
Finalizes this extension for a the device and locale. |
org.apache.tools.ant.Project |
getAntProject()
|
String |
getAutoStartCondition()
|
Environment |
getEnvironment()
|
ExtensionDefinition |
getExtensionDefinition()
|
ExtensionSetting |
getExtensionSetting()
|
static Extension |
getInstance(ExtensionTypeDefinition typeDefinition,
ExtensionDefinition definition,
ExtensionSetting setting,
org.apache.tools.ant.Project antProject,
ExtensionManager manager,
Environment environment)
Instantiates the specified exception. |
String |
getParameterValue(String parameterName,
Environment env)
Retrieves a parameter value from either the setting, the definition or the type definition of this extension. |
String |
getType()
|
protected void |
init(ExtensionTypeDefinition typeDefinition,
ExtensionDefinition definition,
ExtensionSetting setting,
org.apache.tools.ant.Project project,
ExtensionManager manager,
Environment env)
Initialises this extension. |
void |
initialize(Device device,
Locale locale,
Environment env)
Initializes this extension for a new device or a new locale. |
boolean |
isConditionFulfilled(Environment env)
Checks whether the autostart condition for this extension is fulfilled. |
void |
notifyBuildEnd(Environment env)
Notifies the extension about the end of the build process. |
void |
notifyBuildStart(Environment env)
Notifies the extension about the start of the build process. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ExtensionSetting extensionSetting
protected org.apache.tools.ant.Project antProject
protected ExtensionManager extensionManager
protected ExtensionDefinition extensionDefinition
protected ExtensionTypeDefinition extensionTypeDefinition
protected Environment environment
protected String autoStartCondition
protected boolean isBuildStarted
| Constructor Detail |
|---|
public Extension()
| Method Detail |
|---|
protected void init(ExtensionTypeDefinition typeDefinition,
ExtensionDefinition definition,
ExtensionSetting setting,
org.apache.tools.ant.Project project,
ExtensionManager manager,
Environment env)
typeDefinition - the definition of the base type, can be nulldefinition - the extension definition taken from extensions.xml or custom-extensions.xmlsetting - the extension settingsproject - the ant projectenv - public ExtensionSetting getExtensionSetting()
public ExtensionDefinition getExtensionDefinition()
public org.apache.tools.ant.Project getAntProject()
public Environment getEnvironment()
public void configure(Variable[] parameters)
parameters - the parameters.
IllegalArgumentException - when a parameter has a syntax error
or when a needed method has not be found.public void notifyBuildStart(Environment env)
env - the environment without device specific settingspublic void notifyBuildEnd(Environment env)
env - the environment without device specific settings
public void initialize(Device device,
Locale locale,
Environment env)
device - the current devicelocale - the current locale, can be nullenv - the environment/configuration
public void finalize(Device device,
Locale locale,
Environment env)
device - the current devicelocale - the current locale, can be nullenv - the environment/configuration
public abstract void execute(Device device,
Locale locale,
Environment env)
throws BuildException
device - the current devicelocale - the current locale, can be nullenv - the environment/configuration
BuildException - when the execution failed
public String getParameterValue(String parameterName,
Environment env)
parameterName - the name of the parameterenv - the environment, can be null
public static Extension getInstance(ExtensionTypeDefinition typeDefinition,
ExtensionDefinition definition,
ExtensionSetting setting,
org.apache.tools.ant.Project antProject,
ExtensionManager manager,
Environment environment)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException
typeDefinition - the definition of the type, can be nulldefinition - the definition taken from extensions.xml or custom-extensions.xmlsetting - the configuration taken from build.xmlantProject - the Ant projectmanager - the extension managerenvironment - the environment settings
ClassNotFoundException - when the class was not found
InstantiationException - when the class could not get instantiated
IllegalAccessException - when the class could not be accessed
IllegalArgumentException - when both definition and setting are null or when no class has been defined anywhere.
public void executeAntTarget(String targetName,
List antPropertiesList)
targetName - antPropertiesList -
public void executeAntTarget(String targetName,
Variable[] antProperties)
targetName - antProperties - public String getAutoStartCondition()
public boolean isConditionFulfilled(Environment env)
env - the environment
public String getType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||