com.jalios.jcms.mashup
Class ExportManager

java.lang.Object
  extended by com.jalios.jcms.mashup.ExportManager
All Implemented Interfaces:
ExportConstants, MashupConstants

public class ExportManager
extends 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: 28407 $
Author:
Olivier Dedieu

Field Summary
static String REVISION
           
 
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
 boolean checkIP(String ip)
          Returns true if the given IP address is authorized and the ExportManager is enabled.
 String exportXml(Data data)
          Deprecated. use exportXml(Data, Member)
 String exportXml(Data data, Member mbr)
          Returns the XML export for the given data.
 String exportXml(Set<? extends Data> dataSet)
          Returns the XML export for the given data set.
 String exportXml(String queryString)
          Deprecated. use exportXml(String, Member)
 String exportXml(String queryString, Member mbr)
          Returns the XML export for the given JCMS query.
static ExportManager getInstance()
          Returns the singleton.
 void init()
           
 boolean isEnabled()
          Returns true if the Export Manager is enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
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(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 String exportXml(Data data)
Deprecated. use exportXml(Data, Member)

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 ().
Since:
jcms-5.7.2

exportXml

public 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 ().
Since:
jcms-6.1.4

exportXml

public String exportXml(String queryString)
Deprecated. use exportXml(String, Member)

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 ().
Since:
jcms-5.7.2

exportXml

public String exportXml(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&cids=c_1234)
mbr - the member
Returns:
the XML export for the given JCMS query. The returned String does not contain the XML declaration ().
Since:
jcms-6.1.4

exportXml

public String exportXml(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 ().
Since:
jcms-5.7.2


Copyright © 2001-2010 Jalios SA. All Rights Reserved.