avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/infobuilder ComponentInfoBuilder.java Resources.proeprties
Date Sun, 23 Jun 2002 02:54:00 GMT
donaldp     2002/06/22 19:54:00

  Modified:    containerkit/src/java/org/apache/excalibur/containerkit/infobuilder
                        ComponentInfoBuilder.java Resources.proeprties
  Log:
  Make sure top-level element is "component-info" and update resource string so they follow
usual pattern.
  
  Revision  Changes    Path
  1.2       +20 -6     jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/infobuilder/ComponentInfoBuilder.java
  
  Index: ComponentInfoBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/infobuilder/ComponentInfoBuilder.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ComponentInfoBuilder.java	23 Jun 2002 02:45:37 -0000	1.1
  +++ ComponentInfoBuilder.java	23 Jun 2002 02:54:00 -0000	1.2
  @@ -47,15 +47,28 @@
        * @return the created ComponentInfo
        * @throws ConfigurationException if an error occurs
        */
  -    public ComponentInfo build( final String classname, final Configuration info )
  +    public ComponentInfo build( final String classname,
  +                                final Configuration info )
           throws Exception
       {
           if( getLogger().isDebugEnabled() )
           {
  -            final String message = REZ.getString( "creating-ComponentInfo", classname );
  +            final String message =
  +                REZ.getString( "builder.creating-info.notice",
  +                               classname );
               getLogger().debug( message );
           }
   
  +        final String topLevelName = info.getName();
  +        if( !topLevelName.equals( "component-info" ) )
  +        {
  +            final String message =
  +                REZ.getString( "builder.bad-toplevel-element.error",
  +                               classname,
  +                               topLevelName );
  +            throw new ConfigurationException( message );
  +        }
  +
           Configuration configuration = null;
   
           configuration = info.getChild( "context" );
  @@ -74,10 +87,11 @@
           if( getLogger().isDebugEnabled() )
           {
               final String message =
  -                REZ.getString( "ComponentInfo-created",
  +                REZ.getString( "builder.created-info.notice",
                                  classname,
                                  new Integer( services.length ),
  -                               new Integer( dependencies.length ) );
  +                               new Integer( dependencies.length ),
  +                               new Integer( context.getEntrys().length ) );
               getLogger().debug( message );
           }
   
  @@ -145,7 +159,7 @@
               if( role.equals( service.getClassname() ) )
               {
                   final String message =
  -                    REZ.getString( "redundent-role",
  +                    REZ.getString( "builder.redundent-role.notice",
                                      classname,
                                      role );
                   getLogger().warn( message );
  
  
  
  1.2       +4 -5      jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/infobuilder/Resources.proeprties
  
  Index: Resources.proeprties
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/infobuilder/Resources.proeprties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Resources.proeprties	23 Jun 2002 02:45:37 -0000	1.1
  +++ Resources.proeprties	23 Jun 2002 02:54:00 -0000	1.2
  @@ -1,5 +1,4 @@
  -blockinfo-created=Constructed BlockInfo object for class {0}. BlockInfo contains {1} services
and {2} dependencies.
  -missing-block=Warning: Unspecified <block/> section in BlockInfo for class {0}.
  -redundent-role=Warning: BlockInfo for class {0} redundently specifies role name "{1}" in
dependency when it is identical to the name of service. It is recomended that the <role/>
section be elided.
  -creating-blockinfo=Creating a BlockInfo for class "{0}".
  -deprecated-management-declaration=The BlockInfo for "{0}" uses the deprecated mechanism
to declare management services. It is recomended you replace <management> with <management-access-points>.
  \ No newline at end of file
  +builder.redundent-role.notice=Warning: ComponentInfo for class {0} redundently specifies
role name "{1}" in dependency when it is identical to the name of service. It is recomended
that the <role/> section be elided.
  +builder.creating-info.notice=Creating a ComponentInfo for class "{0}".
  +builder.created-info.notice=Constructed ComponentInfo object for class {0}. ComponentInfo
contains {1} services, {2} dependencies and {3} context entrys.
  +builder.bad-toplevel-element.error=Error the Component implemented by "{0}" has an invalid
element at top level of component info descriptor. Expected: "component-info". Actual: "{1}"
  
  
  

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


Mime
View raw message