Class AbstractXsltTransformer

java.lang.Object
ddf.catalog.services.xsltlistener.AbstractXsltTransformer
Direct Known Subclasses:
XsltMetacardTransformer, XsltResponseQueueTransformer

public abstract class AbstractXsltTransformer extends Object
  • Field Details

    • DEFAULT_MIME_TYPE

      protected static final javax.activation.MimeType DEFAULT_MIME_TYPE
    • MIME_TYPE_HEADER_NAME

      protected static final String MIME_TYPE_HEADER_NAME
      See Also:
    • templates

      protected Templates templates
    • mimeType

      protected javax.activation.MimeType mimeType
    • context

      protected org.osgi.framework.BundleContext context
  • Constructor Details

    • AbstractXsltTransformer

      public AbstractXsltTransformer()
    • AbstractXsltTransformer

      public AbstractXsltTransformer(org.osgi.framework.Bundle bundle, String xslFile)
  • Method Details

    • init

      public void init(org.osgi.framework.Bundle bundle, String xslFile)
      Retrieves the xslt file from the incoming bundle. Also gets the mime type from the bundle header.
      Parameters:
      bundle - Incoming bundle that contains an xsl file
      xslFile - The xsl file name
    • init

      public void init(String mimeString, InputStream xslStream) throws TransformerConfigurationException
      Sets the templates and mimeType used to perform a transform. This method can also be used in a non-OSGi environment to setup the transformer. NOTE: When using in a non-OSGi environment, some transformers may not work.
      Parameters:
      mimeString - String value of the mimeType to be returned.
      xslStream - Full, absolute path of the xsl file.
      Throws:
      TransformerConfigurationException