|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplanet.generic.commonapi.factory.ApplicationFactoryImpl
This factory abstracts the functionality of builds new instances of Application. It is based with only one parameter contained in a properties file:
Field Summary | |
protected java.lang.Class |
appClass
Class for Applications to build. |
protected java.lang.reflect.Constructor |
appConstructor
Constructor for applications with some parameter. |
protected static java.lang.String |
DEFAULT_APPLICATION
The default key specified in the properties file that identifies the class of some Application's implementation. |
protected java.lang.String |
propertiesFile
Properties file to be read to capture the defaultApplication. |
Constructor Summary | |
ApplicationFactoryImpl(java.lang.Class appClass)
This constructor reads the properties' file and initializes the Class for new Applications. |
|
ApplicationFactoryImpl(java.lang.String propertiesFile)
This constructor reads the properties' file and initializes the Class for new Applications. |
Method Summary | |
Application |
build()
Builds a new instance of the actual Application's class with the default name. |
Application |
build(java.lang.String app)
Builds a new instance of the specified Application's class app with the default name. |
Application |
buildWithName(java.lang.String name)
Generates a new instance of the actual class of Application. |
Application |
buildWithName(java.lang.String app,
java.lang.String name)
Generates a new instance of the specified Application class app. |
java.lang.String |
getApplicationClass()
Gets the Application classname actually in use. |
void |
setApplicationClass(java.lang.String app)
Sets the Application classname to use in the future. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String DEFAULT_APPLICATION
protected java.lang.Class appClass
protected java.lang.reflect.Constructor appConstructor
protected java.lang.String propertiesFile
Constructor Detail |
public ApplicationFactoryImpl(java.lang.String propertiesFile) throws InitializationException
propertiesFile
- Properties' file that contains the
data to be read for this ApplicationFactory.
InitializationException
- If occur any problem during
initialization steps.public ApplicationFactoryImpl(java.lang.Class appClass) throws InitializationException
InitializationException
- If occur any problem during
initialization steps.Method Detail |
public Application build() throws InitializationException
build
in interface ApplicationFactory
InitializationException
ApplicationFactory.build()
public Application build(java.lang.String app) throws InitializationException
build
in interface ApplicationFactory
app
- Application's class to be generated.
InitializationException
ApplicationFactory.build(java.lang.String)
public Application buildWithName(java.lang.String name) throws InitializationException
buildWithName
in interface ApplicationFactory
name
- Name for the application to generate.
InitializationException
ApplicationFactory.build()
,
Application
public Application buildWithName(java.lang.String app, java.lang.String name) throws InitializationException
buildWithName
in interface ApplicationFactory
app
- Application class to generate this new instance.name
- Name for the application to generate.
InitializationException
ApplicationFactory.build(java.lang.String)
public java.lang.String getApplicationClass()
getApplicationClass
in interface ApplicationFactory
ApplicationFactory.getApplicationClass()
public void setApplicationClass(java.lang.String app) throws InitializationException
setApplicationClass
in interface ApplicationFactory
app
- Application classname for some implementation to use in the future.
InitializationException
- if exists some problem with the Application classname
app.ApplicationFactory.setApplicationClass(java.lang.String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |