avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data ContextDirective.java
Date Fri, 25 Jul 2003 04:36:50 GMT
mcconnell    2003/07/24 21:36:50

  Modified:    merlin/composition-spi/src/java/org/apache/avalon/composition/data
                        ContextDirective.java
  Log:
  Improving engine interface.
  
  Revision  Changes    Path
  1.2       +33 -4     avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/ContextDirective.java
  
  Index: ContextDirective.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/composition-spi/src/java/org/apache/avalon/composition/data/ContextDirective.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ContextDirective.java	17 Jul 2003 21:21:58 -0000	1.1
  +++ ContextDirective.java	25 Jul 2003 04:36:50 -0000	1.2
  @@ -52,7 +52,6 @@
   
   import java.io.Serializable;
   
  -
   /**
    * A context descriptor declares the context creation criteria for
    * the context instance and context entries.
  @@ -61,7 +60,7 @@
    * <p>A context directive may contain multiple import statements.  Each import
    * statement corresponds to a request for a context value from the container.</p>
    * <pre>
  - *    &lt;context class="<font color="darkred">MyContextCLass</font>"&gt;
  + *    &lt;context class="<font color="darkred">MyContextClass</font>"&gt;
    *       &lt;entry key="<font color="darkred">special</font>"&gt;
    *         &lt;import key="<font color="darkred">urn:avalon:classloader</font>"/&gt;
    *       &lt;/entry&gt;
  @@ -86,11 +85,16 @@
       private final EntryDirective[] m_entries;
   
       /**
  -     * The set of entry directives.
  +     * The constext casting classname.
        */
       private final String m_classname;
   
       /**
  +     * The optional provider source path.
  +     */
  +    private final String m_source;
  +
  +    /**
        * Creation of a new file target.
        * @param classname the context implementation class
        * @param imports the set of import directives
  @@ -109,6 +113,21 @@
        */
       public ContextDirective( final String classname, final EntryDirective[] entries )
       {
  +        this( classname, entries, null );
  +    }
  +
  +    /**
  +     * Creation of a new file target.
  +     * @param classname the context implementation class
  +     * @param imports the set of import directives
  +     * @param entries the set of entry descriptors
  +     * @param source a path to a source component for contextualization
  +     *    phase handling
  +     */
  +    public ContextDirective( 
  +      final String classname, final EntryDirective[] entries, String source )
  +    {
  +        m_source = source;
           m_classname = classname;
           if( entries != null )
           {
  @@ -118,6 +137,16 @@
           {
               m_entries = new EntryDirective[0];
           }
  +    }
  +
  +    /**
  +     * Return the relative path to a source provider component that
  +     * will handle a custom contextualization phase implementation.
  +     * @return the source path
  +     */
  +    public String getSource()
  +    {
  +        return m_source;
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message