Class ExportManager

  • All Implemented Interfaces:
    ExportConstants, MashupConstants

    public class ExportManager
    extends java.lang.Object
    implements ExportConstants
    The ExportManager is the main class to manage data to export.
    This class is a singleton (see getInstance()).
    It provides method to export data from an id, a query or a dataSet.
    Since:
    jcms-5.7.2
    Version:
    $Revision: 129527 $
    Author:
    Olivier Dedieu
    • Method Detail

      • getInstance

        public static ExportManager getInstance()
        Returns the singleton. Caution: This method is not thread-safe.
        Returns:
        the singleton.
        Since:
        jcms-5.7.2
      • isEnabled

        public boolean isEnabled()
        Returns true if the Export Manager is enabled.
        Returns:
        true if the Export Manager is enabled.
        Since:
        jcms-5.7.2
      • init

        public void init()
      • checkIP

        public boolean checkIP​(java.lang.String ip)
        Returns true if the given IP address is authorized and the ExportManager is enabled.
        Parameters:
        ip - the IP address to be checked
        Returns:
        true if the given IP address is authorized and the ExportManager is enabled.
        Since:
        jcms-5.7.2
      • exportXml

        public java.lang.String exportXml​(Data data)
        Deprecated.
        Returns the XML export for the given data.
        Parameters:
        data - the data to be exported.
        Returns:
        the XML export for the given data. The returned String does not contain the XML declaration (<?xml>).
        Since:
        jcms-5.7.2
      • exportXml

        public java.lang.String exportXml​(Data data,
                                          Member mbr)
        Returns the XML export for the given data.
        Parameters:
        data - the data to be exported.
        mbr - the member
        Returns:
        the XML export for the given data. The returned String does not contain the XML declaration (<?xml>).
        Since:
        jcms-6.1.4
      • exportXml

        public java.lang.String exportXml​(java.lang.String queryString)
        Deprecated.
        Returns the XML export for the given JCMS query. The QueryHandler attribute named ExportConstants.EXPORT_QH_ATTR is set to allow QueryFilters to have a special behavior for export query.
        Parameters:
        queryString - a JCMS query string (eg. types=Article&cids=c_1234)
        Returns:
        the XML export for the given JCMS query. The returned String does not contain the XML declaration (<?xml>).
        Since:
        jcms-5.7.2
      • exportXml

        public java.lang.String exportXml​(java.lang.String queryString,
                                          Member mbr)
        Returns the XML export for the given JCMS query. The QueryHandler attribute named ExportConstants.EXPORT_QH_ATTR is set to allow QueryFilters to have a special behavior for export query.
        Parameters:
        queryString - a JCMS query string (eg. types=Article&amp;cids=c_1234 )
        mbr - the member
        Returns:
        the XML export for the given JCMS query. The returned String does not contain the XML declaration (<?xml>).
        Since:
        jcms-6.1.4
      • exportXml

        public java.lang.String exportXml​(java.util.Set<? extends Data> dataSet)
        Returns the XML export for the given data set.
        Parameters:
        dataSet - the data to be exported.
        Returns:
        the XML export for the given dataSet. The returned String does not contain the XML declaration (<?xml>).
        Since:
        jcms-5.7.2