|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.kns.util.documentserializer.PropertySerializabilityEvaluatorBase
public abstract class PropertySerializabilityEvaluatorBase
This abstract implementation provides a default implementation of determinePropertyType(Object)
, which should suffice for most
use cases.
Field Summary | |
---|---|
protected PropertySerializerTrie |
serializableProperties
|
Constructor Summary | |
---|---|
PropertySerializabilityEvaluatorBase()
|
Method Summary | |
---|---|
PropertyType |
determinePropertyType(Object propertyValue)
Determines the type of a object |
protected boolean |
evaluateCompleteMatch(SerializationState state,
Object containingObject,
PropertySerializabilityMetadata metadata,
String childPropertyName,
Object childPropertyValue)
Evaluates whether a property is serializable when all properties in the serialization state have been matched up with the properties defined in the data dictionary. |
protected boolean |
evaluatePartialMatch(SerializationState state,
int lastMatchedStateIndex,
Object containingObject,
PropertySerializabilityMetadata metadata,
String childPropertyName,
Object childPropertyValue)
Evaluates whether a property is serializable when only some of the properties in the serialization state have been matched up with the serializable properties specified in the data dictionary. |
void |
initializeEvaluator(BusinessObject businessObject)
|
void |
initializeEvaluator(Document document)
Initializes the evaluator so that calls to #isPropertySerializable(DocumentSerializationState, Object, String, Object) and
PropertySerializabilityEvaluator.determinePropertyType(Object) will function properly |
protected boolean |
isPrimitiveObject(Object object)
Whether the object represents a primitive |
boolean |
isPropertySerializable(SerializationState state,
Object containingObject,
String childPropertyName,
Object childPropertyValue)
Returns whether a child property of a given containing object should be serialized, based on the metadata provided in the data dictionary. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PropertySerializerTrie serializableProperties
Constructor Detail |
---|
public PropertySerializabilityEvaluatorBase()
Method Detail |
---|
public void initializeEvaluator(Document document)
PropertySerializabilityEvaluator
#isPropertySerializable(DocumentSerializationState, Object, String, Object)
and
PropertySerializabilityEvaluator.determinePropertyType(Object)
will function properly
initializeEvaluator
in interface PropertySerializabilityEvaluator
document
- the document instancepublic void initializeEvaluator(BusinessObject businessObject)
initializeEvaluator
in interface PropertySerializabilityEvaluator
public PropertyType determinePropertyType(Object propertyValue)
PropertySerializabilityEvaluator
determinePropertyType
in interface PropertySerializabilityEvaluator
PropertySerializabilityEvaluator.determinePropertyType(java.lang.Object)
public boolean isPropertySerializable(SerializationState state, Object containingObject, String childPropertyName, Object childPropertyValue)
isPropertySerializable
in interface PropertySerializabilityEvaluator
state
- Information about the properties that have been serialized so farcontainingObject
- The object containing the reference to childPropertyValuechildPropertyName
- The name property to determine whether to serialize, relative to containingObject (i.e. not a nested attribute)childPropertyValue
- If serializable, this property would be serialized by the serializer service.
org.kuali.rice.kns.util.documentserializer.PropertySerializabilityEvaluator#isPropertySerializable(org.kuali.rice.kns.util.documentserializer.DocumentSerializationState, java.lang.Object, java.lang.String, java.lang.Object)
protected boolean evaluateCompleteMatch(SerializationState state, Object containingObject, PropertySerializabilityMetadata metadata, String childPropertyName, Object childPropertyValue)
state
- containingObject
- metadata
- childPropertyName
- childPropertyValue
-
protected boolean evaluatePartialMatch(SerializationState state, int lastMatchedStateIndex, Object containingObject, PropertySerializabilityMetadata metadata, String childPropertyName, Object childPropertyValue)
state
- lastMatchedStateIndex
- the index of the state parameter that represents the last matched propertycontainingObject
- the object containing the child propertymetadata
- metadata of the last matched propertychildPropertyName
- the name of the child property that we are going to determine whether it is serializablechildPropertyValue
- the value of the child property that we are going to determine whether it is serializable
protected boolean isPrimitiveObject(Object object)
object
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |