org.kuali.student.common.ui.server.serialization
Class KSSerializationPolicy

java.lang.Object
  extended by com.google.gwt.user.server.rpc.SerializationPolicy
      extended by com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy
          extended by org.kuali.student.common.ui.server.serialization.KSSerializationPolicy
All Implemented Interfaces:
com.google.gwt.user.server.rpc.impl.TypeNameObfuscator

public class KSSerializationPolicy
extends com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy

Wrap the StandardSerializationPolicy and LegacySerializationPolicy to create customized SerializationPolicy

Author:
Joe Yin

Field Summary
 
Fields inherited from interface com.google.gwt.user.server.rpc.impl.TypeNameObfuscator
SERVICE_INTERFACE_ID
 
Constructor Summary
KSSerializationPolicy(Map<Class<?>,Boolean> whitelist)
           
 
Method Summary
 boolean shouldDeserializeFields(Class<?> clazz)
          Check both StandardSerializationPolicy and LegacySerializationPolicy
 boolean shouldSerializeFields(Class<?> clazz)
          Check both StandardSerializationPolicy and LegacySerializationPolicy
 void validateDeserialize(Class<?> clazz)
          Validates that the specified class should be deserialized from a stream.
 void validateSerialize(Class<?> clazz)
          Validates that the specified class should be serialized into a stream.
 
Methods inherited from class com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy
getClassNameForTypeId, getClientFieldNamesForEnhancedClass, getTypeIdForClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KSSerializationPolicy

public KSSerializationPolicy(Map<Class<?>,Boolean> whitelist)
Method Detail

shouldDeserializeFields

public boolean shouldDeserializeFields(Class<?> clazz)
Check both StandardSerializationPolicy and LegacySerializationPolicy

Overrides:
shouldDeserializeFields in class com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy

shouldSerializeFields

public boolean shouldSerializeFields(Class<?> clazz)
Check both StandardSerializationPolicy and LegacySerializationPolicy

Overrides:
shouldSerializeFields in class com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy

validateDeserialize

public void validateDeserialize(Class<?> clazz)
                         throws com.google.gwt.user.client.rpc.SerializationException
Validates that the specified class should be deserialized from a stream. Check both StandardSerializationPolicy and LegacySerializationPolicy

Overrides:
validateDeserialize in class com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy
Parameters:
clazz - the class to validate
Throws:
com.google.gwt.user.client.rpc.SerializationException - if the class is not allowed to be deserialized

validateSerialize

public void validateSerialize(Class<?> clazz)
                       throws com.google.gwt.user.client.rpc.SerializationException
Validates that the specified class should be serialized into a stream. Check both StandardSerializationPolicy and LegacySerializationPolicy

Overrides:
validateSerialize in class com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy
Parameters:
clazz - the class to validate
Throws:
com.google.gwt.user.client.rpc.SerializationException - if the class is not allowed to be serialized


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.