Develop and Download Open Source Software

Browse CVS Repository

Diff of /pal/blog/src/java/jp/sf/pal/blog/portlet/BlogViewPortlet.java

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3 by shinsuke, Fri Jun 30 12:29:21 2006 UTC revision 1.4 by tigercat, Wed Feb 6 03:53:02 2008 UTC
# Line 1  Line 1 
1  /*  /*
2   * Copyright 2005-2006 The Portal Application Laboratory Team.   * Copyright 2005-2008 The Portal Application Laboratory Team.
3   *   *
4   * Licensed under the Apache License, Version 2.0 (the "License");   * Licensed under the Apache License, Version 2.0 (the "License");
5   * you may not use this file except in compliance with the License.   * you may not use this file except in compliance with the License.
# Line 15  Line 15 
15   */   */
16  package jp.sf.pal.blog.portlet;  package jp.sf.pal.blog.portlet;
17    
 import org.apache.commons.logging.Log;  
 import org.apache.commons.logging.LogFactory;  
   
18  import java.io.IOException;  import java.io.IOException;
19  import java.util.Iterator;  import java.util.Iterator;
20    
# Line 27  import javax.portlet.PortletException; Line 24  import javax.portlet.PortletException;
24    
25  import jp.sf.pal.blog.BlogConstants;  import jp.sf.pal.blog.BlogConstants;
26  import jp.sf.pal.blog.util.BlogMessaging;  import jp.sf.pal.blog.util.BlogMessaging;
27    import jp.sf.pal.blog.util.BlogMessagingKeyToken;
28    
29    import org.apache.commons.logging.Log;
30    import org.apache.commons.logging.LogFactory;
31    
32  public class BlogViewPortlet extends BlogGenericPortlet  public class BlogViewPortlet extends BlogGenericPortlet
33  {  {
# Line 44  public class BlogViewPortlet extends Blo Line 45  public class BlogViewPortlet extends Blo
45          super.processAction(request, response);          super.processAction(request, response);
46  //TODO  //TODO
47          String blogId = null;          String blogId = null;
48            String blogOwner = null;
49          Iterator ite = request.getParameterMap().keySet().iterator();          Iterator ite = request.getParameterMap().keySet().iterator();
50          while (ite.hasNext())          while (ite.hasNext())
51          {          {
# Line 60  public class BlogViewPortlet extends Blo Line 62  public class BlogViewPortlet extends Blo
62              {              {
63                  blogId = request.getParameter(key);                  blogId = request.getParameter(key);
64              }              }
65                else if (key.indexOf(BlogConstants.BLOG_REDIRECT_OWNER) >= 0)
66                {
67                    blogOwner = request.getParameter(key);
68                }
69          }          }
70          if (log.isDebugEnabled())          if (log.isDebugEnabled())
71          {          {
72              log              log
73                      .debug("processAction(ActionRequest, ActionResponse) -  : blogId="                      .debug("processAction(ActionRequest, ActionResponse) -  : blogId="
74                              + blogId);                              + blogId + " : blogOwner=" + blogOwner);
75          }          }
76          if (blogId != null)          if (blogId != null && blogOwner != null)
77          {          {
78              BlogMessaging.publishForView(BlogConstants.BLOG_MESSAGE_ID,              BlogMessagingKeyToken keyToken = new BlogMessagingKeyToken();
79                      new Long(blogId));              keyToken.setPrefix(BlogConstants.BLOG_MESSAGE_ID);
80                keyToken.setOwner(blogOwner);
81                BlogMessaging.publishForView(keyToken.toString(), new Long(blogId));
82          }          }
83    
84      }      }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26