cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/webapp/WEB-INF cocoon.xconf
Date Tue, 21 May 2002 10:16:21 GMT
cziegeler    02/05/21 03:16:20

  Modified:    src/java/org/apache/cocoon/components
                        ExtendedComponentSelector.java
               src/java/org/apache/cocoon/components/pipeline
                        AbstractProcessingPipeline.java
                        ProcessingPipeline.java
               src/java/org/apache/cocoon/components/request
                        MultipartRequestFactoryImpl.java
               src/java/org/apache/cocoon/components/source/impl
                        ContextSourceFactory.java
               src/webapp/WEB-INF cocoon.xconf
  Log:
  Fixing some javadocs and changing context source factory: it now uses the source resolver
internally
  
  Revision  Changes    Path
  1.3       +2 -2      xml-cocoon2/src/java/org/apache/cocoon/components/ExtendedComponentSelector.java
  
  Index: ExtendedComponentSelector.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/ExtendedComponentSelector.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExtendedComponentSelector.java	26 Apr 2002 06:43:22 -0000	1.2
  +++ ExtendedComponentSelector.java	21 May 2002 10:16:19 -0000	1.3
  @@ -68,7 +68,7 @@
    * and accepts a wider variety of configurations.
    *
    * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
  - * @version CVS $Id: ExtendedComponentSelector.java,v 1.2 2002/04/26 06:43:22 cziegeler
Exp $
  + * @version CVS $Id: ExtendedComponentSelector.java,v 1.3 2002/05/21 10:16:19 cziegeler
Exp $
    */
   
   public class ExtendedComponentSelector extends ExcaliburComponentSelector {
  @@ -191,7 +191,7 @@
        * <ul>
        * <li>if {@link #getComponentInstanceName()} returns <code>null</code>,
        *     any child configurations having a attribute named as the result of
  -     *     {@link "getClassAttributeName()}, is considered as a component instance.
  +     *     {@link #getClassAttributeName()}, is considered as a component instance.
        * </li>
        * <li>if {@link #getComponentInstanceName()} returns a non-null value,
        *     only child configurations having this name are considered as a
  
  
  
  1.8       +3 -3      xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java
  
  Index: AbstractProcessingPipeline.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AbstractProcessingPipeline.java	6 May 2002 14:17:54 -0000	1.7
  +++ AbstractProcessingPipeline.java	21 May 2002 10:16:20 -0000	1.8
  @@ -81,7 +81,7 @@
    *
    * @since @next-version@
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Id: AbstractProcessingPipeline.java,v 1.7 2002/05/06 14:17:54 cziegeler
Exp $
  + * @version CVS $Id: AbstractProcessingPipeline.java,v 1.8 2002/05/21 10:16:20 cziegeler
Exp $
    */
   public abstract class AbstractProcessingPipeline
     extends AbstractLogEnabled
  @@ -164,7 +164,7 @@
        * @param source the source where to produce XML from, or <code>null</code>
if no
        *        source is given.
        * @param param the parameters for the generator.
  -     * @throws Exception if the generator couldn't be obtained.
  +     * @throws ProcessingException if the generator couldn't be obtained.
        */
       public void setGenerator (String role, String source, Parameters param)
       throws ProcessingException {
  @@ -198,7 +198,7 @@
        * @param source the source used to setup the transformer (e.g. XSL file), or
        *        <code>null</code> if no source is given.
        * @param param the parameters for the transfomer.
  -     * @throws Exception if the generator couldn't be obtained.
  +     * @throws ProcessingException if the generator couldn't be obtained.
        */
       public void addTransformer (String role, String source, Parameters param)
       throws ProcessingException {
  
  
  
  1.4       +3 -3      xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/ProcessingPipeline.java
  
  Index: ProcessingPipeline.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/ProcessingPipeline.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ProcessingPipeline.java	3 May 2002 11:55:05 -0000	1.3
  +++ ProcessingPipeline.java	21 May 2002 10:16:20 -0000	1.4
  @@ -77,7 +77,7 @@
    *
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Id: ProcessingPipeline.java,v 1.3 2002/05/03 11:55:05 cziegeler Exp $
  + * @version CVS $Id: ProcessingPipeline.java,v 1.4 2002/05/21 10:16:20 cziegeler Exp $
    */
   public interface ProcessingPipeline
          extends   Component, Recomposable {
  @@ -94,7 +94,7 @@
        * @param source the source where to produce XML from, or <code>null</code>
if no
        *        source is given.
        * @param param the parameters for the generator.
  -     * @throws Exception if the generator couldn't be obtained.
  +     * @throws ProcessingException if the generator couldn't be obtained.
        */
       void setGenerator (String role, String source, Parameters param)
       throws ProcessingException;
  @@ -109,7 +109,7 @@
        * @param source the source used to setup the transformer (e.g. XSL file), or
        *        <code>null</code> if no source is given.
        * @param param the parameters for the transfomer.
  -     * @throws Exception if the generator couldn't be obtained.
  +     * @throws ProcessingException if the generator couldn't be obtained.
        */
       void addTransformer (String role, String source, Parameters param)
       throws ProcessingException;
  
  
  
  1.2       +3 -3      xml-cocoon2/src/java/org/apache/cocoon/components/request/MultipartRequestFactoryImpl.java
  
  Index: MultipartRequestFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/request/MultipartRequestFactoryImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MultipartRequestFactoryImpl.java	27 Feb 2002 20:21:22 -0000	1.1
  +++ MultipartRequestFactoryImpl.java	21 May 2002 10:16:20 -0000	1.2
  @@ -62,7 +62,7 @@
    *
    * @author <a href="mailto:dims@apache.org">Davanum Srinivas</a>
    * @author <a href="mailto:j.tervoorde@home.nl">Jeroen ter Voorde</a>
  - * @version CVS $Id: MultipartRequestFactoryImpl.java,v 1.1 2002/02/27 20:21:22 dims Exp
$
  + * @version CVS $Id: MultipartRequestFactoryImpl.java,v 1.2 2002/05/21 10:16:20 cziegeler
Exp $
    */
   public final class MultipartRequestFactoryImpl extends RequestFactory {
   
  @@ -76,7 +76,7 @@
        * @param silentlyRename
        * @param maxUploadSize
        *
  -     * @return
  +     * @return the request
        */
       public HttpServletRequest getServletRequest(HttpServletRequest request,
                                                   boolean saveUploadedFilesToDisk,
  @@ -112,7 +112,7 @@
        * @param request
        * @param name
        *
  -     * @return
  +     * @return the object
        */
       public Object get(HttpServletRequest request, String name) {
           // FIXME We should get rid of this instanceof test
  
  
  
  1.5       +41 -9     xml-cocoon2/src/java/org/apache/cocoon/components/source/impl/ContextSourceFactory.java
  
  Index: ContextSourceFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/source/impl/ContextSourceFactory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ContextSourceFactory.java	29 Apr 2002 06:37:22 -0000	1.4
  +++ ContextSourceFactory.java	21 May 2002 10:16:20 -0000	1.5
  @@ -55,8 +55,13 @@
   import java.net.URL;
   import java.util.Map;
   import org.apache.excalibur.source.Source;
  +import org.apache.excalibur.source.SourceException;
   import org.apache.excalibur.source.SourceFactory;
  -import org.apache.excalibur.source.impl.URLSource;
  +import org.apache.excalibur.source.SourceResolver;
  +import org.apache.avalon.framework.activity.Disposable;
  +import org.apache.avalon.framework.component.ComponentException;
  +import org.apache.avalon.framework.component.ComponentManager;
  +import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.context.Contextualizable;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
  @@ -68,17 +73,38 @@
    * A factory for the context protocol using the context of the servlet api
    *
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version $Id: ContextSourceFactory.java,v 1.4 2002/04/29 06:37:22 cziegeler Exp $
  + * @version $Id: ContextSourceFactory.java,v 1.5 2002/05/21 10:16:20 cziegeler Exp $
    */
   public class ContextSourceFactory
       extends AbstractLogEnabled
  -    implements SourceFactory, Contextualizable, ThreadSafe
  +    implements SourceFactory, Composable, Disposable, Contextualizable, ThreadSafe
   {
   
  +    /** The context */
  +    protected org.apache.avalon.framework.context.Context context;
  +
  +    /** The component manager */
  +    protected ComponentManager manager;
  +
  +    /** The Source Resolver */
  +    protected SourceResolver resolver;
  +
       /**
  -     * The context
  +     * Composable Interface
        */
  -    protected org.apache.avalon.framework.context.Context context;
  +    public void compose(ComponentManager manager) {
  +        this.manager = manager;
  +    }
  +
  +    /**
  +     * Disposable Interface
  +     */
  +    public void dispose() {
  +        if (this.resolver != null) {
  +            this.manager.release( this.resolver );
  +            this.resolver = null;
  +        }
  +    }
   
       /**
        * Get the context
  @@ -93,7 +119,7 @@
        * @param parameters This is optional.
        */
       public Source getSource( String location, Map parameters )
  -        throws MalformedURLException, IOException
  +        throws SourceException, MalformedURLException, IOException
       {
           if( this.getLogger().isDebugEnabled() )
           {
  @@ -119,9 +145,15 @@
               this.getLogger().error(location + " could not be found. (possible context problem)");
               throw new MalformedURLException(location + " could not be found. (possible
context problem)");
           }
  -        final URLSource urlSource = new URLSource();
  -        urlSource.init( u, parameters);
  -        return urlSource;
  +
  +        if (this.resolver == null) {
  +            try {
  +                this.resolver = (SourceResolver)this.manager.lookup( SourceResolver.ROLE
);
  +            } catch (ComponentException ce) {
  +                throw new SourceException("Unable to lookup source resolver.", ce);
  +            }
  +        }
  +        return this.resolver.resolveURI( u.toExternalForm(), null, parameters);
       }
   
   }
  
  
  
  1.23      +1 -1      xml-cocoon2/src/webapp/WEB-INF/cocoon.xconf
  
  Index: cocoon.xconf
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/WEB-INF/cocoon.xconf,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- cocoon.xconf	20 May 2002 06:53:15 -0000	1.22
  +++ cocoon.xconf	21 May 2002 10:16:20 -0000	1.23
  @@ -514,7 +514,7 @@
       For development environment, set the check-reload to yes.
       For production environment, it is advisable to set the check-reload to no.
     -->
  -  <sitemap check-reload="yes" config="resource://org/apache/cocoon/components/treeprocessor/treeprocessor-builtins.xml"
file="sitemap.xmap" logger="sitemap"/>
  +  <sitemap check-reload="yes" config="resource://org/apache/cocoon/components/treeprocessor/treeprocessor-builtins.xml"
file="context://sitemap.xmap" logger="sitemap"/>
   
   
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message