org.apache.tapestry.services
Interface DataSqueezerFilter

All Known Implementing Classes:
AbstractDataSqueezerFilter, NullDataSqueezerFilter

public interface DataSqueezerFilter

Author:
James Carman

Method Summary
 String[] squeeze(Object[] data, DataSqueezer dataSqueezer)
          A convenience; invokes squeeze(Object, DataSqueezer)for each element in the data array.
 String squeeze(Object data, DataSqueezer dataSqueezer)
          Optionally squeezes the data object into a String.
 Object[] unsqueeze(String[] strings, DataSqueezer dataSqueezer)
          Convenience method for unsqueezing many strings (back into objects).
 Object unsqueeze(String string, DataSqueezer dataSqueezer)
          Unsqueezes the string.
 

Method Detail

squeeze

String squeeze(Object data,
               DataSqueezer dataSqueezer)
Optionally squeezes the data object into a String.

Parameters:
data - the data to squeeze
dataSqueezer - the next squeezer in the pipeline
Returns:
the string representation

squeeze

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

Parameters:
data - the data to squeeze
dataSqueezer - the next squeezer in the pipeline
Returns:
the string representation

unsqueeze

Object unsqueeze(String string,
                 DataSqueezer dataSqueezer)
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.

Parameters:
string - the string representation of the data
dataSqueezer - the next squeezer in the pipeline
Returns:
the unsqueezed data object

unsqueeze

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

If strings is null, returns null.

Parameters:
strings - the string representation of the data
dataSqueezer - the next squeezer in the pipeline
Returns:
the unsqueezed data object


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.