Coverage Report - org.kuali.rice.kns.util.documentserializer.PropertySerializabilityEvaluator
 
Classes in this File Line Coverage Branch Coverage Complexity
PropertySerializabilityEvaluator
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007-2008 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.kns.util.documentserializer;
 17  
 
 18  
 import org.kuali.rice.kns.document.Document;
 19  
 
 20  
 /**
 21  
  * Specifies an implementation used during document workflow XML serialization that
 22  
  * will be able to determine whether a specific property is serializable
 23  
  *
 24  
  */
 25  
 public interface PropertySerializabilityEvaluator {
 26  
     
 27  
     /**
 28  
      * Initializes the evaluator so that calls to {@link #isPropertySerializable(DocumentSerializationState, Object, String, Object)} and
 29  
      * {@link #determinePropertyType(Object)} will function properly
 30  
      * 
 31  
      * @param document the document instance
 32  
      */
 33  
     public void initializeEvaluatorForDocument(Document document);
 34  
     
 35  
     public void initializeEvaluatorForDataObject(Object businessObject);
 36  
     
 37  
     /**
 38  
      * Determines whether a child property of an object is serializable.
 39  
      * 
 40  
      * @param state Information about the properties that have been serialized so far
 41  
      * @param containingObject The object containing the reference to childPropertyValue
 42  
      * @param childPropertyName The name property to determine whether to serialize, relative to containingObject (i.e. not a nested attribute) 
 43  
      * @param childPropertyValue If serializable, this property would be serialized by the serializer service.
 44  
      * @return
 45  
      */
 46  
     public boolean isPropertySerializable(SerializationState state, Object containingObject, String childPropertyName, Object childPropertyValue);
 47  
     
 48  
     /**
 49  
      * Determines the type of a object
 50  
      * 
 51  
      * @param object
 52  
      * @return
 53  
      */
 54  
     public PropertyType determinePropertyType(Object object);
 55  
 }