ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer DefaultConfigurer.java Configurer.java
Date Mon, 04 Jun 2001 12:39:29 GMT
donaldp     01/06/04 05:39:29

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer
                        DefaultConfigurer.java Configurer.java
  Log:
  Made it possible to configure single attributes. This is to help container style tasks.
  
  Revision  Changes    Path
  1.4       +25 -1     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java
  
  Index: DefaultConfigurer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultConfigurer.java	2001/06/02 14:28:42	1.3
  +++ DefaultConfigurer.java	2001/06/04 12:39:28	1.4
  @@ -150,6 +150,26 @@
       }
   
       /**
  +     * Configure named attribute of object in a particular context.
  +     * This configuring can be done in different ways for different
  +     * configurers.
  +     *
  +     * @param object the object
  +     * @param name the attribute name
  +     * @param value the attribute value
  +     * @param context the Context
  +     * @exception ConfigurationException if an error occurs
  +     */
  +    public void configure( final Object object, 
  +                           final String name, 
  +                           final String value, 
  +                           final Context context )
  +        throws ConfigurationException
  +    {
  +        configureAttribute( object, name, value, context );
  +    }
  +
  +    /**
        * Try to configure content of an object.
        *
        * @param object the object
  @@ -173,7 +193,11 @@
       {
           for( int i = 0; i < RESERVED_ATTRIBUTES.length; i++ )
           {
  -            if( RESERVED_ATTRIBUTES[ i ].equals( name ) ) return;
  +            if( RESERVED_ATTRIBUTES[ i ].equals( name ) ) 
  +            {
  +                throw new ConfigurationException( "Can not specify reserved attribute "
+ 
  +                                                  name );
  +            }
           }
   
           final String methodName = getMethodNameFor( name );
  
  
  
  1.3       +14 -0     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/Configurer.java
  
  Index: Configurer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/Configurer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Configurer.java	2001/05/31 17:19:58	1.2
  +++ Configurer.java	2001/06/04 12:39:28	1.3
  @@ -34,4 +34,18 @@
        */
       void configure( Object object, Configuration configuration, Context context )
           throws ConfigurationException;
  +
  +    /**
  +     * Configure named attribute of object in a particular context.
  +     * This configuring can be done in different ways for different
  +     * configurers.
  +     *
  +     * @param object the object
  +     * @param name the attribute name
  +     * @param value the attribute value
  +     * @param context the Context
  +     * @exception ConfigurationException if an error occurs
  +     */
  +    void configure( Object object, String name, String value, Context context )
  +        throws ConfigurationException;
   }
  
  
  

Mime
View raw message