first bit,

yes, that would make sense to move that into the plexus xwork...maybe
there is one already there, I never looked..I'll take care of that

second bit,

again, my bad..I didn't check the interface, I made a bad assumption
on what plexus was doing with that interface...I'll clean that up when
I shove that into plexus :)

on the plus side, then the license will be right :P

jesse

On 7/15/06, Trygve Laugstøl <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
> Author: evenisse
> Date: Fri Jul 14 13:24:49 2006
> New Revision: 422021
>
> URL: http://svn.apache.org/viewvc?rev=422021&view=rev
> Log:
> [CONTINUUM-759] Generate plexus-request.xml with plexus-cdc
> Submitted by: Jesse McConnell
>
> Added:
>     
maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractContinuumAction.java
   (with props)

Why is this in Continuum and not in plexus-xwork?

[snip]

> Added: 
maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractContinuumAction.java
> URL: 
http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractContinuumAction.java?rev=422021&view=auto
> ==============================================================================
> --- 
maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractContinuumAction.java
 (added)
> +++ 
maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractContinuumAction.java
 Fri Jul 14 13:24:49 2006
> @@ -0,0 +1,71 @@
> +package org.apache.maven.continuum.web.action;
> +
> +/*
> + * Copyright 2001-2006 The Apache Software Foundation.
> + *
> + * Licensed under the Apache License, Version 2.0 (the "License");
> + * you may not use this file except in compliance with the License.
> + * You may obtain a copy of the License at
> + *
> + *      http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +
> +import org.codehaus.plexus.logging.LogEnabled;
> +import org.codehaus.plexus.logging.Logger;
> +import com.opensymphony.xwork.ActionSupport;
> +
> +/**
> + * AbstractContinuumAction:
> + *
> + * @author: jesse
> + * @date: Jul 13, 2006
> + * @version: $ID:$
> + */
> +public abstract class AbstractContinuumAction
> +    extends ActionSupport
> +    implements LogEnabled
> +{
> +    private Logger logger;
> +
> +    public void enableLogging( Logger logger )
> +    {
> +        this.logger = logger;
> +    }
> +
> +    protected Logger getLogger()
> +    {
> +        return logger;
> +    }
> +

vvv

> +    protected void setupLogger( Object component )
> +    {
> +        setupLogger( component, logger );
> +    }
> +
> +    protected void setupLogger( Object component, String subCategory )
> +    {
> +        if ( subCategory == null )
> +        {
> +            throw new IllegalStateException( "Logging category must be 
defined." );
> +        }
> +
> +        Logger logger = this.logger.getChildLogger( subCategory );
> +
> +        setupLogger( component, logger );
> +    }
> +
> +    protected void setupLogger( Object component, Logger logger )
> +    {
> +        if ( component instanceof LogEnabled )
> +        {
> +            ( (LogEnabled) component ).enableLogging( logger );
> +        }
> +    }

^^^ what is this stuff used for? The container is handling the logging
configuration of the components.

[snip]

--
Trygve



--
jesse mcconnell
[EMAIL PROTECTED]

Reply via email to