org.sakaiproject.portal.render.portlet.services.state
Class EnhancedPortletStateEncoder

java.lang.Object
  extended by org.sakaiproject.portal.render.portlet.services.state.EnhancedPortletStateEncoder
All Implemented Interfaces:
PortletStateEncoder

public class EnhancedPortletStateEncoder
extends Object
implements PortletStateEncoder

Enhanced version of the PortletStateEncoder. This implementation translates the PortletState into a properties file format for serialization. This results in a url parameters which is significatly shorter than ther simple version. This may be desirable in a cases where the url query string is allready significant and may surpass the limit of 2083 characters imposed by some browsers.

Since:
2.2.3
Version:
$Id: EnhancedPortletStateEncoder.java 21641 2007-02-15 23:38:43Z csev@umich.edu $

Constructor Summary
EnhancedPortletStateEncoder()
           
 
Method Summary
 PortletState decode(String uri)
          Encode decode the PortletState from the serialized form.
 String encode(PortletState portletState)
          Encode the PortletState into a string
 WebRecoder getUrlSafeEncoder()
           
 void setUrlSafeEncoder(WebRecoder urlSafeEncoder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnhancedPortletStateEncoder

public EnhancedPortletStateEncoder()
Method Detail

getUrlSafeEncoder

public WebRecoder getUrlSafeEncoder()

setUrlSafeEncoder

public void setUrlSafeEncoder(WebRecoder urlSafeEncoder)

encode

public String encode(PortletState portletState)
Description copied from interface: PortletStateEncoder
Encode the PortletState into a string

Specified by:
encode in interface PortletStateEncoder
Parameters:
portletState - the current portlet state
Returns:
serialized form of the state.

decode

public PortletState decode(String uri)
Description copied from interface: PortletStateEncoder
Encode decode the PortletState from the serialized form.

Specified by:
decode in interface PortletStateEncoder
Returns:
materialized portlet state.


Copyright © 2003-2013 Sakai Project. All Rights Reserved.