cvs commit: spice/sandbox/repository/componenthaus/src/java/org/componenthaus/spring AbstractPicoApplicationContext.java PicoApplicationContext.java

Mike Hogan <[email protected]> Mon, 10 Nov 2003 12:21:42 -0800
Newsgroups gmane.comp.java.spice.cvs
Message-ID <[email protected]>
hogie       03/11/10 12:21:42

  Modified:    sandbox/repository/componenthaus/src/java/org/componenthaus/spring
                        AbstractPicoApplicationContext.java
                        PicoApplicationContext.java
  Log:
  Preview release with plexus-utils components
  
  Revision  Changes    Path
  1.6       +3 -2      spice/sandbox/repository/componenthaus/src/java/org/componenthaus/spring/AbstractPicoApplicationContext.java
  
  Index: AbstractPicoApplicationContext.java
  ===================================================================
  RCS file: /cvsroot/spice/spice/sandbox/repository/componenthaus/src/java/org/componenthaus/spring/AbstractPicoApplicationContext.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractPicoApplicationContext.java	9 Nov 2003 14:00:48 -0000	1.5
  +++ AbstractPicoApplicationContext.java	10 Nov 2003 20:21:42 -0000	1.6
  @@ -48,6 +48,7 @@
   
       public AbstractPicoApplicationContext (ApplicationContext parent, String nameSpace) {
           this.parent = parent;
  +        this.startupTime = System.currentTimeMillis();
       }
   
       public ApplicationContext getParent() {
  @@ -176,8 +177,8 @@
   		this.sharedObjects.put(key, o);
   	}
   
  -    public Object sharedObject(String s) {
  -        return sharedObjects.get(s);
  +    public Object sharedObject(String key) {
  +        return sharedObjects.get(key);
       }
   
       public Object removeSharedObject(String s) {
  
  
  
  1.9       +10 -13    spice/sandbox/repository/componenthaus/src/java/org/componenthaus/spring/PicoApplicationContext.java
  
  Index: PicoApplicationContext.java
  ===================================================================
  RCS file: /cvsroot/spice/spice/sandbox/repository/componenthaus/src/java/org/componenthaus/spring/PicoApplicationContext.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PicoApplicationContext.java	9 Nov 2003 16:21:38 -0000	1.8
  +++ PicoApplicationContext.java	10 Nov 2003 20:21:42 -0000	1.9
  @@ -1,5 +1,9 @@
   package org.componenthaus.spring;
   
  +import org.componenthaus.ant.ClassAbbreviatorImpl;
  +import org.componenthaus.ant.JavadocFormatter;
  +import org.componenthaus.ant.JavadocFormatterImpl;
  +import org.componenthaus.ant.LineIndenterImpl;
   import org.componenthaus.prevayler.PrevaylerBean;
   import org.componenthaus.repository.api.ComponentRepository;
   import org.componenthaus.repository.api.RepositoryImpl;
  @@ -13,18 +17,14 @@
   import org.componenthaus.usecases.searchcomponents.SearchComponentsController;
   import org.componenthaus.usecases.showcomponent.ShowComponentController;
   import org.componenthaus.usecases.submitcomponent.DefaultCarSubmissionManager;
  -import org.componenthaus.usecases.submitcomponent.SubmitComponentController;
  -import org.componenthaus.usecases.submitcomponent.MetadataConverterImpl;
   import org.componenthaus.usecases.submitcomponent.DefaultComponentSubmissionManager;
  +import org.componenthaus.usecases.submitcomponent.MetadataConverterImpl;
  +import org.componenthaus.usecases.submitcomponent.SubmitComponentController;
   import org.componenthaus.usecases.welcomeuser.WelcomeUserController;
   import org.componenthaus.util.file.FileManager;
   import org.componenthaus.util.file.FileManagerImpl;
  -import org.componenthaus.util.source.CodeFormatter;
  -import org.componenthaus.util.source.JalopyCodeFormatter;
  -import org.componenthaus.ant.ClassAbbreviatorImpl;
  -import org.componenthaus.ant.LineIndenterImpl;
  -import org.componenthaus.ant.JavadocFormatterImpl;
  -import org.componenthaus.ant.JavadocFormatter;
  +import org.picocontainer.Parameter;
  +import org.picocontainer.defaults.ConstantParameter;
   import org.prevayler.Prevayler;
   import org.springframework.beans.BeansException;
   import org.springframework.context.ApplicationContext;
  @@ -34,8 +34,6 @@
   import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
   import org.springframework.web.servlet.view.ResourceBundleViewResolver;
   import org.springframework.web.servlet.view.tiles.TilesConfigurer;
  -import org.picocontainer.Parameter;
  -import org.picocontainer.defaults.ConstantParameter;
   
   import javax.servlet.ServletContext;
   import java.util.HashMap;
  @@ -59,7 +57,7 @@
       }
   
       protected void registerBeans() throws BeansException {
  -        assert servletContext != null : servletContext; //Must be called after setServletContext()
  +        assert servletContext != null : "Servlet Context cannot be null"; //Must be called after setServletContext()
   
           addController(WelcomeUserController.class, "/welcome.htm");
           addController(ListComponentsController.class, "/listComponents.action");
  @@ -86,7 +84,6 @@
           });
   
           pico.registerComponentImplementation(SearchService.class, LuceneSearchService.class);
  -        pico.registerComponentImplementation(CodeFormatter.class, JalopyCodeFormatter.class);
           pico.registerComponentImplementation(ComponentRepository.Monitor.class, AddComponentMonitor.class); //Will need multiples here soon
           pico.registerComponentImplementation(ComponentRepository.class, RepositoryImpl.class);
           //pico.registerComponentImplementation(PrevalentSystem.class, RepositoryImpl.class); //This causes a second instance of repository to exist.  Yuck.
  @@ -114,7 +111,7 @@
           addController(controllerClass, new String[]{urlMapping});
       }
   
  -    private void addSpringStuff() {
  +    protected void addSpringStuff() {
           ResourceBundleViewResolver viewResolver = new ResourceBundleViewResolver();
           viewResolver.setBasename(VIEW_FILE);
           TilesConfigurer tilesConfigurer = new TilesConfigurer();
  
  
  


-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/