org.apache.tapestry.services
Interface DataSqueezer

All Known Implementing Classes:
DataSqueezerImpl

public interface DataSqueezer

Lightweight serialization used to encode values into strings that are stored in query parameters and hidden fields.

Since:
3.1
Author:
Howard Lewis Ship

Method Summary
 org.apache.hivemind.ClassResolver getResolver()
           
 void register(java.lang.String prefix, java.lang.Class dataClass, ISqueezeAdaptor adaptor)
          Deprecated. as DataSqueezer evolves into a service.
 java.lang.String squeeze(java.lang.Object data)
          Squeezes the data object into a String by locating an appropriate adaptor that can perform the conversion.
 java.lang.String[] squeeze(java.lang.Object[] data)
          A convience; invokes squeeze(Object)for each element in the data array.
 java.lang.Object unsqueeze(java.lang.String string)
          Unsqueezes the string.
 java.lang.Object[] unsqueeze(java.lang.String[] strings)
          Convienience method for unsqueezing many strings (back into objects).
 

Method Detail

squeeze

public java.lang.String squeeze(java.lang.Object data)
                         throws java.io.IOException
Squeezes the data object into a String by locating an appropriate adaptor that can perform the conversion. data may be null.

java.io.IOException

squeeze

public java.lang.String[] squeeze(java.lang.Object[] data)
                           throws java.io.IOException
A convience; invokes squeeze(Object)for each element in the data array. If data is null, returns null.

java.io.IOException

unsqueeze

public java.lang.Object unsqueeze(java.lang.String string)
                           throws java.io.IOException
Unsqueezes the string. Note that in a special case, where the first character of the string is not a recognized prefix, it is assumed that the string is simply a string, and return with no change.

java.io.IOException

unsqueeze

public java.lang.Object[] unsqueeze(java.lang.String[] strings)
                             throws java.io.IOException
Convienience method for unsqueezing many strings (back into objects).

If strings is null, returns null.

java.io.IOException

register

public void register(java.lang.String prefix,
                     java.lang.Class dataClass,
                     ISqueezeAdaptor adaptor)
Deprecated. as DataSqueezer evolves into a service.


getResolver

public org.apache.hivemind.ClassResolver getResolver()