lenya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andr...@apache.org
Subject cvs commit: cocoon-lenya/src/java/org/apache/lenya/workflow/impl History.java
Date Fri, 15 Aug 2003 13:13:28 GMT
andreas     2003/08/15 06:13:28

  Modified:    src/java/org/apache/lenya/workflow/impl History.java
  Log:
  adding date to history
  
  Revision  Changes    Path
  1.10      +8 -1      cocoon-lenya/src/java/org/apache/lenya/workflow/impl/History.java
  
  Index: History.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/workflow/impl/History.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- History.java	5 Aug 2003 16:29:06 -0000	1.9
  +++ History.java	15 Aug 2003 13:13:28 -0000	1.10
  @@ -77,6 +77,8 @@
   import java.io.FileOutputStream;
   import java.io.IOException;
   import java.nio.channels.FileChannel;
  +import java.text.SimpleDateFormat;
  +import java.util.Date;
   
   import javax.xml.transform.TransformerException;
   
  @@ -96,6 +98,7 @@
       public static final String VARIABLE_ELEMENT = "variable";
       public static final String NAME_ATTRIBUTE = "name";
       public static final String VALUE_ATTRIBUTE = "value";
  +    public static final String DATE_ATTRIBUTE = "date";
   
       /**
        * Creates a new history object. A new history file is created and initialized.
  @@ -239,6 +242,10 @@
           Element versionElement = helper.createElement(VERSION_ELEMENT);
           versionElement.setAttribute(STATE_ATTRIBUTE, state.getId());
           versionElement.setAttribute(EVENT_ATTRIBUTE, event.getName());
  +        
  +        Date now = new Date();
  +        String dateString = SimpleDateFormat.getDateTimeInstance().format(now);
  +        versionElement.setAttribute(DATE_ATTRIBUTE, dateString);
   
           return versionElement;
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org


Mime
View raw message