|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.composition.data.Profile
org.apache.avalon.composition.data.DeploymentProfile
Definition of the criteria for an explicit component profile. A profile, when included within the scope of a container declaration will be instantiated in the model as an EXPLICIT component profile resulting in the initiation of dependency resolution relative to the component as the target deployment objective. Multiple supplementary profiles may be packaged in a .xprofiles resources and will be assigned to the container automatically. In the absence of explicit or packaged profile directives, an implicit profile will be created for any component types declared under a jar manifest.
XML
A component element declares the profile to be applied during the instantiation of a component type. It includes a name and class declaration, logging directives (resolved relative to the component's container), context creation criteria, together with configuration or parameters information.
<!-- Declaration of the services hosted by this container. Service container here will be managed relative to other provider components at the same level and may be serviced by components declared in parent container. --> <component name="complex" class="org.apache.excalibur.playground.ComplexComponent" activation="startup"> <!-- Priority and target assignments for component specific logging categrories. --> <categories priority="DEBUG"> <category name="init" priority="DEBUG" /> </categories> <!-- Context entry directives are normally only required in the case where the component type declares a required context type and entry values. Generally speaking, a component will normally qualify it's instantiation criteria through a configuration declaration. Any context values defined at this level will override context values supplied by the container. The following two context directives for "location" and "home" demonstrate programatics creation of context values. The first entry declares that the context value to be assigned to the key "location" shall be the String value "Paris". The second context enty assignes the container's context value for "urn:avalon:home" to the component's context key of "home". --> <context> <entry key="location">Paris</entry> <include name="urn:avalon:home" key="home"/> </context> <!-- Apply the following configuration when instantiating the component. This configuration will be applied as the primary configuration in a cascading configuration chain. A type may declare a default configuration under a "classname".xconfig file that will be used to dereference any configuration requests not resolvable by the configuration supplied here. --> <configuration> <message value="Hello"/> </configuration> <!-- The parameterization criteria from this instance of the component type. --> <parameters/> </component>
Constructor Summary | |
DeploymentProfile(String name,
boolean activation,
String classname,
CategoriesDirective categories,
ContextDirective context,
DependencyDirective[] dependencies,
StageDirective[] stages,
Parameters parameters,
Configuration config,
Mode mode)
|
|
DeploymentProfile(String name,
String classname)
|
Method Summary | |
CategoriesDirective |
getCategories()
Return the logging categories for the profile. |
String |
getClassname()
Return the component type classname. |
Configuration |
getConfiguration()
Return the base Configuration for the profile. |
ContextDirective |
getContext()
Return the context directive for the profile. |
DependencyDirective |
getDependencyDirective(String key)
Return the dependency directive for a supplied key. |
DependencyDirective[] |
getDependencyDirectives()
Return the dependency directives. |
Parameters |
getParameters()
Return the Parameters for the profile. |
StageDirective |
getStageDirective(String key)
Return the dependency directive for a supplied key. |
StageDirective[] |
getStageDirectives()
Return the stage directives. |
String |
toString()
Returns a string representation of the profile. |
Methods inherited from class org.apache.avalon.composition.data.Profile |
getActivationPolicy, getMode, getName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DeploymentProfile(String name, String classname)
public DeploymentProfile(String name, boolean activation, String classname, CategoriesDirective categories, ContextDirective context, DependencyDirective[] dependencies, StageDirective[] stages, Parameters parameters, Configuration config, Mode mode)
Method Detail |
public String getClassname()
public CategoriesDirective getCategories()
public ContextDirective getContext()
public DependencyDirective[] getDependencyDirectives()
public DependencyDirective getDependencyDirective(String key)
public StageDirective[] getStageDirectives()
public StageDirective getStageDirective(String key)
public Parameters getParameters()
public Configuration getConfiguration()
public String toString()
toString
in class Profile
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |