org.apache.tapestry.record
Class PersistentPropertyDataEncoderImpl

java.lang.Object
  extended by org.apache.tapestry.record.PersistentPropertyDataEncoderImpl
All Implemented Interfaces:
PersistentPropertyDataEncoder

public class PersistentPropertyDataEncoderImpl
extends java.lang.Object
implements PersistentPropertyDataEncoder

Responsible for converting lists of PropertyChanges back and forth to a URL safe encoded string.

A possible improvement would be to encode the binary data with encryption both on and off, and select the shortest (prefixing with a character that identifies whether encryption should be used to decode).

Since:
4.0
Author:
Howard M. Lewis Ship

Field Summary
static java.lang.String BYTESTREAM_PREFIX
          Prefix on the MIME encoding that indicates that the encoded data is not encoded.
static java.lang.String GZIP_BYTESTREAM_PREFIX
          Prefix on the MIME encoding that indicates that the encoded data is encoded with GZIP.
 
Constructor Summary
PersistentPropertyDataEncoderImpl()
           
 
Method Summary
 java.util.List decodePageChanges(java.lang.String encoded)
          Takes a string with an encoded set of page changes, and converts it back into a list of PropertyChanges.
 java.lang.String encodePageChanges(java.util.List changes)
          Encodes a (possibly empty) list of PropertyChanges into a string representation that can later be decoded.
 void setClassResolver(org.apache.hivemind.ClassResolver resolver)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BYTESTREAM_PREFIX

public static final java.lang.String BYTESTREAM_PREFIX
Prefix on the MIME encoding that indicates that the encoded data is not encoded.

See Also:
Constant Field Values

GZIP_BYTESTREAM_PREFIX

public static final java.lang.String GZIP_BYTESTREAM_PREFIX
Prefix on the MIME encoding that indicates that the encoded data is encoded with GZIP.

See Also:
Constant Field Values
Constructor Detail

PersistentPropertyDataEncoderImpl

public PersistentPropertyDataEncoderImpl()
Method Detail

encodePageChanges

public java.lang.String encodePageChanges(java.util.List changes)
Description copied from interface: PersistentPropertyDataEncoder
Encodes a (possibly empty) list of PropertyChanges into a string representation that can later be decoded.

Specified by:
encodePageChanges in interface PersistentPropertyDataEncoder

decodePageChanges

public java.util.List decodePageChanges(java.lang.String encoded)
Description copied from interface: PersistentPropertyDataEncoder
Takes a string with an encoded set of page changes, and converts it back into a list of PropertyChanges.

Specified by:
decodePageChanges in interface PersistentPropertyDataEncoder

setClassResolver

public void setClassResolver(org.apache.hivemind.ClassResolver resolver)