org.apache.avalon.composition.data
Class ContextDirective

java.lang.Object
  extended byorg.apache.avalon.composition.data.ContextDirective
All Implemented Interfaces:
Serializable

public class ContextDirective
extends Object
implements Serializable

A context descriptor declares the context creation criteria for the context instance and context entries.

XML

A context directive may contain multiple import statements. Each import statement corresponds to a request for a context value from the container.

    <context class="MyContextClass">
       <entry key="special">
         <import key="urn:avalon:classloader"/>
       </entry>
       <entry key="xxx">
         <param class="MySpecialClass">
           <param>hello</param>
           <param class="java.io.File">../lib</param>
         </param>
       </entry>
    </context>
 

Version:
$Revision: 1.3 $ $Date: 2004/02/22 16:12:58 $
Author:
Avalon Development Team
See Also:
EntryDirective, Serialized Form

Constructor Summary
ContextDirective(EntryDirective[] entries)
          Creation of a new file target.
ContextDirective(String classname, EntryDirective[] entries)
          Creation of a new file target.
 
Method Summary
 String getClassname()
          Return the classname of the context implementation to use.
 EntryDirective getEntryDirective(String key)
          Return a named entry.
 EntryDirective[] getEntryDirectives()
          Return the set of entry directives.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextDirective

public ContextDirective(EntryDirective[] entries)
Creation of a new file target.

Parameters:
entries - the set of entry descriptors

ContextDirective

public ContextDirective(String classname,
                        EntryDirective[] entries)
Creation of a new file target.

Parameters:
classname - the context implementation class
entries - the set of entry descriptors
Method Detail

getClassname

public String getClassname()
Return the classname of the context implementation to use.

Returns:
the classname

getEntryDirectives

public EntryDirective[] getEntryDirectives()
Return the set of entry directives.

Returns:
the entries

getEntryDirective

public EntryDirective getEntryDirective(String key)
Return a named entry.

Parameters:
key - the context entry key
Returns:
the entry corresponding to the supplied key or null if the key is unknown


Copyright © The Apache Software Foundation. All Rights Reserved.