dion        2002/06/22 11:06:31

  Modified:    src/java/org/apache/maven/plugin Plugin.java
                        PluginManager.java
  Log:
  - Added 'top level' elements to Plugin from core/plugin.xml proposal
  
  Revision  Changes    Path
  1.2       +147 -1    
jakarta-turbine-maven/src/java/org/apache/maven/plugin/Plugin.java
  
  Index: Plugin.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/plugin/Plugin.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Plugin.java       22 Jun 2002 16:41:20 -0000      1.1
  +++ Plugin.java       22 Jun 2002 18:06:31 -0000      1.2
  @@ -56,6 +56,9 @@
    * ====================================================================
    */
   
  +import java.util.ArrayList;
  +import java.util.List;
  +
   import org.apache.maven.project.BaseObject;
   
   /**
  @@ -66,12 +69,155 @@
    */
   public class Plugin extends BaseObject
   {
  +    /** version, e.g. 1.2-beta1, 1.0, 1.4.1 */
  +    private String version;
  +    /** holds the (optional) implementation style */
  +    private String implementation;
  +    /** Plugins that this one depends on */
  +    private List dependencies;
  +    /** list of tasks provided by this plugin */
  +    private List tasks;
  +    /** list of reports added by this plugin */
  +    private List reports;
  +    /** list of extensions to other plugin tasks */
  +    private List extensions;
       
       /**
        * Creates a new instance of Plugin
        */
       public Plugin()
       {
  +        setDependencies(new ArrayList());
  +        setTasks(new ArrayList());
  +    }
  +    
  +    //--------------------------------------------------------------------------
  +    // Property Accessors
  +    //--------------------------------------------------------------------------
  +
  +    /** 
  +     * Getter for property version.
  +     *
  +     * @return Value of property version.
  +     */
  +    public String getVersion()
  +    {
  +        return version;
  +    }
  +    
  +    /**
  +     * Setter for property version.
  +     *
  +     * @param version New value of property version.
  +     */
  +    public void setVersion(String version)
  +    {
  +        this.version = version;
  +    }
  +    
  +    /**
  +     * Getter for property implementation.
  +     *
  +     * @return Value of property implementation.
  +     */
  +    public String getImplementation()
  +    {
  +        return implementation;
  +    }
  +    
  +    /**
  +     * Setter for property implementation.
  +     *
  +     * @param implementation New value of property implementation.
  +     */
  +    public void setImplementation(String implementation)
  +    {
  +        this.implementation = implementation;
  +    }
  +    
  +    /**
  +     * Getter for property dependencies.
  +     *
  +     * @return Value of property dependencies.
  +     */
  +    public List getDependencies()
  +    {
  +        return dependencies;
  +    }
  +    
  +    /**
  +     * Setter for property dependencies.
  +     *
  +     * @param dependencies New value of property dependencies.
  +     */
  +    public void setDependencies(List dependencies)
  +    {
  +        this.dependencies = dependencies;
  +    }
  +    
  +    /** 
  +     * Getter for property tasks.
  +     *
  +     * @return Value of property tasks.
  +     */
  +    public List getTasks()
  +    {
  +        return tasks;
       }
  +    
  +    /** 
  +     * Setter for property tasks.
  +     *
  +     * @param tasks New value of property tasks.
  +     */
  +    public void setTasks(List tasks)
  +    {
  +        this.tasks = tasks;
  +    }
  +    
  +    /** 
  +     * Getter for property reports.
  +     *
  +     * @return Value of property reports.
  +     */
  +    public List getReports()
  +    {
  +        return reports;
  +    }
  +    
  +    /**
  +     * Setter for property reports.
  +     *
  +     * @param reports New value of property reports.
  +     */
  +    public void setReports(List reports)
  +    {
  +        this.reports = reports;
  +    }
  +    
  +    /**
  +     * Getter for property extensions.
  +     *
  +     * @return Value of property extensions.
  +     */
  +    public List getExtensions()
  +    {
  +        return extensions;
  +    }
  +    
  +    /** 
  +     * Setter for property extensions.
  +     *
  +     * @param extensions New value of property extensions.
  +     */
  +    public void setExtensions(List extensions)
  +    {
  +        this.extensions = extensions;
  +    }
  +    
  +    // FIXME: add a new addDepenency method here
  +    // FIXME: add a new addTask method here
  +    // FIXME: add a new addExtension method here
  +    // FIXME: add a new addReport method here
       
   }
  
  
  
  1.2       +16 -0     
jakarta-turbine-maven/src/java/org/apache/maven/plugin/PluginManager.java
  
  Index: PluginManager.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/plugin/PluginManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PluginManager.java        22 Jun 2002 14:03:35 -0000      1.1
  +++ PluginManager.java        22 Jun 2002 18:06:31 -0000      1.2
  @@ -56,6 +56,7 @@
    * ====================================================================
    */
   
  +import java.util.ArrayList;
   import java.util.List;
   
   import org.apache.maven.build.Repository;
  @@ -81,7 +82,22 @@
       public PluginManager()
       {
       }
  +
  +    /**
  +     * Retrieve a list of installed plugins
  +     * 
  +     * @return a list of {@link Plugin plugins} 
  +     */
  +    public List getInstalledPlugins()
  +    {
  +        List plugins = new ArrayList();
  +        
  +        return plugins;
  +    }
       
  +    //--------------------------------------------------------------------------
  +    // Property Accessors
  +    //--------------------------------------------------------------------------
       /**
        * Getter for property remoteRepositories.
        *
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to