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.bo.BusinessObject;
 19  
 import org.kuali.rice.kns.document.Document;
 20  
 
 21  
 /**
 22  
  * Specifies an implementation used during document workflow XML serialization that
 23  
  * will be able to determine whether a specific property is serializable
 24  
  *
 25  
  */
 26  
 public interface PropertySerializabilityEvaluator {
 27  
     
 28  
     /**
 29  
      * Initializes the evaluator so that calls to {@link #isPropertySerializable(DocumentSerializationState, Object, String, Object)} and
 30  
      * {@link #determinePropertyType(Object)} will function properly
 31  
      * 
 32  
      * @param document the document instance
 33  
      */
 34  
     public void initializeEvaluator(Document document);
 35  
     
 36  
     public void initializeEvaluator(BusinessObject businessObject);
 37  
     
 38  
     /**
 39  
      * Determines whether a child property of an object is serializable.
 40  
      * 
 41  
      * @param state Information about the properties that have been serialized so far
 42  
      * @param containingObject The object containing the reference to childPropertyValue
 43  
      * @param childPropertyName The name property to determine whether to serialize, relative to containingObject (i.e. not a nested attribute) 
 44  
      * @param childPropertyValue If serializable, this property would be serialized by the serializer service.
 45  
      * @return
 46  
      */
 47  
     public boolean isPropertySerializable(SerializationState state, Object containingObject, String childPropertyName, Object childPropertyValue);
 48  
     
 49  
     /**
 50  
      * Determines the type of a object
 51  
      * 
 52  
      * @param object
 53  
      * @return
 54  
      */
 55  
     public PropertyType determinePropertyType(Object object);
 56  
 }