Package com.jalios.jcms.mashup
Class ExportManager
- java.lang.Object
-
- com.jalios.jcms.mashup.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 (seegetInstance()
).
It provides method to export data from an id, a query or a dataSet.- Since:
- jcms-5.7.2
- Author:
- Olivier Dedieu
-
-
Field Summary
-
Fields inherited from interface com.jalios.jcms.mashup.ExportConstants
EXPORT_DIR, EXPORT_IPFILTER_PROP, EXPORT_LOG_FILE, EXPORT_MAX_DATA_PROP, EXPORT_POLICY_EXPORTSET, EXPORT_QH_ATTR, EXPORT_SOURCE_URL_PROP
-
Fields inherited from interface com.jalios.jcms.mashup.MashupConstants
DATA_TAG, DATASET_TAG, FIELD_CLASS, FIELD_ENTRY, FIELD_ITEM, FIELD_KEY, FIELD_NAME, FIELD_TAG, FIELD_VALUE, FILE_FIELD, FILE_ID, FILE_MTIME, FILE_SIZE, FILE_TAG, FILE_TICKET, FILESET_TAG, RELATED_TAG
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
checkIP(java.lang.String ip)
Returns true if the given IP address is authorized and the ExportManager is enabled.java.lang.String
exportXml(Data data)
Deprecated.java.lang.String
exportXml(Data data, Member mbr)
Returns the XML export for the given data.java.lang.String
exportXml(java.lang.String queryString)
Deprecated.java.lang.String
exportXml(java.lang.String queryString, Member mbr)
Returns the XML export for the given JCMS query.java.lang.String
exportXml(java.util.Set<? extends Data> dataSet)
Returns the XML export for the given data set.static ExportManager
getInstance()
Returns the singleton.void
init()
boolean
isEnabled()
Returns true if the Export Manager is enabled.
-
-
-
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 namedExportConstants.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 namedExportConstants.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 )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
-
-