avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/fortress/examples/src/java/org/apache/avalon/fortress/examples/extended Main.java
Date Thu, 30 Jan 2003 18:24:38 GMT
bloritsch    2003/01/30 10:24:38

  Modified:    fortress build.xml
               fortress/examples/src/java/org/apache/avalon/fortress/examples/components
                        TranslatorImpl.java
               fortress/examples/src/java/org/apache/avalon/fortress/examples/extended
                        Main.java
  Log:
  fix little issue with jarfile and remove some of the long explicit package names
  
  Revision  Changes    Path
  1.70      +3 -0      jakarta-avalon-excalibur/fortress/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/build.xml,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- build.xml	30 Jan 2003 17:37:12 -0000	1.69
  +++ build.xml	30 Jan 2003 18:24:38 -0000	1.70
  @@ -94,6 +94,9 @@
             <attribute name="Implementation-Vendor" value="Apache Software Foundation"/>
             <attribute name="Implementation-Version" value="${package-version}"/>
           </manifest>
  +        <zipgroupfileset dir="${build.dir}/tempjars">
  +          <include name="*.jar"/>
  +        </zipgroupfileset>
         </jar>
       </target>
   
  
  
  
  1.2       +14 -14    jakarta-avalon-excalibur/fortress/examples/src/java/org/apache/avalon/fortress/examples/components/TranslatorImpl.java
  
  Index: TranslatorImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/examples/src/java/org/apache/avalon/fortress/examples/components/TranslatorImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TranslatorImpl.java	28 Jan 2003 21:19:18 -0000	1.1
  +++ TranslatorImpl.java	30 Jan 2003 18:24:38 -0000	1.2
  @@ -79,21 +79,21 @@
    * @author <a href="mailto:crafterm@apache.org">Marcus Crafter</a>
    * @version CVS $Revision$ $Date$
    */
  -public class TranslatorImpl extends org.apache.excalibur.instrument.AbstractLogEnabledInstrumentable
  -    implements org.apache.avalon.fortress.examples.components.Translator, org.apache.avalon.framework.configuration.Configurable
  +public class TranslatorImpl extends AbstractLogEnabledInstrumentable
  +    implements Translator, org.apache.avalon.framework.configuration.Configurable
   {
       // Instrument to count the number of translations performed
  -    private org.apache.excalibur.instrument.CounterInstrument m_translationsInstrument;
  +    private CounterInstrument m_translationsInstrument;
   
       // internal store of translation mappings
  -    private java.util.Map m_keys = new java.util.HashMap();
  +    private Map m_keys = new java.util.HashMap();
   
       /**
        * Create a new TranslatorImpl.
        */
       public TranslatorImpl()
       {
  -        addInstrument( m_translationsInstrument = new org.apache.excalibur.instrument.CounterInstrument(
"translations" ) );
  +        addInstrument( m_translationsInstrument = new CounterInstrument( "translations"
) );
       }
   
       /**
  @@ -104,20 +104,20 @@
        * @param config <code>Configuration</code> details
        * @exception org.apache.avalon.framework.configuration.ConfigurationException if an
error occurs
        */
  -    public void configure( org.apache.avalon.framework.configuration.Configuration config
)
  -        throws org.apache.avalon.framework.configuration.ConfigurationException
  +    public void configure( Configuration config )
  +        throws ConfigurationException
       {
           if( config != null )
           {
  -            org.apache.avalon.framework.configuration.Configuration[] entries =
  +            Configuration[] entries =
                   config.getChild( "dictionary" ).getChildren( "translation" );
   
               for( int i = 0; i < entries.length; ++i )
               {
                   String key = entries[ i ].getAttribute( "key" );
  -                org.apache.avalon.framework.configuration.Configuration[] values = entries[
i ].getChildren( "value" );
  +                Configuration[] values = entries[ i ].getChildren( "value" );
   
  -                java.util.Map translations = new java.util.HashMap();
  +                Map translations = new HashMap();
   
                   for( int j = 0; j < values.length; ++j )
                   {
  @@ -158,8 +158,8 @@
        */
       public String[] getSupportedLanguages( String key )
       {
  -        java.util.Map translations = (java.util.Map)m_keys.get( key );
  -        java.util.Set keys = translations.keySet();
  +        Map translations = (Map)m_keys.get( key );
  +        Set keys = translations.keySet();
           return (String[])keys.toArray( new String[]{} );
       }
   
  @@ -177,7 +177,7 @@
           // Notify the Instrument Manager
           m_translationsInstrument.increment();
   
  -        java.util.Map translationMap = (java.util.Map)m_keys.get( key );
  +        Map translationMap = (Map)m_keys.get( key );
           return (String)translationMap.get( language );
       }
   }
  
  
  
  1.2       +8 -9      jakarta-avalon-excalibur/fortress/examples/src/java/org/apache/avalon/fortress/examples/extended/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/examples/src/java/org/apache/avalon/fortress/examples/extended/Main.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Main.java	28 Jan 2003 21:19:18 -0000	1.1
  +++ Main.java	30 Jan 2003 18:24:38 -0000	1.2
  @@ -63,7 +63,7 @@
   public final class Main
   {
       // container reference
  -    private static org.apache.avalon.fortress.examples.extended.ExtendedContainer m_container;
  +    private static ExtendedContainer m_container;
   
       /**
        * @param args a <code>String[]</code> array of command line arguments
  @@ -72,23 +72,22 @@
       public static final void main( String[] args )
           throws Exception
       {
  -        org.apache.avalon.fortress.util.FortressConfig config = new org.apache.avalon.fortress.util.FortressConfig();
  -        config.setContainerClass( "org.apache.avalon.fortress.examples.extended.ExtendedContainer"
);
  +        FortressConfig config = new FortressConfig();
  +        config.setContainerClass( ExtendedContainer.class.getName() );
           config.setContextDirectory( "./" );
           config.setWorkDirectory( "./" );
           config.setContainerConfiguration( "resource://org/apache/avalon/fortress/examples/extended/ExtendedContainer.xconf"
);
           config.setLoggerManagerConfiguration( "resource://org/apache/avalon/fortress/examples/extended/ExtendedContainer.xlog"
);
           config.setRoleManagerConfiguration( "resource://org/apache/avalon/fortress/examples/extended/ExtendedContainer.roles"
);
   
  -        final org.apache.avalon.fortress.ContainerManager cm =
  -            new org.apache.avalon.fortress.impl.DefaultContainerManager( config.getContext()
);
  -        org.apache.avalon.framework.container.ContainerUtil.initialize( cm );
  +        final ContainerManager cm = new DefaultContainerManager( config.getContext() );
  +        ContainerUtil.initialize( cm );
   
  -        m_container = (org.apache.avalon.fortress.examples.extended.ExtendedContainer)cm.getContainer();
  +        m_container = (ExtendedContainer)cm.getContainer();
   
           m_container.doLookups();
   
  -        org.apache.avalon.framework.container.ContainerUtil.dispose( cm );
  +        ContainerUtil.dispose( cm );
       }
   }
   
  
  
  

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


Mime
View raw message