[kune-commits] r1288 - in trunk: . src/main/java/org/ourproject/kune/platf/server/manager src/test/java/cc/kune/domain/finders src/test/java/org/ourproject/kune/platf/server/manager

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Tue Mar 22 11:21:26 CET 2011


Author: vjrj_
Date: 2011-03-22 11:21:25 +0100 (Tue, 22 Mar 2011)
New Revision: 1288

Modified:
   trunk/INSTALL
   trunk/TODO
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java
   trunk/src/test/java/cc/kune/domain/finders/TagUserContentFinderTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagUserContentTest.java
Log:
Some test fixed, more doc

Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL	2011-03-21 10:10:34 UTC (rev 1287)
+++ trunk/INSTALL	2011-03-22 10:21:25 UTC (rev 1288)
@@ -95,7 +95,7 @@
 
 Not verified: in Windows you need to do something similar (copy the jmagick .dll of the same version in the Windows directory)
 
-===Run the server for the first time ===
+===Run the server for the first time===
 
 Run the server for the first time and initialize the db:
 
@@ -153,19 +153,22 @@
 
 Create the Administration Account. Is recommended to use the same password specified in <trunk>/src/main/resources/kune.properties
 
-Configure the 'Group chat service' (in Group chat tab) with "rooms" additionally or instead of "conference" (or change kune.chat.roomHost in <trunk>/src/main/resources/kune.properties)
+Configure the 'Group chat service' (in Group Chat > Group Chat Settings tab) with "rooms" additionally or instead of "conference" (or change kune.chat.roomHost in <trunk>/src/main/resources/kune.properties)
 
-Change in 'System Properties':
-  provider.auth.className to org.jivesoftware.openfire.auth.JDBCAuthProvider
-  provider.user.className to org.jivesoftware.openfire.user.JDBCUserProvider
+Change in 'Server > Server Manager > System Properties':
+  provider.auth.className to org.jivesoftware.openfire.auth.JDBCAuthProvider instead of 
+    org.jivesoftware.openfire.auth.DefaultAuthProvider
+  provider.user.className to org.jivesoftware.openfire.user.JDBCUserProvider instead of
+    org.jivesoftware.openfire.user.DefaultUserProvider
 
-Enable "HTTP Bind Settings" and check the port is not used by other service in your machine (we use 5280 as default, if not change the <trunk>/src/main/webapp/WEB-INF/web.xml accordly)
+In Server > Server Settings > HTTP Binding, enable "HTTP Bind Settings" and set the port to 5280. Check that port is not used by other service in your machine (we use 5280 as default, but if you want to use other change it your web.xml accordly)
 
-Edit the openfire.xml
-* In debian (with a .deb installation) you can to edit the configuration in /etc/openfire...
+Edit the openfire.xml in a terminal:
+* In debian (with a .deb installation) you can to edit the configuration in /etc/openfire directory.
 * In Mac: /usr/local/openfire/conf
-Add this lines to conf/openfire.xml and check that the user/passwd of the db is the same here and in the persistence.xml:
 
+Add these lines to conf/openfire.xml and check that the user/passwd of the db is the same here and in the persistence.xml:
+
 <pre>
 <jive>
   ...
@@ -194,23 +197,25 @@
     <nameField>name</nameField>
     <emailField>email</emailField>
   </jdbcUserProvider>
+  <admin>
+    <authorizedUsernames>admin</authorizedUsernames>
+  </admin>
   ...
 </jive>
 </pre>
 
-You'll most likely want to change which usernames are authorized to login to the admin console.
+Instead of: 
+  <jdbcAuthProvider/>
+  <jdbcUserProvider/>
+  <admin/>
 
-<pre>
-<jive>
-...
-<admin>
-    <authorizedUsernames>admin</authorizedUsernames>
-</admin>
-...
-</jive>
-</pre>
+For more details:
+http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/db-integration-guide.html
 
-Restart openfire.
+Also you'll most likely want to change which usernames are authorized to login to the admin console adding then to <authorizedUsernames>.
 
-For more details:
-http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/db-integration-guide.html
+Restart openfire: /etc/init.d/openfire restart
+after that the previous values will be incorpored to Server > Server Manager > System Properties 
+
+After the section 'Run the server for the first time' you'll be able to use the password of the admin user of the kune instalation (specified in kune.properties), or other admin new users you want to register using kune and configure in the authorizedUsernames attribute.
+

Modified: trunk/TODO
===================================================================
--- trunk/TODO	2011-03-21 10:10:34 UTC (rev 1287)
+++ trunk/TODO	2011-03-22 10:21:25 UTC (rev 1288)
@@ -4,14 +4,29 @@
 #+SEQ_TODO: TODO danigb samer vjrj FEEDBACK VERIFY | FIXED CANCELED WONTFIX
 
 * Intro
+  In this file we normally write things TODO but also some notes, brainstorming, ideas, debug outputs, etc. Is fast a complement of our issues system: http://kune.ourproject.org/issues/
+   We use org-mode in emacs to easy manage this file
+
 ** Symbols
    <nick> or <n> == reported by / commented by
    nick == assigned to
-** Notes
-   Use org-mode in emacs to easy manage this file
 
 * SHORT-TERM (URGENT)
+** TODO Use Jenkins in dev machine (reoconfigure hostname and put link in web)
 ** TODO WIAB History integration
+*** Initial defpage #home
+**** u: if logged: wave list (#inbox) else: signin
+**** g: def project
+**** p: idem
+*** #example.com/w+abcd
+**** u: if logged: this wave else: signin and return to this
+**** g: equivalent group page? no, only with a button-action
+**** p: idem
+*** #site.doc.1
+**** u: if logged: wave list else signin (or also a button-action to go to open in the user-list)
+**** g: group content
+**** p: idem
+*** Some javadoc:
 HistorySupport.java
 WaverefEncoder.java
   /**
@@ -24,7 +39,7 @@
    * @param path The path containing the domain and wave ID.
    * @return The corresponding WaveRef object, or null if the path was invalid.
    * @throws InvalidWaveRefException If the path contains less than 2 tokens or 3 tokens.
-   */
+     */
 ** TODO Server side extensions configuration menu
 A way to specify the default extensions in a client of a wave server.
 ** TODO style injection: 

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManager.java	2011-03-21 10:10:34 UTC (rev 1287)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManager.java	2011-03-22 10:21:25 UTC (rev 1288)
@@ -19,19 +19,14 @@
  */
 package org.ourproject.kune.platf.server.manager;
 
-import java.util.List;
-
 import cc.kune.core.shared.domain.TagCloudResult;
 import cc.kune.domain.Content;
 import cc.kune.domain.Group;
-import cc.kune.domain.Tag;
 import cc.kune.domain.TagUserContent;
 import cc.kune.domain.User;
 
 public interface TagUserContentManager extends Manager<TagUserContent, Long> {
 
-    List<Tag> find(User user, Content content);
-
     TagCloudResult getTagCloudResultByGroup(Group group);
 
     String getTagsAsString(User user, Content content);

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java	2011-03-21 10:10:34 UTC (rev 1287)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java	2011-03-22 10:21:25 UTC (rev 1288)
@@ -56,8 +56,7 @@
         this.finder = finder;
     }
 
-    @Override
-    public List<Tag> find(final User user, final Content content) {
+    List<Tag> find(final User user, final Content content) {
         return finder.findTags(user, content);
     }
 
@@ -77,22 +76,22 @@
     public TagCloudResult getTagCloudResultByGroup(final Group group) {
         try {
             return new TagCloudResult(getSummaryByGroup(group), getMaxCount(group), getMinCount(group));
-        } catch (NoResultException e) {
+        } catch (final NoResultException e) {
             return new TagCloudResult();
         }
     }
 
     @Override
     public String getTagsAsString(final User user, final Content content) {
-        String tagConcatenated = "";
+        final StringBuffer tagConcatenated = new StringBuffer();
         if (user.getId() != null) {
             // FIXME: User must be persisted (this fails on tests)
             final List<Tag> tags = find(user, content);
             for (final Tag tag : tags) {
-                tagConcatenated += " " + tag.getName();
+                tagConcatenated.append(" ").append(tag.getName());
             }
         }
-        return tagConcatenated.replaceFirst(" ", "");
+        return tagConcatenated.toString().replaceFirst(" ", "");
     }
 
     @Override

Modified: trunk/src/test/java/cc/kune/domain/finders/TagUserContentFinderTest.java
===================================================================
--- trunk/src/test/java/cc/kune/domain/finders/TagUserContentFinderTest.java	2011-03-21 10:10:34 UTC (rev 1287)
+++ trunk/src/test/java/cc/kune/domain/finders/TagUserContentFinderTest.java	2011-03-22 10:21:25 UTC (rev 1288)
@@ -19,6 +19,8 @@
  */
 package cc.kune.domain.finders;
 
+import javax.persistence.NoResultException;
+
 import org.junit.Test;
 import org.ourproject.kune.platf.server.PersistencePreLoadedDataTest;
 
@@ -29,8 +31,9 @@
     @Inject
     TagUserContentFinder tag;
 
-    @Test
-    public void test() {
+    @Test(expected = NoResultException.class)
+    public void testNoTags() {
         tag.getTagsGroups(groupManager.getSiteDefaultGroup());
     }
+
 }

Modified: trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagUserContentTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagUserContentTest.java	2011-03-21 10:10:34 UTC (rev 1287)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagUserContentTest.java	2011-03-22 10:21:25 UTC (rev 1288)
@@ -39,7 +39,7 @@
     @Inject
     TagUserContentFinder finder;
     @Inject
-    TagUserContentManager manager;
+    TagUserContentManagerDefault manager;
 
     private Tag tag;
     @Inject




More information about the kune-commits mailing list