incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clomb...@apache.org
Subject svn commit: r160459 - in incubator/graffito/trunk/components: ./ src/java/org/apache/portals/graffito/model/impl/ src/test/org/apache/portals/graffito/impl/ src/test/org/apache/portals/graffito/persistence/impl/
Date Thu, 07 Apr 2005 20:31:28 GMT
Author: clombart
Date: Thu Apr  7 13:31:26 2005
New Revision: 160459

URL: http://svn.apache.org/viewcvs?view=rev&rev=160459
Log:
* fix typing error
* Update dependencies version (Spring, OJB, J2)
* Use timestamp for dates

Modified:
    incubator/graffito/trunk/components/maven.xml
    incubator/graffito/trunk/components/project.xml
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/CmsObjectImpl.java
    incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/DocumentImpl.java
    incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentModelService.java
    incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentSearchService.java
    incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentVersionService.java
    incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/persistence/impl/TestPersistenceService.java

Modified: incubator/graffito/trunk/components/maven.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/maven.xml?view=diff&r1=160458&r2=160459
==============================================================================
--- incubator/graffito/trunk/components/maven.xml (original)
+++ incubator/graffito/trunk/components/maven.xml Thu Apr  7 13:31:26 2005
@@ -31,7 +31,7 @@
 		<j:set var="org.apache.portals.graffito.database.password" value="${org.apache.portals.graffito.test.database.password}"/>
 		<copy file="src/test/repository.xml" todir="${maven.test.dest}" overwrite="true" failonerror="false">
 			<filterset begintoken="@" endtoken="@">
-				<filter token="PLATFORM" value="${org.apache.portals.graffito.database.ojb.plateform}"/>
+				<filter token="PLATFORM" value="${org.apache.portals.graffito.database.ojb.platform}"/>
 			</filterset>
 			<filterset begintoken="@" endtoken="@">
 				<filter token="DATASOURCE" value="${org.apache.portals.graffito.database.ojb.datasource}"/>

Modified: incubator/graffito/trunk/components/project.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/project.xml?view=diff&r1=160458&r2=160459
==============================================================================
--- incubator/graffito/trunk/components/project.xml (original)
+++ incubator/graffito/trunk/components/project.xml Thu Apr  7 13:31:26 2005
@@ -52,37 +52,37 @@
     <dependency>
       <id>jetspeed-persistence</id>
       <groupId>jetspeed2</groupId>
-      <version>2.0-a1-dev</version>
+      <version>2.0-M3-dev</version>
     </dependency>
     
     <dependency>
       <id>jetspeed-api</id>
       <groupId>jetspeed2</groupId>
-      <version>2.0-a1-dev</version>
+      <version>2.0-M3-dev</version>
     </dependency>
 
     <dependency>
       <id>jetspeed-security</id>
       <groupId>jetspeed2</groupId>
-      <version>2.0-a1-dev</version>
+      <version>2.0-M3-dev</version>
     </dependency>    
      
      <dependency>
       <id>jetspeed-cm</id>
       <groupId>jetspeed2</groupId>
-      <version>2.0-a1-dev</version>
+      <version>2.0-M3-dev</version>
     </dependency>
        
     <dependency>
       <id>jetspeed-rdbms</id>
       <groupId>jetspeed2</groupId>
-      <version>2.0-a1-dev</version>
+      <version>2.0-M3-dev</version>
     </dependency>
 
     <dependency>
       <id>jetspeed-commons</id>
       <groupId>jetspeed2</groupId>
-      <version>2.0-a1-dev</version>
+      <version>2.0-M3-dev</version>
     </dependency>    
     
     <dependency>
@@ -97,7 +97,7 @@
     
     <dependency>
       <id>ojb:db-ojb</id>
-      <version>1.0.1</version>
+      <version>1.0.2</version>
     </dependency>
     
     <dependency>
@@ -177,32 +177,32 @@
                  
     <dependency>
       <id>springframework:spring-core</id>
-      <version>1.1.1</version>
+      <version>1.1.5</version>
     </dependency>
 
     <dependency>
       <id>springframework:spring-aop</id>
-      <version>1.1.1</version>
+      <version>1.1.5</version>
     </dependency>
 
     <dependency>
       <id>springframework:spring-context</id>
-      <version>1.1.1</version>
+      <version>1.1.5</version>
     </dependency>
 
     <dependency>
       <id>springframework:spring-dao</id>
-      <version>1.1.1</version>
+      <version>1.1.5</version>
     </dependency>
 
     <dependency>
       <id>springframework:spring-orm</id>
-      <version>1.1.1</version>
+      <version>1.1.5</version>
     </dependency>
 
    <dependency>
       <id>cglib</id>
-      <version>2.0.1</version>
+      <version>full-2.0.2</version>
     </dependency>
     
     <dependency>

Modified: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/CmsObjectImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/CmsObjectImpl.java?view=diff&r1=160458&r2=160459
==============================================================================
--- incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/CmsObjectImpl.java
(original)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/CmsObjectImpl.java
Thu Apr  7 13:31:26 2005
@@ -17,7 +17,7 @@
 
 import java.io.NotSerializableException;
 import java.io.Serializable;
-import java.util.Date;
+import java.sql.Timestamp;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -49,8 +49,8 @@
     
     protected String description;
     protected String title;
-    protected Date creationDate;
-    protected Date lastModified;
+    protected Timestamp creationDate;
+    protected Timestamp lastModified;
     
     protected Map properties = new HashMap();
     protected Map objects = new HashMap();
@@ -190,7 +190,7 @@
     /* 
      * @see org.apache.portals.graffito.model.CmsObject#getCreationDate()
      */
-    public Date getCreationDate()
+    public Timestamp getCreationDate()
     {
         return this.creationDate;
     }
@@ -198,7 +198,7 @@
     /* 
      * @see org.apache.portals.graffito.model.CmsObject#setCreationDate(java.util.Date)
      */
-    public void setCreationDate(Date creationDate)
+    public void setCreationDate(Timestamp creationDate)
     {
         this.creationDate = creationDate;
     }
@@ -206,7 +206,7 @@
     /* 
      * @see org.apache.portals.graffito.model.CmsObject#getLastModified()
      */
-    public Date getLastModified()
+    public Timestamp getLastModified()
     {
         return this.lastModified;
     }
@@ -214,7 +214,7 @@
     /* 
      * @see org.apache.portals.graffito.model.CmsObject#setLastModified(java.util.Date)
      */
-    public void setLastModified(Date lastModified)
+    public void setLastModified(Timestamp lastModified)
     {
         this.lastModified = lastModified;
     }

Modified: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/DocumentImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/DocumentImpl.java?view=diff&r1=160458&r2=160459
==============================================================================
--- incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/DocumentImpl.java
(original)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/DocumentImpl.java
Thu Apr  7 13:31:26 2005
@@ -17,6 +17,7 @@
 
 
 import java.io.Serializable;
+import java.sql.Timestamp;
 import java.util.*;
 
 import org.apache.commons.logging.Log;
@@ -218,10 +219,10 @@
     {
        Document clone = new DocumentImpl();
        clone.setContent((Content) this.getContent().clone());
-       clone.setCreationDate(new Date());
+       clone.setCreationDate(new Timestamp(System.currentTimeMillis()));
        clone.setDescription(this.getDescription());
        clone.setLanguage(this.getLanguage());
-       clone.setLastModified(new Date());
+       clone.setLastModified(new Timestamp(System.currentTimeMillis()));
        clone.setName(this.getName());
        clone.setOwner(this.getOwner());
        clone.setParentFolder(this.getParentFolder());

Modified: incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentModelService.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentModelService.java?view=diff&r1=160458&r2=160459
==============================================================================
--- incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentModelService.java
(original)
+++ incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentModelService.java
Thu Apr  7 13:31:26 2005
@@ -16,7 +16,7 @@
 package org.apache.portals.graffito.impl;
 
 import java.io.FileInputStream;
-import java.sql.Date;
+import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -109,8 +109,8 @@
         // Create a folder
         // ---------------------------------------------------------------------------------------
         Folder folder = modelService.createFolder();
-        folder.setCreationDate(new Date(System.currentTimeMillis()));
-        folder.setLastModified(new Date(System.currentTimeMillis()));
+        folder.setCreationDate(new Timestamp(System.currentTimeMillis()));
+        folder.setLastModified(new Timestamp(System.currentTimeMillis()));
 
         folder.setDescription("Folder 1");
         folder.setName("folder1");
@@ -177,8 +177,8 @@
         // Create a folder
         // ---------------------------------------------------------------------------------------
         Folder folder = modelService.createFolder();
-        folder.setCreationDate(new Date(System.currentTimeMillis()));
-        folder.setLastModified(new Date(System.currentTimeMillis()));
+        folder.setCreationDate(new Timestamp(System.currentTimeMillis()));
+        folder.setLastModified(new Timestamp(System.currentTimeMillis()));
 
         folder.setDescription("Folder 1");
         folder.setName("folder1");
@@ -195,8 +195,8 @@
         // Create a Link
         // ---------------------------------------------------------------------------------------
         Link link = modelService.createLink();
-        link.setCreationDate(new Date(System.currentTimeMillis()));
-        link.setLastModified(new Date(System.currentTimeMillis()));
+        link.setCreationDate(new Timestamp(System.currentTimeMillis()));
+        link.setLastModified(new Timestamp(System.currentTimeMillis()));
 
         link.setDescription("Link 1");
         link.setName("Link1");
@@ -269,8 +269,8 @@
             document.setSize(xmlContent.length);
             document.setLanguage("en");
 
-            document.setCreationDate(new Date(System.currentTimeMillis()));
-            document.setLastModified(new Date(System.currentTimeMillis()));
+            document.setCreationDate(new Timestamp(System.currentTimeMillis()));
+            document.setLastModified(new Timestamp(System.currentTimeMillis()));
             document.setDescription("Document 1");
             document.setName("document1");
             document.setTitle("Document 1 Title");
@@ -360,8 +360,8 @@
             document.setSize(xmlContent.length);
             document.setLanguage("en");
 
-            document.setCreationDate(new Date(System.currentTimeMillis()));
-            document.setLastModified(new Date(System.currentTimeMillis()));
+            document.setCreationDate(new Timestamp(System.currentTimeMillis()));
+            document.setLastModified(new Timestamp(System.currentTimeMillis()));
             document.setDescription("Document 1");
             document.setName("document1");
             document.setTitle("Document 1 Title");
@@ -380,8 +380,8 @@
             document2.setSize(xmlContent.length);
             document2.setLanguage("en");
 
-            document2.setCreationDate(new Date(System.currentTimeMillis()));
-            document2.setLastModified(new Date(System.currentTimeMillis()));
+            document2.setCreationDate(new Timestamp(System.currentTimeMillis()));
+            document2.setLastModified(new Timestamp(System.currentTimeMillis()));
             document2.setDescription("Document 1");
             document2.setName("document1");
             document2.setTitle("Document 1 Title");
@@ -427,8 +427,8 @@
         // ---------------------------------------------------------------------------------------
         
         Folder root = modelService.createFolder();
-        root.setCreationDate(new Date(System.currentTimeMillis()));
-        root.setLastModified(new Date(System.currentTimeMillis()));
+        root.setCreationDate(new Timestamp(System.currentTimeMillis()));
+        root.setLastModified(new Timestamp(System.currentTimeMillis()));
 
         root.setDescription("Root");
         root.setName("root");
@@ -526,8 +526,8 @@
       // Create a folder & Add a folder with uri = server.scrope
       // ---------------------------------------------------------------------------------------
       folder = modelService.createFolder();
-      folder.setCreationDate(new Date(System.currentTimeMillis()));
-      folder.setLastModified(new Date(System.currentTimeMillis()));
+      folder.setCreationDate(new Timestamp(System.currentTimeMillis()));
+      folder.setLastModified(new Timestamp(System.currentTimeMillis()));
 
       folder.setDescription("Folder 1");
       folder.setName("folder1");
@@ -560,8 +560,8 @@
       document.setSize(xmlContent.length);
       document.setLanguage("en");
 
-      document.setCreationDate(new Date(System.currentTimeMillis()));
-      document.setLastModified(new Date(System.currentTimeMillis()));
+      document.setCreationDate(new Timestamp(System.currentTimeMillis()));
+      document.setLastModified(new Timestamp(System.currentTimeMillis()));
       document.setDescription("Document 1");
       document.setName("document1");
       document.setTitle("Document 1 Title");
@@ -588,8 +588,8 @@
         for (int i = 1; i <= NUMBER_OF_FOLDERS; i++)
         {
             Folder folder = modelService.createFolder();
-            folder.setCreationDate(new Date(System.currentTimeMillis()));
-            folder.setLastModified(new Date(System.currentTimeMillis()));
+            folder.setCreationDate(new Timestamp(System.currentTimeMillis()));
+            folder.setLastModified(new Timestamp(System.currentTimeMillis()));
 
             folder.setDescription("Folder" + i);
             folder.setName("Folder" + i);
@@ -611,8 +611,8 @@
         for (int i = 1; i <= NUMBER_OF_DOCUMENTS; i++)
         {
             Document document = modelService.createDocument();
-            document.setCreationDate(new Date(System.currentTimeMillis()));
-            document.setLastModified(new Date(System.currentTimeMillis()));
+            document.setCreationDate(new Timestamp(System.currentTimeMillis()));
+            document.setLastModified(new Timestamp(System.currentTimeMillis()));
 
             document.setDescription("Document" + i);
             document.setName("Document" + i);

Modified: incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentSearchService.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentSearchService.java?view=diff&r1=160458&r2=160459
==============================================================================
--- incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentSearchService.java
(original)
+++ incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentSearchService.java
Thu Apr  7 13:31:26 2005
@@ -15,7 +15,7 @@
  */
 package org.apache.portals.graffito.impl;
 import java.io.FileInputStream;
-import java.sql.Date;
+import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -100,8 +100,8 @@
         // Create the root folder
         // ---------------------------------------------------------------------------------------
                           
         Folder root = modelService.createFolder();
-        root.setCreationDate(new Date(System.currentTimeMillis()));
-        root.setLastModified(new Date(System.currentTimeMillis()));
+        root.setCreationDate(new Timestamp(System.currentTimeMillis()));
+        root.setLastModified(new Timestamp(System.currentTimeMillis()));
 
         root.setDescription("Root");
         root.setName("root");
@@ -162,8 +162,8 @@
         for (int i = 1; i <= NUMBER_OF_FOLDERS; i++)
         {
             Folder folder = service.createFolder();
-            folder.setCreationDate(new Date(System.currentTimeMillis()));
-            folder.setLastModified(new Date(System.currentTimeMillis()));
+            folder.setCreationDate(new Timestamp(System.currentTimeMillis()));
+            folder.setLastModified(new Timestamp(System.currentTimeMillis()));
 
             folder.setDescription("Folder" + i);
             folder.setName("Folder" + i);
@@ -185,8 +185,8 @@
         for (int i = 1; i <= NUMBER_OF_DOCUMENTS; i++)
         {
             Document document = modelService.createDocument();
-            document.setCreationDate(new Date(System.currentTimeMillis()));
-            document.setLastModified(new Date(System.currentTimeMillis()));
+            document.setCreationDate(new Timestamp(System.currentTimeMillis()));
+            document.setLastModified(new Timestamp(System.currentTimeMillis()));
 
             document.setDescription("Document" + i);
             document.setName("Document" + i);

Modified: incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentVersionService.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentVersionService.java?view=diff&r1=160458&r2=160459
==============================================================================
--- incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentVersionService.java
(original)
+++ incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/impl/TestContentVersionService.java
Thu Apr  7 13:31:26 2005
@@ -19,7 +19,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Date;
+import java.sql.Timestamp;
 import java.util.List;
 
 import junit.framework.Test;
@@ -27,13 +27,10 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import org.apache.ojb.broker.PBKey;
-import org.apache.ojb.broker.PersistenceBroker;
 import org.apache.portals.graffito.persistence.impl.PersistenceSupportedTestCase;
 import org.apache.portals.graffito.util.StreamUtil;
 import org.apache.portals.graffito.ContentModelService;
-import org.apache.portals.graffito.ContentSearchService;
+
 import org.apache.portals.graffito.ContentVersionService;
 import org.apache.portals.graffito.model.Document;
 import org.apache.portals.graffito.model.HistoryElement;
@@ -109,8 +106,8 @@
             document.setSize(xmlContent.length);
             document.setLanguage("en");
 
-            document.setCreationDate(new Date());
-            document.setLastModified(new Date());
+            document.setCreationDate(new Timestamp(System.currentTimeMillis()));
+            document.setLastModified(new Timestamp(System.currentTimeMillis()));
             document.setDescription("Document 1");
             document.setName("document1");
             document.setTitle("Document 1 Title");

Modified: incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/persistence/impl/TestPersistenceService.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/persistence/impl/TestPersistenceService.java?view=diff&r1=160458&r2=160459
==============================================================================
--- incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/persistence/impl/TestPersistenceService.java
(original)
+++ incubator/graffito/trunk/components/src/test/org/apache/portals/graffito/persistence/impl/TestPersistenceService.java
Thu Apr  7 13:31:26 2005
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 package org.apache.portals.graffito.persistence.impl;
-import java.sql.Date;
+import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -27,7 +27,6 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.portals.graffito.model.impl.FolderImpl;
 import org.apache.portals.graffito.persistence.impl.PersistenceSupportedTestCase;
-import org.apache.portals.graffito.ContentServerService;
 import org.apache.portals.graffito.model.CmsObject;
 import org.apache.portals.graffito.model.Document;
 import org.apache.portals.graffito.model.Folder;
@@ -95,8 +94,8 @@
         // Add an object
         // --------------------------------------------------------------------------------------
         FolderImpl folder = new FolderImpl();
-        folder.setCreationDate(new Date(System.currentTimeMillis()));
-        folder.setLastModified(new Date(System.currentTimeMillis()));
+        folder.setCreationDate(new Timestamp(System.currentTimeMillis()));
+        folder.setLastModified(new Timestamp(System.currentTimeMillis()));
         folder.setDescription("FolderImpl 1");
         folder.setName("folder1");
         folder.setTitle("FolderImpl 1 Title");
@@ -150,8 +149,8 @@
         // Add objects
         // --------------------------------------------------------------------------------------
         FolderImpl folder = new FolderImpl();
-        folder.setCreationDate(new Date(System.currentTimeMillis()));
-        folder.setLastModified(new Date(System.currentTimeMillis()));
+        folder.setCreationDate(new Timestamp(System.currentTimeMillis()));
+        folder.setLastModified(new Timestamp(System.currentTimeMillis()));
         folder.setDescription("FolderImpl 1");
         folder.setName("folder1");
         folder.setTitle("FolderImpl 1 Title");
@@ -161,8 +160,8 @@
         persistenceService.insert(folder);
 
         folder = new FolderImpl();
-        folder.setCreationDate(new Date(System.currentTimeMillis()));
-        folder.setLastModified(new Date(System.currentTimeMillis()));
+        folder.setCreationDate(new Timestamp(System.currentTimeMillis()));
+        folder.setLastModified(new Timestamp(System.currentTimeMillis()));
         folder.setDescription("FolderImpl 2");
         folder.setName("folder2");
         folder.setTitle("FolderImpl 2 Title");
@@ -203,8 +202,8 @@
        // Add a folder
        // --------------------------------------------------------------------------------------
        FolderImpl folder = new FolderImpl();
-       folder.setCreationDate(new Date(System.currentTimeMillis()));
-       folder.setLastModified(new Date(System.currentTimeMillis()));
+       folder.setCreationDate(new Timestamp(System.currentTimeMillis()));
+       folder.setLastModified(new Timestamp(System.currentTimeMillis()));
        folder.setDescription("FolderImpl 1");
        folder.setName("folder1");
        folder.setTitle("FolderImpl 1 Title");
@@ -226,8 +225,8 @@
        // --------------------------------------------------------------------------------------
        FolderImpl subFolder = new FolderImpl();
        subFolder.setParentFolder(folder);
-       subFolder.setCreationDate(new Date(System.currentTimeMillis()));
-       subFolder.setLastModified(new Date(System.currentTimeMillis()));
+       subFolder.setCreationDate(new Timestamp(System.currentTimeMillis()));
+       subFolder.setLastModified(new Timestamp(System.currentTimeMillis()));
        subFolder.setDescription("FolderImpl 1");
        subFolder.setName("subFolder1");
        subFolder.setTitle("FolderImpl 1 Title");



Mime
View raw message