maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r522852 - in /maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm: ./ manager/ provider/ util/
Date Tue, 27 Mar 2007 10:06:07 GMT
Author: evenisse
Date: Tue Mar 27 03:06:03 2007
New Revision: 522852

URL: http://svn.apache.org/viewvc?view=rev&rev=522852
Log:
Add more javadoc

Modified:
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameters.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/NoSuchCommandScmException.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFile.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileStatus.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmResult.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/util/AbstractConsumer.java

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java?view=diff&rev=522852&r1=522851&r2=522852
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java Tue Mar
27 03:06:03 2007
@@ -100,16 +100,33 @@
      */
     private String comment = "";
 
-    private List files;
+    /**
+     * List of ChangeFile
+     */
+    private List/*<ChangeFile>*/ files;
 
-    public ChangeSet( String strDate, String userDatePattern, String comment, String author,
List files )
+    /**
+     * @param strDate         Date the changes were committed
+     * @param userDatePattern pattern of date
+     * @param comment         comment provided at commit time
+     * @param author          User who made changes
+     * @param files           The ChangeFile list
+     */
+    public ChangeSet( String strDate, String userDatePattern, String comment, String author,
+                      List/*<ChangeFile>*/ files )
     {
         this( null, comment, author, files );
 
         setDate( strDate, userDatePattern );
     }
 
-    public ChangeSet( Date date, String comment, String author, List files )
+    /**
+     * @param date    Date the changes were committed
+     * @param comment comment provided at commit time
+     * @param author  User who made changes
+     * @param files   The ChangeFile list
+     */
+    public ChangeSet( Date date, String comment, String author, List/*<ChangeFile>*/
files )
     {
         setDate( date );
 
@@ -132,7 +149,7 @@
      *
      * @return List of ChangeFile.
      */
-    public List getFiles()
+    public List/*<ChangeFile>*/ getFiles()
     {
         if ( files == null )
         {
@@ -146,7 +163,7 @@
      *
      * @param files List of ChangeFiles.
      */
-    public void setFiles( List files )
+    public void setFiles( List/*<ChangeFile>*/ files )
     {
         this.files = files;
     }
@@ -446,7 +463,7 @@
     /**
      * remove a <code>]]></code> from comments (replace it with <code>]
] ></code>).
      *
-     * @param message
+     * @param message The message to modify
      * @return a clean string
      */
     private String removeCDataEnd( String message )

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java?view=diff&rev=522852&r1=522851&r2=522852
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java
Tue Mar 27 03:06:03 2007
@@ -64,13 +64,22 @@
     public final static CommandParameter RUN_CHANGELOG_WITH_UPDATE =
         new CommandParameter( "run_changelog_with_update" );
 
+    /**
+     * Parameter name
+     */
     private String name;
 
-    public CommandParameter( String name )
+    /**
+     * @param name The parameter name
+     */
+    private CommandParameter( String name )
     {
         this.name = name;
     }
 
+    /**
+     * @return The parameter name
+     */
     public String getName()
     {
         return name;

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameters.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameters.java?view=diff&rev=522852&r1=522851&r2=522852
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameters.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameters.java
Tue Mar 27 03:06:03 2007
@@ -36,6 +36,13 @@
     // String
     // ----------------------------------------------------------------------
 
+    /**
+     * Return the parameter value as String.
+     *
+     * @param parameter The parameter
+     * @return The parameter value as a String
+     * @throws ScmException if the parameter doesn't exist
+     */
     public String getString( CommandParameter parameter )
         throws ScmException
     {
@@ -49,6 +56,14 @@
         return object.toString();
     }
 
+    /**
+     * Return the parameter value or the default value if it doesn't exist.
+     *
+     * @param parameter    The parameter
+     * @param defaultValue The default value
+     * @return The parameter value as a String
+     * @throws ScmException if the value is in the wrong type
+     */
     public String getString( CommandParameter parameter, String defaultValue )
         throws ScmException
     {
@@ -62,6 +77,13 @@
         return object.toString();
     }
 
+    /**
+     * Set a parameter value.
+     *
+     * @param parameter The parameter name
+     * @param value     The value of the parameter
+     * @throws ScmException if the parameter already exist
+     */
     public void setString( CommandParameter parameter, String value )
         throws ScmException
     {
@@ -72,12 +94,26 @@
     // Int
     // ----------------------------------------------------------------------
 
+    /**
+     * Return the parameter value as int.
+     *
+     * @param parameter The parameter
+     * @return The parameter value as a String
+     * @throws ScmException if the parameter doesn't exist
+     */
     public int getInt( CommandParameter parameter )
         throws ScmException
     {
         return ( (Integer) getObject( Integer.class, parameter ) ).intValue();
     }
 
+    /**
+     * Return the parameter value as int or the default value if it doesn't exist.
+     *
+     * @param parameter The parameter
+     * @return The parameter value as a String
+     * @throws ScmException if the value is in the wrong type
+     */
     public int getInt( CommandParameter parameter, int defaultValue )
         throws ScmException
     {
@@ -91,6 +127,13 @@
         return value.intValue();
     }
 
+    /**
+     * Set a parameter value.
+     *
+     * @param parameter The parameter name
+     * @param value     The value of the parameter
+     * @throws ScmException if the parameter already exist
+     */
     public void setInt( CommandParameter parameter, int value )
         throws ScmException
     {
@@ -101,18 +144,39 @@
     // Date
     // ----------------------------------------------------------------------
 
+    /**
+     * Return the parameter value as Date.
+     *
+     * @param parameter The parameter
+     * @return The parameter value as a String
+     * @throws ScmException if the parameter doesn't exist
+     */
     public Date getDate( CommandParameter parameter )
         throws ScmException
     {
         return (Date) getObject( Date.class, parameter );
     }
 
+    /**
+     * Return the parameter value as String or the default value if it doesn't exist.
+     *
+     * @param parameter The parameter
+     * @return The parameter value as a String
+     * @throws ScmException if the value is in the wrong type
+     */
     public Date getDate( CommandParameter parameter, Date defaultValue )
         throws ScmException
     {
         return (Date) getObject( Date.class, parameter, defaultValue );
     }
 
+    /**
+     * Set a parameter value.
+     *
+     * @param parameter The parameter name
+     * @param date      The value of the parameter
+     * @throws ScmException if the parameter already exist
+     */
     public void setDate( CommandParameter parameter, Date date )
         throws ScmException
     {
@@ -123,6 +187,13 @@
     // Boolean
     // ----------------------------------------------------------------------
 
+    /**
+     * Return the parameter value as boolean.
+     *
+     * @param parameter The parameter
+     * @return The parameter value as a String
+     * @throws ScmException if the parameter doesn't exist
+     */
     public boolean getBoolean( CommandParameter parameter )
         throws ScmException
     {
@@ -149,6 +220,14 @@
     //
     // ----------------------------------------------------------------------
 
+    /**
+     * Return the value object.
+     *
+     * @param clazz     The type of the parameter value
+     * @param parameter The parameter
+     * @return The parameter value
+     * @throws ScmException if the parameter doesn't exist
+     */
     private Object getObject( Class clazz, CommandParameter parameter )
         throws ScmException
     {
@@ -162,6 +241,14 @@
         return object;
     }
 
+    /**
+     * Return the value object or the default value if it doesn't exist.
+     *
+     * @param clazz     The type of the parameter value
+     * @param parameter The parameter
+     * @return The parameter value
+     * @throws ScmException if the defaultValue is in the wrong type
+     */
     private Object getObject( Class clazz, CommandParameter parameter, Object defaultValue
)
         throws ScmException
     {
@@ -181,6 +268,13 @@
         return object;
     }
 
+    /**
+     * Set the parameter value.
+     *
+     * @param parameter The parameter
+     * @param value     The parameter value
+     * @throws ScmException if the parameter already exist
+     */
     private void setObject( CommandParameter parameter, Object value )
         throws ScmException
     {

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/NoSuchCommandScmException.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/NoSuchCommandScmException.java?view=diff&rev=522852&r1=522851&r2=522852
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/NoSuchCommandScmException.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/NoSuchCommandScmException.java
Tue Mar 27 03:06:03 2007
@@ -33,6 +33,11 @@
         super( "No such command '" + commandName + "'." );
     }
 
+    /**
+     * Return the command name.
+     *
+     * @return The command name
+     */
     public String getCommandName()
     {
         return commandName;

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFile.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFile.java?view=diff&rev=522852&r1=522851&r2=522852
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFile.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFile.java Tue Mar
27 03:06:03 2007
@@ -30,6 +30,10 @@
 
     private ScmFileStatus status;
 
+    /**
+     * @param path   The file path
+     * @param status The file status
+     */
     public ScmFile( String path, ScmFileStatus status )
     {
         this.path = path;
@@ -37,11 +41,17 @@
         this.status = status;
     }
 
+    /**
+     * @return the file path
+     */
     public String getPath()
     {
         return path;
     }
 
+    /**
+     * @return The file status
+     */
     public ScmFileStatus getStatus()
     {
         return status;

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileStatus.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileStatus.java?view=diff&rev=522852&r1=522851&r2=522852
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileStatus.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileStatus.java Tue
Mar 27 03:06:03 2007
@@ -79,10 +79,13 @@
     public final static ScmFileStatus UPDATED = new ScmFileStatus( "updated" );
 
     /**
-     * The file is part of a tag
+     * The file is part of a tag.
      */
     public static final ScmFileStatus TAGGED = new ScmFileStatus( "tagged" );
 
+    /**
+     * The file is locked.
+     */
     public static final ScmFileStatus LOCKED = new ScmFileStatus( "locked" );
 
     /**
@@ -90,6 +93,9 @@
      */
     public static final ScmFileStatus UNKNOWN = new ScmFileStatus( "unknown" );
 
+    /**
+     * The status name
+     */
     private final String name;
 
     private ScmFileStatus( String name )

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmResult.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmResult.java?view=diff&rev=522852&r1=522851&r2=522852
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmResult.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmResult.java Tue Mar
27 03:06:03 2007
@@ -37,7 +37,7 @@
      * Copy constructor.
      * <p/>
      * Typically used from derived classes when wrapping a ScmResult
-     * into a spesific type eg. AddAcmResult
+     * into a specific type eg. AddScmResult
      */
     public ScmResult( ScmResult scmResult )
     {
@@ -50,6 +50,14 @@
         this.success = scmResult.success;
     }
 
+    /**
+     * ScmResult contructor.
+     *
+     * @param commandLine     The provider specific command line used
+     * @param providerMessage The provider message
+     * @param commandOutput   The command output of the scm tool
+     * @param success         True if the command is in success
+     */
     public ScmResult( String commandLine, String providerMessage, String commandOutput, boolean
success )
     {
         this.commandLine = commandLine;
@@ -61,6 +69,9 @@
         this.success = success;
     }
 
+    /**
+     * @return True if the command was in success
+     */
     public boolean isSuccess()
     {
         return success;

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java?view=diff&rev=522852&r1=522851&r2=522852
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java
Tue Mar 27 03:06:03 2007
@@ -47,7 +47,7 @@
 
     private ScmLogger logger;
 
-    protected void setScmProviders( Map providers )
+    protected void setScmProviders( Map/*<String,ScmProvider>*/ providers )
     {
         this.scmProviders = providers;
     }
@@ -156,6 +156,12 @@
         return new ScmRepository( providerType, providerRepository );
     }
 
+    /**
+     * Clean the SCM url by removing all ../ in path
+     *
+     * @param scmUrl the SCM url
+     * @return the cleaned SCM url
+     */
     protected String cleanScmUrl( String scmUrl )
     {
         if ( scmUrl == null )

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java?view=diff&rev=522852&r1=522851&r2=522852
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java
Tue Mar 27 03:06:03 2007
@@ -41,6 +41,14 @@
     // Repository
     // ----------------------------------------------------------------------
 
+    /**
+     * Generate a SCMRepository from a SCM url
+     *
+     * @param scmUrl the scm url
+     * @return
+     * @throws ScmRepositoryException
+     * @throws NoSuchScmProviderException
+     */
     ScmRepository makeScmRepository( String scmUrl )
         throws ScmRepositoryException, NoSuchScmProviderException;
 
@@ -58,6 +66,15 @@
     ScmProvider getProviderByUrl( String scmUrl )
         throws ScmRepositoryException, NoSuchScmProviderException;
 
+    /**
+     * Returns the default provider registered for this providerType or a specific implementation
if the
+     * 'maven.scm.provider.providerType.implementation' system proerty is defined.
+     * For example:  maven.scm.provider.cvs.implementation=cvs_native
+     *
+     * @param providerType The provider type (cvs, svn...)
+     * @return The scm provider
+     * @throws NoSuchScmProviderException if the provider doesn't exist
+     */
     ScmProvider getProviderByType( String providerType )
         throws NoSuchScmProviderException;
 

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java?view=diff&rev=522852&r1=522851&r2=522852
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
Tue Mar 27 03:06:03 2007
@@ -69,7 +69,7 @@
         return null;
     }
 
-    /* (non-Javadoc)
+    /**
     * @see org.apache.maven.scm.provider.ScmProvider#sanitizeTagName(java.lang.String)
     */
     public String sanitizeTagName( String tag )
@@ -78,7 +78,7 @@
         return tag;
     }
 
-    /* (non-Javadoc)
+    /**
     * @see org.apache.maven.scm.provider.ScmProvider#validateTagName(java.lang.String)
     */
     public boolean validateTagName( String tag )

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java?view=diff&rev=522852&r1=522851&r2=522852
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java
Tue Mar 27 03:06:03 2007
@@ -53,6 +53,11 @@
 
     String getScmType();
 
+    /**
+     * Add a logger listener.
+     *
+     * @param logger The logger
+     */
     void addListener( ScmLogger logger );
 
     boolean requiresEditMode();
@@ -63,6 +68,13 @@
     ScmProviderRepository makeProviderScmRepository( File path )
         throws ScmRepositoryException, UnknownRepositoryStructure;
 
+    /**
+     * Validate the scm url.
+     *
+     * @param scmSpecificUrl The SCM url
+     * @param delimiter      The delimiter used in the SCM url
+     * @return Returns a list of messages if the validation failed
+     */
     List validateScmUrl( String scmSpecificUrl, char delimiter );
 
     /**
@@ -121,9 +133,9 @@
      *                   from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
      * @param startDate  the start date of the period
      * @param endDate    the end date of the period
-     * @param numDays
-     * @param branch
-     * @return
+     * @param numDays    the number days before the current time if startdate and enddate
are null
+     * @param branch     the branch/tag name
+     * @return The SCM result of the changelog command
      * @throws ScmException
      */
     ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate,
Date endDate,
@@ -139,10 +151,10 @@
      *                    from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
      * @param startDate   the start date of the period
      * @param endDate     the end date of the period
-     * @param numDays
-     * @param branch
+     * @param numDays     the number days before the current time if startdate and enddate
are null
+     * @param branch      the branch/tag name
      * @param datePattern the date pattern use in changelog output returned by scm tool
-     * @return
+     * @return The SCM result of the changelog command
      * @throws ScmException
      */
     ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate,
Date endDate,
@@ -158,7 +170,7 @@
      *                   from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
      * @param startTag   the start tag
      * @param endTag     the end tag
-     * @return
+     * @return The SCM result of the changelog command
      * @throws ScmException
      */
     ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, String startTag,
String endTag )
@@ -191,7 +203,7 @@
      *
      * @param repository the source control system
      * @param fileSet    the files to check in (sometimes called commit)
-     * @param tag
+     * @param tag        tag or revision
      * @param message    a string that is a comment on the changes that where done
      * @return
      * @throws ScmException

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/util/AbstractConsumer.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/util/AbstractConsumer.java?view=diff&rev=522852&r1=522851&r2=522852
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/util/AbstractConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/util/AbstractConsumer.java
Tue Mar 27 03:06:03 2007
@@ -38,6 +38,11 @@
 {
     private ScmLogger logger;
 
+    /**
+     * AbstractConsumer constructor.
+     *
+     * @param logger The logger to use in the consumer
+     */
     public AbstractConsumer( ScmLogger logger )
     {
         setLogger( logger );



Mime
View raw message