| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| PropertySerializabilityMetadata |
|
| 1.0;1 | ||||
| PropertySerializabilityMetadata$PropertySerializability |
|
| 1.0;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 | /** | |
| 19 | * This class represents metadata about the serializibility of a property during the document serialization proces.. | |
| 20 | */ | |
| 21 | public interface PropertySerializabilityMetadata { | |
| 22 | /** | |
| 23 | * See docs for the elements of this enum | |
| 24 | */ | |
| 25 | 0 | public enum PropertySerializability { |
| 26 | /** | |
| 27 | * Indicates that the property represented by this metadata object should be serialized (i.e. have an open | |
| 28 | * and close XML tag rendered) as well as all of the property's primitives. It does not mean that all child | |
| 29 | * non-primitive properties should be serialized. Child non-primitives are only serialized if a call to | |
| 30 | * {@link PropertySerializabilityMetadata#getSerializableSubProperty(String)} returns a non-null result when | |
| 31 | * the child property name is passed in. | |
| 32 | */ | |
| 33 | 0 | SERIALIZE_OBJECT_AND_ALL_PRIMITIVES, |
| 34 | ||
| 35 | /** | |
| 36 | * Indicates that the property represented by this metadata object should be serialized (i.e. have an open | |
| 37 | * and close XML tag rendered). Child properties (primitive or otherwise) are only serialized if a call to | |
| 38 | * {@link PropertySerializabilityMetadata#getSerializableSubProperty(String)} returns a non-null result when | |
| 39 | * the child property name is passed in. | |
| 40 | */ | |
| 41 | 0 | SERIALIZE_OBJECT |
| 42 | } | |
| 43 | ||
| 44 | /** | |
| 45 | * Returns the serializability of this property. See {@link PropertySerializability}. | |
| 46 | * | |
| 47 | * @return | |
| 48 | */ | |
| 49 | public PropertySerializability getPropertySerializability(); | |
| 50 | ||
| 51 | /** | |
| 52 | * Returns the full path string of the property corresponding to this metadata. | |
| 53 | * | |
| 54 | * @return | |
| 55 | */ | |
| 56 | public String getPathString(); | |
| 57 | ||
| 58 | /** | |
| 59 | * Returns metadata bout a child property, if it exists | |
| 60 | * | |
| 61 | * @param childPropertyName the name of a child property, relative to this property (i.e. no .'s in the name) | |
| 62 | * @return null if there is no child property with the specified name, otherwise, metadata about the child | |
| 63 | */ | |
| 64 | public PropertySerializabilityMetadata getSerializableChildProperty(String childPropertyName); | |
| 65 | } |