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:
4.0
Author:
Howard Lewis Ship

Method Summary
 String squeeze(Object data)
          Squeezes the data object into a String by locating an appropriate adaptor that can perform the conversion.
 String[] squeeze(Object[] data)
          A convenience; invokes squeeze(Object)for each element in the data array.
 Object unsqueeze(String string)
          Unsqueezes the string.
 Object[] unsqueeze(String[] strings)
          Convenience method for unsqueezing many strings (back into objects).
 

Method Detail

squeeze

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


squeeze

String[] squeeze(Object[] data)
A convenience; invokes squeeze(Object)for each element in the data array. If data is null, returns null.


unsqueeze

Object unsqueeze(String string)
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 returned with no change.


unsqueeze

Object[] unsqueeze(String[] strings)
Convenience method for unsqueezing many strings (back into objects).

If strings is null, returns null.



Copyright © 2006 Apache Software Foundation. All Rights Reserved.