Class DocumentSerializationState
java.lang.Object
org.kuali.rice.krad.util.documentserializer.DocumentSerializationState
This object keeps track of most of the open tags while a document is serialized. Note that instances of this class
may not necessarily hold all open tags of a document while it is being serialized. For example, tags enclosing list elements
and map entries are not contained within here. See DocumentSerializerServiceImpl, in krad-service-impl, to determine when
this object's state is modified.
This class's manipulators behave much like a stack, but it has random access characteristics like an array.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSerializedProperty(String elementName, PropertyType propertyType) Adds an additional state element into this object.getElementName(int propertyIndex) Retrieves the element name of the state element.getPropertyType(int propertyIndex) Retrieves the property type of the state element.intThe number of property elements in this state object.voidRemoves the last added serialized property
-
Constructor Details
-
DocumentSerializationState
public DocumentSerializationState()
-
-
Method Details
-
numPropertyElements
public int numPropertyElements()The number of property elements in this state object.- Returns:
-
addSerializedProperty
Adds an additional state element into this object.- Parameters:
elementName-propertyType- the type of the property when it was serialized
-
removeSerializedProperty
public void removeSerializedProperty()Removes the last added serialized property -
getElementName
Retrieves the element name of the state element. A parameter value of 0 represents the first element that was added by callingaddSerializedProperty(String, PropertyType)that hasn't been removed, and a value ofnumPropertyElements()- 1 represents the element last added that hasn't been removed.- Parameters:
propertyIndex- most be between 0 and the value returned bynumPropertyElements()- 1- Returns:
-
getPropertyType
Retrieves the property type of the state element. A parameter value of 0 represents the first element that was added by callingaddSerializedProperty(String, PropertyType)that hasn't been removed, and a value ofnumPropertyElements()- 1 represents the element last added that hasn't been removed.- Parameters:
propertyIndex- most be between 0 and the value returned bynumPropertyElements()- 1- Returns:
-