Class SerializerServiceBase

java.lang.Object
org.kuali.rice.krad.service.impl.SerializerServiceBase
All Implemented Interfaces:
SerializerService, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
DataObjectSerializerServiceImpl, DocumentSerializerServiceImpl

public abstract class SerializerServiceBase extends Object implements SerializerService, org.springframework.beans.factory.InitializingBean
Default implementation of the DocumentSerializerService. If no <workflowProperties> have been defined in the data dictionary for a document type (i.e. Document.getDocumentPropertySerizabilityEvaluator() returns an instance of AlwaysTruePropertySerializibilityEvaluator), then this service will revert to using the XmlObjectSerializerService bean, which was the old way of serializing a document for routing. If workflowProperties are defined, then this implementation will selectively serialize items.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Field Details

  • Constructor Details

    • SerializerServiceBase

      public SerializerServiceBase()
  • Method Details

    • doSerialization

      protected <T> String doSerialization(PropertySerializabilityEvaluator evaluator, T object, SerializerServiceBase.Serializer<T> serializer)
      Execute the specified SerializerServiceBase.Serializer with the appropriate setup and tear down, and return the serialized XML when done.
    • serializeBusinessObjectToXml

      public String serializeBusinessObjectToXml(Object businessObject)
    • ignoreField

      protected boolean ignoreField(Field field)
      Method called by the ProxyAndStateAwareJavaReflectionProvider during serialization to determine if a field should be omitted from the serialized form.

      This is a short circuit check that will avoid more expensive calls in to the PropertySerializabilityEvaluator if it returns true.

      Parameters:
      field - the field
      Returns:
      true if the field should be omitted
    • getPropertySerizabilityEvaluator

      protected abstract PropertySerializabilityEvaluator getPropertySerizabilityEvaluator(Object dataObject)
      Get the appropriate PropertySerializabilityEvaluator for the given dataObject.
      Parameters:
      dataObject - the data object
      Returns:
      the evaluator
    • getCurrentPathTracker

      protected com.thoughtworks.xstream.io.path.PathTracker getCurrentPathTracker()
    • getXmlObjectSerializerService

      protected XmlObjectSerializerService getXmlObjectSerializerService()
    • setXmlObjectSerializerService

      public void setXmlObjectSerializerService(XmlObjectSerializerService xmlObjectSerializerService)
    • setLegacyDataAdapter

      public void setLegacyDataAdapter(LegacyDataAdapter legacyDataAdapter)
    • setXStreamSecurityService

      public void setXStreamSecurityService(org.kuali.rice.core.framework.security.XStreamSecurityService xStreamSecurityService)
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean