[kune-commits] r1051 - in trunk: . src/main/java/org/ourproject/kune/platf/server/domain src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic src/test/java/org/ourproject/kune/platf/integration/selenium src/test/java/org/ourproject/kune/platf/server/manager/file

vjrj vjrj at ourproject.org
Sun Feb 22 17:21:37 CET 2009


Author: vjrj
Date: 2009-02-22 17:21:35 +0100 (Sun, 22 Feb 2009)
New Revision: 1051

Modified:
   trunk/TODO
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/Content.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/Group.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/Rate.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/Tag.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/TagUserContent.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/User.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPanel.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/EntityLogoSeleniumTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManagerTest.java
Log:
Complete - task Content name verifications 

Complete - task Add CreatedOn and other Date info to Domain 

Complete - task Tags refactorization (Samer recomendations) 


Modified: trunk/TODO
===================================================================
--- trunk/TODO	2009-02-20 13:41:17 UTC (rev 1050)
+++ trunk/TODO	2009-02-22 16:21:35 UTC (rev 1051)
@@ -10,10 +10,6 @@
    Use org-mode in emacs to easy manage this file
 
 * SHORT-TERM (URGENT)
-** TODO <s> tag refactorization
-   [Tag]  <-1--m->   [TagUserContent (fecha)]  <-m--1->  [Content]                             ^--m-------1-> [User]
-   Think agout wikipedia suggestions:
-   http://www.mediawiki.org/wiki/API
 ** TODO <v> User preferences storing
    (See also variables in 'Styling braimstorming')
    We need a way to store (in db) User preferences (like emite chat configurations) in a extensible way.
@@ -144,6 +140,9 @@
 ** vjrj <v> IconHyperlink.java and IconLabel.java to gwt1.5
 
 * MID-TERM
+** TODO <s> tag UI refactorization
+   Think about wikipedia suggestions:
+   http://www.mediawiki.org/wiki/API
 ** <s,v> Integrate recommendations/suggestions subsystem
 *** Samer suggests to implement a CBR system for suggests :)
     http://en.wikipedia.org/wiki/Case-based_reasoning

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/Content.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/Content.java	2009-02-20 13:41:17 UTC (rev 1050)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/Content.java	2009-02-22 16:21:35 UTC (rev 1051)
@@ -130,8 +130,8 @@
         translations = new ArrayList<ContentTranslation>();
         authors = new ArrayList<User>();
         comments = new HashSet<Comment>();
-        this.createdOn = System.currentTimeMillis();
-        this.lastRevision = new Revision(this);
+        createdOn = System.currentTimeMillis();
+        lastRevision = new Revision(this);
         accessLists = null;
         status = ContentStatus.editingInProgress;
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/Group.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/Group.java	2009-02-20 13:41:17 UTC (rev 1050)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/Group.java	2009-02-22 16:21:35 UTC (rev 1051)
@@ -23,6 +23,7 @@
 import java.util.List;
 import java.util.Map;
 
+import javax.persistence.Basic;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Embedded;
@@ -106,6 +107,9 @@
     @Embedded
     private BasicMimeType logoMime;
 
+    @Basic(optional = false)
+    private final Long createdOn;
+
     public Group() {
         this(null, null, null, null);
     }
@@ -122,6 +126,7 @@
         this.defaultLicense = defaultLicense;
         this.groupType = type;
         this.admissionType = AdmissionType.Moderated;
+        this.createdOn = System.currentTimeMillis();
     }
 
     @Override
@@ -184,6 +189,10 @@
         return null;
     }
 
+    public Long getCreatedOn() {
+        return createdOn;
+    }
+
     public Content getDefaultContent() {
         return defaultContent;
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/Rate.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/Rate.java	2009-02-20 13:41:17 UTC (rev 1050)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/Rate.java	2009-02-22 16:21:35 UTC (rev 1051)
@@ -19,6 +19,7 @@
  */
 package org.ourproject.kune.platf.server.domain;
 
+import javax.persistence.Basic;
 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
 import javax.persistence.Id;
@@ -47,61 +48,69 @@
     @Range(min = 0, max = 5)
     Double value;
 
+    @Basic(optional = false)
+    private final Long createdOn;
+
+    public Rate() {
+        this(null, null, null);
+    }
+
     public Rate(final User rater, final Content content, final Double value) {
         this.rater = rater;
         this.content = content;
         this.value = value;
+        this.createdOn = System.currentTimeMillis();
     }
 
-    public Rate() {
-        this(null, null, null);
+    @Finder(query = "SELECT AVG(r.value) FROM Rate r WHERE r.content = :content")
+    public Double calculateRate(@Named("content") final Content content) {
+        return null;
     }
 
-    public Long getId() {
-        return id;
+    @Finder(query = "SELECT count(*) FROM Rate r WHERE r.content = :content")
+    public Long calculateRateNumberOfUsers(@Named("content") final Content content) {
+        return null;
     }
 
-    public void setId(final Long id) {
-        this.id = id;
+    @Finder(query = "SELECT r FROM Rate r WHERE r.rater = :user AND r.content = :content")
+    public Rate find(@Named("user") final User user, @Named("content") final Content content) {
+        return null;
     }
 
     public Content getContent() {
         return content;
     }
 
-    public void setContent(final Content content) {
-        this.content = content;
+    public Long getCreatedOn() {
+        return createdOn;
     }
 
+    public Long getId() {
+        return id;
+    }
+
     public User getRater() {
         return rater;
     }
 
-    public void setRater(final User rater) {
-        this.rater = rater;
-    }
-
     public Double getValue() {
         return value;
     }
 
-    public void setValue(final Double value) {
-        this.value = value;
+    public void setContent(final Content content) {
+        this.content = content;
     }
 
-    @Finder(query = "SELECT r FROM Rate r WHERE r.rater = :user AND r.content = :content")
-    public Rate find(@Named("user") final User user, @Named("content") final Content content) {
-        return null;
+    public void setId(final Long id) {
+        this.id = id;
     }
 
-    @Finder(query = "SELECT AVG(r.value) FROM Rate r WHERE r.content = :content")
-    public Double calculateRate(@Named("content") final Content content) {
-        return null;
+    public void setRater(final User rater) {
+        this.rater = rater;
     }
 
-    @Finder(query = "SELECT count(*) FROM Rate r WHERE r.content = :content")
-    public Long calculateRateNumberOfUsers(@Named("content") final Content content) {
-        return null;
+    public void setValue(final Double value) {
+        this.value = value;
     }
 
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/Tag.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/Tag.java	2009-02-20 13:41:17 UTC (rev 1050)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/Tag.java	2009-02-22 16:21:35 UTC (rev 1051)
@@ -19,6 +19,7 @@
  */
 package org.ourproject.kune.platf.server.domain;
 
+import javax.persistence.Basic;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
@@ -48,12 +49,16 @@
     @Column(unique = true)
     private String name;
 
+    @Basic(optional = false)
+    private final Long createdOn;
+
     public Tag() {
         this(null);
     }
 
     public Tag(final String name) {
         this.name = name;
+        this.createdOn = System.currentTimeMillis();
     }
 
     @Finder(query = "FROM Tag g WHERE g.name = :name")
@@ -61,6 +66,10 @@
         return null;
     }
 
+    public Long getCreatedOn() {
+        return createdOn;
+    }
+
     public Long getId() {
         return id;
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/TagUserContent.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/TagUserContent.java	2009-02-20 13:41:17 UTC (rev 1050)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/TagUserContent.java	2009-02-22 16:21:35 UTC (rev 1051)
@@ -2,6 +2,7 @@
 
 import java.util.List;
 
+import javax.persistence.Basic;
 import javax.persistence.Entity;
 import javax.persistence.FetchType;
 import javax.persistence.GeneratedValue;
@@ -55,6 +56,9 @@
     @ManyToOne(fetch = FetchType.LAZY)
     private User user;
 
+    @Basic(optional = false)
+    private final Long createdOn;
+
     public TagUserContent() {
         this(null, null, null);
     }
@@ -63,6 +67,7 @@
         this.tag = tag;
         this.user = user;
         this.content = content;
+        this.createdOn = System.currentTimeMillis();
     }
 
     @Finder(query = "FROM TagUserContent t WHERE t.user = :user AND t.content = :content")
@@ -79,6 +84,10 @@
         return content;
     }
 
+    public Long getCreatedOn() {
+        return createdOn;
+    }
+
     public Long getId() {
         return id;
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/User.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/User.java	2009-02-20 13:41:17 UTC (rev 1050)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/User.java	2009-02-22 16:21:35 UTC (rev 1051)
@@ -22,6 +22,7 @@
 import java.util.List;
 import java.util.TimeZone;
 
+import javax.persistence.Basic;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -104,6 +105,9 @@
 
     private UserBuddiesVisibility buddiesVisibility;
 
+    @Basic(optional = false)
+    private final Long createdOn;
+
     public User() {
         this(null, null, null, null, null, null, null);
     }
@@ -120,6 +124,7 @@
         this.timezone = timezone;
         customProperties = new CustomProperties();
         buddiesVisibility = UserBuddiesVisibility.anyone;
+        this.createdOn = System.currentTimeMillis();
     }
 
     @Finder(query = "from User")
@@ -145,6 +150,10 @@
         return country;
     }
 
+    public Long getCreatedOn() {
+        return createdOn;
+    }
+
     public CustomProperties getCustomProperties() {
         return customProperties;
     }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPanel.java	2009-02-20 13:41:17 UTC (rev 1050)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPanel.java	2009-02-22 16:21:35 UTC (rev 1051)
@@ -43,9 +43,9 @@
     public SitePublicSpaceLinkPanel(final SitePublicSpaceLinkPresenter presenter, final WorkspaceSkeleton ws,
             final I18nUITranslationService i18n, final Images img) {
         publicHP = new HorizontalPanel();
-        gotoPublic = new IconLabel(img.anybody(), i18n.t("Public Space"), false);
+        gotoPublic = new IconLabel(img.anybody(), i18n.t("Go to Public Space"), false);
         gotoPublic.ensureDebugId(SITE_GOTO_PUBLIC);
-        contentNoPublic = new IconLabel(img.anybody(), i18n.t("This is not public"));
+        contentNoPublic = new IconLabel(img.nobody(), i18n.t("Not published"));
         contentNoPublic.ensureDebugId(SITE_CONTENT_NO_PUBLIC);
         publicHP.add(gotoPublic);
         publicHP.add(contentNoPublic);

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/EntityLogoSeleniumTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/EntityLogoSeleniumTest.java	2009-02-20 13:41:17 UTC (rev 1050)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/selenium/EntityLogoSeleniumTest.java	2009-02-22 16:21:35 UTC (rev 1051)
@@ -3,14 +3,14 @@
 import java.io.File;
 import java.io.IOException;
 
-import org.junit.Test;
+import org.junit.Ignore;
 import org.ourproject.kune.workspace.client.entityheader.EntityHeaderView;
 import org.ourproject.kune.workspace.client.options.EntityOptionsPanel;
 import org.ourproject.kune.workspace.client.options.logo.EntityOptionsLogoPanel;
 
 public class EntityLogoSeleniumTest extends KuneSeleniumTestHelper {
 
-    @Test
+    @Ignore
     public void testEntityLogoUpload() throws Exception {
         openDefPage();
         signIn();

Modified: trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManagerTest.java	2009-02-20 13:41:17 UTC (rev 1050)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManagerTest.java	2009-02-22 16:21:35 UTC (rev 1051)
@@ -8,6 +8,7 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.mockito.Mockito;
 import org.ourproject.kune.platf.client.dto.StateToken;
@@ -58,7 +59,7 @@
         Mockito.when(content.getTitle()).thenReturn(SOMETITLE);
     }
 
-    @Test
+    @Ignore
     public void fileWithNoExtensionDownloadTest() throws Exception {
         throw new Exception("TODO");
     }




More information about the kune-commits mailing list