|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jac.core.ACConfiguration
This class defines aspect component configurations so that the programmer or the system administrator will be able to configure the available aspects for a given application.
The default available aspects in the system are the ones that
are declared to the AC manager in the jac.prop
(see
the org.objectweb.jac.acs
property).
ApplicationRepository
,
Application
,
Parser
,
ACManager
,
Serialized FormField Summary | |
protected Application |
application
The application this configuration belongs to. |
protected URL |
filePath
The configuration file's URL. |
protected String |
name
The name of the configured AC. |
protected boolean |
weaveOnDemand
This flag tells if the aspect that is configured by the current configuration will be woven on demand (by the administrator or by a configuration program) or if the aspect will be automatically woven and restored by the system. |
Constructor Summary | |
ACConfiguration(Application application,
String name,
String filePath,
boolean weaveNow)
Creates a new aspect component configuration. |
Method Summary | |
protected void |
configure()
Configures the aspect component. |
static Object |
convertArray(Object[] array,
Class componentType,
Imports imports)
|
static Object |
convertValue(Object object,
Class type)
|
static Object |
convertValue(Object object,
Class type,
Imports imports)
|
Application |
getApplication()
Gets the owning application. |
ClassItem |
getAspectClass()
Return the class item for the configured aspect component. |
protected static ClassItem |
getClass(String name,
Imports imports)
|
AspectComponent |
getInstance()
Gets the aspect component instance that corresponds to this configuration. |
String |
getName()
Gets the name of the configured AC as defined in the declared ACs of the AC manager. |
URL |
getURL()
The getter of the configuration file's URL. |
boolean |
getWeaveOnDemand()
Gets the weaveOnDemand flag value. |
protected AspectComponent |
instantiate()
Instantiates a new aspect component. |
protected static void |
resolveTypes(String[] types,
Imports imports)
|
void |
setName(String name)
The aspect name setter. |
void |
setURL(URL filePath)
Sets the URL of the configuration file that defines the configuration operations. |
void |
setWeaveOnDemand(boolean b)
Sets the weaveOnDemand flag value. |
String |
toString()
Returns a string representation of this configuration. |
void |
unweave()
Unweaves the aspect component that corresponds to this configuration. |
void |
weave()
Instantiates, configures, and weaves the aspect component that corresponds to this configuration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Application application
protected String name
protected URL filePath
protected boolean weaveOnDemand
For instance, a persistence aspect should always have this configuration flag to false whilst a debugging aspect should most of the time be woven on demand (when debugging is needed).
Constructor Detail |
public ACConfiguration(Application application, String name, String filePath, boolean weaveNow)
application
- the application this configuration belongs toname
- the name of the AC as defined in the declared ACs of
the AC manager, or the of the aspect component's classfilePath
- the path of the configuration file; it can be
absolute but, if relative, it is automatically concatened to the
application's pathweaveNow
- a true value means that the aspect that
configured by this configuration will be automatically woven at
the application's start, a false value means that the user will
have to weave it with a program (or with the administration
GUI); default is trueMethod Detail |
public void setURL(URL filePath)
filePath
- a valid file pathgetURL()
public URL getURL()
setURL(URL)
public boolean getWeaveOnDemand()
weaveOnDemand
flag value.
public void setWeaveOnDemand(boolean b)
weaveOnDemand
flag value.
b
- the new flag valuepublic String getName()
setName(String)
,
ACManager
public void setName(String name)
jac.prop
.
name
- the aspect nameACManager
public AspectComponent getInstance()
public Application getApplication()
public ClassItem getAspectClass()
protected AspectComponent instantiate()
protected void configure()
This method takes the aspect component instance that corresponds to this configuration, parse the configuration file, and calls all the configuration operations that are defined in this file.
Parser
,
getInstance()
public static Object convertArray(Object[] array, Class componentType, Imports imports) throws Exception
Exception
public static Object convertValue(Object object, Class type) throws Exception
Exception
public static Object convertValue(Object object, Class type, Imports imports) throws Exception
Exception
protected static void resolveTypes(String[] types, Imports imports)
protected static ClassItem getClass(String name, Imports imports)
public void weave()
instantiate()
,
configure()
public void unweave()
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |