org.kuali.rice.krad.util.documentserializer
Class DocumentSerializationState

java.lang.Object
  extended by org.kuali.rice.krad.util.documentserializer.DocumentSerializationState

public class DocumentSerializationState
extends Object

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 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
protected  class DocumentSerializationState.SerializationPropertyElement
           
 
Constructor Summary
DocumentSerializationState()
           
 
Method Summary
 void addSerializedProperty(String elementName, PropertyType propertyType)
          Adds an additional state element into this object.
 String getElementName(int propertyIndex)
          Retrieves the element name of the state element.
 PropertyType getPropertyType(int propertyIndex)
          Retrieves the property type of the state element.
 int numPropertyElements()
          The number of property elements in this state object.
 void removeSerializedProperty()
          Removes the last added serialized property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentSerializationState

public DocumentSerializationState()
Method Detail

numPropertyElements

public int numPropertyElements()
The number of property elements in this state object.

Returns:

addSerializedProperty

public void addSerializedProperty(String elementName,
                                  PropertyType propertyType)
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

public String getElementName(int propertyIndex)
Retrieves the element name of the state element. A parameter value of 0 represents the first element that was added by calling addSerializedProperty(String, PropertyType) that hasn't been removed, and a value of numPropertyElements() - 1 represents the element last added that hasn't been removed.

Parameters:
propertyIndex - most be between 0 and the value returned by numPropertyElements() - 1
Returns:

getPropertyType

public PropertyType getPropertyType(int propertyIndex)
Retrieves the property type of the state element. A parameter value of 0 represents the first element that was added by calling addSerializedProperty(String, PropertyType) that hasn't been removed, and a value of numPropertyElements() - 1 represents the element last added that hasn't been removed.

Parameters:
propertyIndex - most be between 0 and the value returned by numPropertyElements() - 1
Returns:


Copyright © 2005-2014 The Kuali Foundation. All Rights Reserved.