[pal-cvs 3061] CVS-Update: blog/src/java/jp/sf/pal/blog/portlet committed by tigercat

Back to archive index

TigerCat tiger****@users*****
2008年 2月 6日 (水) 12:53:02 JST


Update of /cvsroot/pal/blog/src/java/jp/sf/pal/blog/portlet
In directory sf-cvs:/tmp/cvs-serv404/java/jp/sf/pal/blog/portlet

Modified Files:
	BlogViewPortlet.java 
Log Message:
Changed to check the owner of the message that previous selected, to prevent showing message from the others blog in case there are two or more blogs in the portal. 
http://sourceforge.jp/tracker/index.php?func=detail&aid=10409&group_id=1972&atid=7332

blog/src/java/jp/sf/pal/blog/portlet/BlogViewPortlet.java 1.3 -> 1.4 (modified)
http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/pal/blog/src/java/jp/sf/pal/blog/portlet/BlogViewPortlet.java.diff?r1=1.3&r2=1.4

===================================================================
RCS file: blog/src/java/jp/sf/pal/blog/portlet/BlogViewPortlet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BlogViewPortlet.java	2006/06/30 12:29:21	1.3
+++ BlogViewPortlet.java	2008/02/06 03:53:02	1.4
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2006 The Portal Application Laboratory Team.
+ * Copyright 2005-2008 The Portal Application Laboratory Team.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -15,9 +15,6 @@
  */
 package jp.sf.pal.blog.portlet;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import java.io.IOException;
 import java.util.Iterator;
 
@@ -27,6 +24,10 @@
 
 import jp.sf.pal.blog.BlogConstants;
 import jp.sf.pal.blog.util.BlogMessaging;
+import jp.sf.pal.blog.util.BlogMessagingKeyToken;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class BlogViewPortlet extends BlogGenericPortlet
 {
@@ -44,6 +45,7 @@
         super.processAction(request, response);
 //TODO
         String blogId = null;
+        String blogOwner = null;
         Iterator ite = request.getParameterMap().keySet().iterator();
         while (ite.hasNext())
         {
@@ -60,17 +62,23 @@
             {
                 blogId = request.getParameter(key);
             }
+            else if (key.indexOf(BlogConstants.BLOG_REDIRECT_OWNER) >= 0)
+            {
+                blogOwner = request.getParameter(key);
+            }
         }
         if (log.isDebugEnabled())
         {
             log
                     .debug("processAction(ActionRequest, ActionResponse) -  : blogId="
-                            + blogId);
+                            + blogId + " : blogOwner=" + blogOwner);
         }
-        if (blogId != null)
+        if (blogId != null && blogOwner != null)
         {
-            BlogMessaging.publishForView(BlogConstants.BLOG_MESSAGE_ID,
-                    new Long(blogId));
+            BlogMessagingKeyToken keyToken = new BlogMessagingKeyToken();
+            keyToken.setPrefix(BlogConstants.BLOG_MESSAGE_ID);
+            keyToken.setOwner(blogOwner);
+            BlogMessaging.publishForView(keyToken.toString(), new Long(blogId));
         }
 
     }




pal-cvs メーリングリストの案内
Back to archive index