You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by bl...@apache.org on 2003/10/22 15:51:17 UTC

cvs commit: jakarta-pluto/src/container/org/apache/pluto/core/impl PortletSessionImpl.java

blumm       2003/10/22 06:51:17

  Modified:    src/container/org/apache/pluto/core/impl
                        PortletSessionImpl.java
  Log:
  Changed "public java.util.Enumeration getAttributeNames(int scope)"
  If scope equals PortletSession.PORTLET_SCOPE then only
  attributes of this type of scope may be returned.
  
  Revision  Changes    Path
  1.3       +12 -7     jakarta-pluto/src/container/org/apache/pluto/core/impl/PortletSessionImpl.java
  
  Index: PortletSessionImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-pluto/src/container/org/apache/pluto/core/impl/PortletSessionImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PortletSessionImpl.java	11 Oct 2003 00:51:36 -0000	1.2
  +++ PortletSessionImpl.java	22 Oct 2003 13:51:17 -0000	1.3
  @@ -179,15 +179,20 @@
               {
                   String attribute = (String)attributes.nextElement();
   
  -                String portletAttribute = PortletSessionUtil.decodeAttributeName(attribute);
  -
  -                if (portletAttribute!=null)
  -                { // it is in the portlet's namespace
  -                    portletAttributes.add(portletAttribute);
  +                int attributeScope = PortletSessionUtil.decodeScope(attribute);
  +                
  +                if (attributeScope == PortletSession.PORTLET_SCOPE)
  +                {
  +                	String portletAttribute = PortletSessionUtil.decodeAttributeName(attribute);
  +                	
  +                	if (portletAttribute!=null)
  +                	{ // it is in the portlet's namespace
  +                		portletAttributes.add(portletAttribute);
  +                	}
                   }
  -            }
  +           }
   
  -            return portletAttributes.elements();
  +           return portletAttributes.elements();
           }
       }