Class SerializationState

java.lang.Object
org.kuali.rice.krad.util.documentserializer.SerializationState

public class SerializationState 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, 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.
  • Constructor Details

    • SerializationState

      public SerializationState()
    • SerializationState

      public SerializationState(SerializationState stateToCopy)
      Creates a new SerializationState that is a copy of the given state
      Parameters:
      stateToCopy - the state to copy
  • Method Details

    • 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: