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/embeddor Embeddor.java
Date Tue, 12 Jun 2001 13:54:06 GMT
donaldp     01/06/12 06:54:06

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor
                        Embeddor.java
  Log:
  Changed interface so that instead of returning other components it hides it behind an abstraction.
ie Instead of returning a ProjectBuilder it provides interface to ProjectBuilder. Same with
ProjectManager.
  
  This allows interface/implementation to be changed without effecting the "frontend interface"
and vastly simplifies writing frontends.
  
  Revision  Changes    Path
  1.6       +13 -9     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/Embeddor.java
  
  Index: Embeddor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/Embeddor.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Embeddor.java	2001/05/31 17:20:08	1.5
  +++ Embeddor.java	2001/06/12 13:54:04	1.6
  @@ -7,12 +7,14 @@
    */
   package org.apache.myrmidon.components.embeddor;
   
  +import java.util.Map;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.activity.Startable;
   import org.apache.avalon.framework.component.Component;
  +import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.parameters.Parameterizable;
  -import org.apache.myrmidon.components.builder.ProjectBuilder;
  +import org.apache.myrmidon.components.model.Project;
   import org.apache.myrmidon.components.manager.ProjectManager;
   
   /**
  @@ -26,18 +28,20 @@
       String ROLE = "org.apache.myrmidon.components.embeddor.Embeddor";
   
       /**
  -     * Retrieve builder for runtime.
  -     * Valid after initialize() call
  +     * Create a project.
        *
  -     * @return the ProjectBuilder
  +     * @return the created Project
        */
  -    ProjectBuilder getProjectBuilder();
  +    Project createProject( String location, String type, Parameters parameters )
  +        throws Exception;
   
       /**
  -     * Retrieve project engine for runtime.
  -     * Valid after initialize() call
  +     * Create a ProjectManager for a particular project.
        *
  -     * @return the ProjectBuilder
  +     * @param project the root project
  +     * @param defines the defines in project
  +     * @return the ProjectManager
        */
  -    ProjectManager getProjectManager();
  +    ProjectManager createProjectManager( Project project, Parameters parameters )
  +        throws Exception;
   }
  
  
  

Mime
View raw message