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-providers/starteam/src/java/org/apache/maven/genericscm/provider/starteam/command/changelog StarteamChangeLogCommand.java StarteamChangeLogConsumer.java
Date Sat, 06 Dec 2003 17:09:29 GMT
evenisse    2003/12/06 09:09:29

  Modified:    generic-scm-providers/perforce/src/java/org/apache/maven/genericscm/provider/perforce/command/changelog
                        PerforceChangeLogCommand.java
                        PerforceChangeLogConsumer.java
               generic-scm-providers/starteam/src/java/org/apache/maven/genericscm/provider/starteam/command/changelog
                        StarteamChangeLogCommand.java
                        StarteamChangeLogConsumer.java
  Log:
  Fix dates management
  
  Revision  Changes    Path
  1.2       +25 -7     maven-scm/generic-scm-providers/perforce/src/java/org/apache/maven/genericscm/provider/perforce/command/changelog/PerforceChangeLogCommand.java
  
  Index: PerforceChangeLogCommand.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/generic-scm-providers/perforce/src/java/org/apache/maven/genericscm/provider/perforce/command/changelog/PerforceChangeLogCommand.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PerforceChangeLogCommand.java	6 Dec 2003 16:55:19 -0000	1.1
  +++ PerforceChangeLogCommand.java	6 Dec 2003 17:09:29 -0000	1.2
  @@ -76,8 +76,6 @@
       implements ChangeLogCommand
   {
   	private ChangeLogConsumer consumer;
  -    private Date startDate;
  -    private Date endDate;
   
       public PerforceChangeLogCommand() throws ScmException
       {
  @@ -89,7 +87,10 @@
        */
       public void setStartDate(Date startDate)
       {
  -        this.startDate = startDate;
  +        if (consumer != null && consumer instanceof PerforceChangeLogConsumer)
  +        {
  +            ((PerforceChangeLogConsumer)consumer).setStartDate(startDate);
  +        }
       }
   
       /* (non-Javadoc)
  @@ -97,7 +98,14 @@
        */
       public Date getStartDate()
       {
  -        return startDate;
  +        if (consumer != null && consumer instanceof PerforceChangeLogConsumer)
  +        {
  +            return ((PerforceChangeLogConsumer)consumer).getStartDate();
  +        }
  +        else
  +        {
  +            return null;
  +        }
       }
   
       /* (non-Javadoc)
  @@ -105,7 +113,10 @@
        */
       public void setEndDate(Date endDate)
       {
  -        this.endDate = endDate;
  +        if (consumer != null && consumer instanceof PerforceChangeLogConsumer)
  +        {
  +            ((PerforceChangeLogConsumer)consumer).setEndDate(endDate);
  +        }
       }
   
       /* (non-Javadoc)
  @@ -113,7 +124,14 @@
        */
       public Date getEndDate()
       {
  -        return endDate;
  +        if (consumer != null && consumer instanceof PerforceChangeLogConsumer)
  +        {
  +            return ((PerforceChangeLogConsumer)consumer).getEndDate();
  +        }
  +        else
  +        {
  +            return null;
  +        }
       }
   
       /* (non-Javadoc)
  
  
  
  1.2       +21 -1     maven-scm/generic-scm-providers/perforce/src/java/org/apache/maven/genericscm/provider/perforce/command/changelog/PerforceChangeLogConsumer.java
  
  Index: PerforceChangeLogConsumer.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/generic-scm-providers/perforce/src/java/org/apache/maven/genericscm/provider/perforce/command/changelog/PerforceChangeLogConsumer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PerforceChangeLogConsumer.java	6 Dec 2003 16:55:19 -0000	1.1
  +++ PerforceChangeLogConsumer.java	6 Dec 2003 17:09:29 -0000	1.2
  @@ -267,4 +267,24 @@
           toDate = new Date(
               System.currentTimeMillis() + (long) 1 * 24 * 60 * 60 * 1000);
       }
  +    
  +    public void setStartDate(Date startDate)
  +    {
  +        beforeDate = startDate;
  +    }
  +    
  +    public Date getStartDate()
  +    {
  +        return beforeDate;
  +    }
  +    
  +    public void setEndDate(Date endDate)
  +    {
  +        toDate = endDate;
  +    }
  +    
  +    public Date getEndDate()
  +    {
  +        return toDate;
  +    }
   }
  
  
  
  1.5       +25 -7     maven-scm/generic-scm-providers/starteam/src/java/org/apache/maven/genericscm/provider/starteam/command/changelog/StarteamChangeLogCommand.java
  
  Index: StarteamChangeLogCommand.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/generic-scm-providers/starteam/src/java/org/apache/maven/genericscm/provider/starteam/command/changelog/StarteamChangeLogCommand.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- StarteamChangeLogCommand.java	6 Dec 2003 16:55:19 -0000	1.4
  +++ StarteamChangeLogCommand.java	6 Dec 2003 17:09:29 -0000	1.5
  @@ -76,8 +76,6 @@
       implements ChangeLogCommand
   {
   	private ChangeLogConsumer consumer;
  -    private Date startDate;
  -    private Date endDate;
   
       public StarteamChangeLogCommand() throws ScmException
       {
  @@ -89,7 +87,10 @@
        */
       public void setStartDate(Date startDate)
       {
  -        this.startDate = startDate;
  +        if (consumer != null && consumer instanceof StarteamChangeLogConsumer)
  +        {
  +            ((StarteamChangeLogConsumer)consumer).setStartDate(startDate);
  +        }
       }
   
       /* (non-Javadoc)
  @@ -97,7 +98,14 @@
        */
       public Date getStartDate()
       {
  -        return startDate;
  +        if (consumer != null && consumer instanceof StarteamChangeLogConsumer)
  +        {
  +            return ((StarteamChangeLogConsumer)consumer).getStartDate();
  +        }
  +        else
  +        {
  +            return null;
  +        }
       }
   
       /* (non-Javadoc)
  @@ -105,7 +113,10 @@
        */
       public void setEndDate(Date endDate)
       {
  -        this.endDate = endDate;
  +        if (consumer != null && consumer instanceof StarteamChangeLogConsumer)
  +        {
  +            ((StarteamChangeLogConsumer)consumer).setEndDate(endDate);
  +        }
       }
   
       /* (non-Javadoc)
  @@ -113,7 +124,14 @@
        */
       public Date getEndDate()
       {
  -        return endDate;
  +        if (consumer != null && consumer instanceof StarteamChangeLogConsumer)
  +        {
  +            return ((StarteamChangeLogConsumer)consumer).getEndDate();
  +        }
  +        else
  +        {
  +            return null;
  +        }
       }
   
       /* (non-Javadoc)
  
  
  
  1.3       +21 -1     maven-scm/generic-scm-providers/starteam/src/java/org/apache/maven/genericscm/provider/starteam/command/changelog/StarteamChangeLogConsumer.java
  
  Index: StarteamChangeLogConsumer.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/generic-scm-providers/starteam/src/java/org/apache/maven/genericscm/provider/starteam/command/changelog/StarteamChangeLogConsumer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StarteamChangeLogConsumer.java	6 Dec 2003 16:55:19 -0000	1.2
  +++ StarteamChangeLogConsumer.java	6 Dec 2003 17:09:29 -0000	1.3
  @@ -380,4 +380,24 @@
           toDate = new Date(
               System.currentTimeMillis() + (long) 1 * 24 * 60 * 60 * 1000);
       }
  +    
  +    public void setStartDate(Date startDate)
  +    {
  +        beforeDate = startDate;
  +    }
  +    
  +    public Date getStartDate()
  +    {
  +        return beforeDate;
  +    }
  +    
  +    public void setEndDate(Date endDate)
  +    {
  +        toDate = endDate;
  +    }
  +    
  +    public Date getEndDate()
  +    {
  +        return toDate;
  +    }
   }
  
  
  

Mime
View raw message