maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject cvs commit: maven-scm/generic-scm-api/src/java/org/apache/maven/genericscm/manager DefaultScmManager.java ScmManager.java
Date Sat, 13 Dec 2003 22:32:49 GMT
evenisse    2003/12/13 14:32:49

  Modified:    generic-scm-api/src/java/org/apache/maven/genericscm/manager
                        DefaultScmManager.java ScmManager.java
  Log:
  Move RepositoryInfo from method parameters to constructor parameters
  
  Revision  Changes    Path
  1.2       +18 -11    maven-scm/generic-scm-api/src/java/org/apache/maven/genericscm/manager/DefaultScmManager.java
  
  Index: DefaultScmManager.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/generic-scm-api/src/java/org/apache/maven/genericscm/manager/DefaultScmManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultScmManager.java	11 Dec 2003 19:59:50 -0000	1.1
  +++ DefaultScmManager.java	13 Dec 2003 22:32:49 -0000	1.2
  @@ -72,6 +72,16 @@
   public class DefaultScmManager implements ScmManager
   {
       private Hashtable factories;
  +    private RepositoryInfo repoInfo;
  +    
  +    /**
  +     * @param repoInfo repository descriptor
  +     */
  +    public DefaultScmManager(RepositoryInfo repoInfo)
  +    {
  +        this.repoInfo = repoInfo;
  +    }
  +    
       /**
        * @param factory The factory you want to add.
        */
  @@ -85,38 +95,35 @@
       }
       
       /**
  -     * @param repoInfo repository descriptor
        * @return an initialized <code>Repository</code> component
        */
  -    public Repository getRepository(RepositoryInfo repoInfo) throws ScmException
  +    public Repository getRepository() throws ScmException
       {
  -        ScmFactory factory = getFactory(repoInfo);
  +        ScmFactory factory = getFactory();
           return factory.createRepository(repoInfo);
       }
   
       /**
  -     * @param repoInfo repository descriptor
        * @return an initialized <code>CommandWrapper</code> component
        */
  -    public CommandWrapper getCommandWrapper(RepositoryInfo repoInfo) throws ScmException
  +    public CommandWrapper getCommandWrapper() throws ScmException
       {
  -        ScmFactory factory = getFactory(repoInfo);
  +        ScmFactory factory = getFactory();
           return factory.createCommandWrapper(repoInfo);
       }
   
       /**
  -     * @param repoInfo repository descriptor
        * @param commandName The command name like <TT>"checkout"</TT>, <TT>"changelog"</TT>
        * @return an initialized <code>CommandWrapper</code> component
        */
  -    public Command getCommand(RepositoryInfo repoInfo, String commandName)
  +    public Command getCommand(String commandName)
           throws ScmException
       {
  -        ScmFactory factory = getFactory(repoInfo);
  +        ScmFactory factory = getFactory();
           return factory.createCommand(repoInfo, commandName);
       }
       
  -    private ScmFactory getFactory(RepositoryInfo repoInfo) throws ScmException
  +    private ScmFactory getFactory() throws ScmException
       {
           if (repoInfo == null)
           {
  
  
  
  1.3       +4 -7      maven-scm/generic-scm-api/src/java/org/apache/maven/genericscm/manager/ScmManager.java
  
  Index: ScmManager.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/generic-scm-api/src/java/org/apache/maven/genericscm/manager/ScmManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ScmManager.java	11 Dec 2003 19:59:50 -0000	1.2
  +++ ScmManager.java	13 Dec 2003 22:32:49 -0000	1.3
  @@ -75,22 +75,19 @@
       void addScmFactory(ScmFactory factory);
       
       /**
  -     * @param repoInfo repository descriptor
        * @return an initialized <code>Repository</code> component
        */
  -    Repository getRepository(RepositoryInfo repoInfo) throws ScmException;
  +    Repository getRepository() throws ScmException;
   
       /**
  -     * @param repoInfo repository descriptor
        * @return an initialized <code>CommandWrapper</code> component
        */
  -    CommandWrapper getCommandWrapper(RepositoryInfo repoInfo) throws ScmException;
  +    CommandWrapper getCommandWrapper() throws ScmException;
   
       /**
  -     * @param repoInfo repository descriptor
        * @param commandName The command name like <TT>"checkout"</TT>, <TT>"changelog"</TT>
        * @return an initialized <code>CommandWrapper</code> component
        */
  -    Command getCommand(RepositoryInfo repoInfo, String commandName)
  +    Command getCommand(String commandName)
           throws ScmException;
   }
  
  
  

Mime
View raw message