| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jcms.mashup.ImportManager
public class ImportManager
The ImportManager is the main class to manage data import.
 This class is a singleton (see getInstance()).
 It provides method to import data from an ImportSource, an URL or a File.
 It also manages import logs (ImportStatus).
| Field Summary | |
|---|---|
| static String | REVISION | 
| Fields inherited from interface com.jalios.jcms.mashup.ImportConstants | 
|---|
| IMPORT_ALARM_MGR, IMPORT_AUTHOR_PROP, IMPORT_CATEGORY_DEFAULT, IMPORT_DC_ATTR, IMPORT_DC_STEP, IMPORT_DIR, IMPORT_ENABLED, IMPORT_JDOM_ELEMENT, IMPORT_LOG_FILE, IMPORT_LOG_MAX, IMPORT_OPTIONS, IMPORT_OPTIONS_DC_CONTEXT, IMPORT_ROOT_PROP, IMPORT_SOURCE_FILE, IMPORT_SOURCE_PREFIX_PROP, IMPORT_SOURCES_DIR, IMPORT_STEP_CLEAN, IMPORT_STEP_IMPORT, IMPORT_STEP_UPDATE_REF, IMPORT_WS_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 | 
| Fields inherited from interface com.jalios.util.JaliosConstants | 
|---|
| CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR | 
| Constructor Summary | |
|---|---|
| ImportManager() | |
| Method Summary | |
|---|---|
|  void | addImportSource(ImportSource source)Adds a source to import. | 
|  boolean | checkMdate(Data importedData,
           Data localData)Returns true if importedData.importMdate is newer than the localData.importMdate. | 
|  Member | getImportAuthor()Returns the member used to be the author of all the imported data. | 
|  Data | getImportedData(String source,
                String importId)Returns the imported data from the given sourceand bound to the givenimportId(do not return conflict copy). | 
|  Category | getImportRootCategory()Returns the import root category. | 
|  ImportSource | getImportSource(String id)Returns the source bound to the given id. | 
|  Map<String,ImportSource> | getImportSourceMap()Returns the source Map {id, source}. | 
|  Workspace | getImportWorkspace()Returns the import workspace (the workspace of all the imported publications). | 
| static ImportManager | getInstance()Returns the singleton. | 
|  List | getLastImportStatusList()Returns a list of the last ImportStatus. | 
|  ImportStatus | importFromDocument(org.jdom.Document doc)Imports data from a JDom Document. | 
|  ImportStatus | importFromDocument(org.jdom.Document doc,
                   ImportOptions options)Imports data from a JDom Document. | 
|  ImportStatus | importFromFile(File file)Imports data from an XML JCMS export file. | 
|  ImportStatus | importFromFile(File file,
               ImportOptions options)Imports data from an XML JCMS export file. | 
|  ImportStatus | importFromFilename(String filename)Imports data from an XML JCMS export file. | 
|  ImportStatus | importFromFilename(String filename,
                   ImportOptions options)Imports data from an XML JCMS export file. | 
|  ImportStatus | importFromSource(ImportSource source)Imports data from the given source | 
|  ImportStatus | importFromUrl(String url)Imports data from an URL | 
|  ImportStatus | importFromUrl(String url,
              ImportOptions options)Imports data from an URL | 
|  void | indexImportedData(Data data)Index the given imported data (conflict copy are not indexed). | 
|  void | init()Initialize the ImportManager. | 
|  boolean | isEnabled()Returns true if the Import Manager is enabled. | 
|  void | removeImportSource(ImportSource source)Removes a source to import. | 
|  void | saveImportSources()Saves all the import sources. | 
|  void | unindexImportedData(Data data)Unindex the given imported data | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String REVISION
| Constructor Detail | 
|---|
public ImportManager()
| Method Detail | 
|---|
public static ImportManager getInstance()
public boolean isEnabled()
public void init()
public List getLastImportStatusList()
public void addImportSource(ImportSource source)
source - the source to addpublic void removeImportSource(ImportSource source)
source - the source to removepublic void saveImportSources()
public ImportSource getImportSource(String id)
id - a source's id
public Map<String,ImportSource> getImportSourceMap()
public ImportStatus importFromSource(ImportSource source)
source - the source to import
public ImportStatus importFromUrl(String url)
url - the URL of an XML JCMS export file.
public ImportStatus importFromUrl(String url,
                                  ImportOptions options)
url - the URL of an XML JCMS export file.options - the ImportOptions
public ImportStatus importFromFilename(String filename)
filename - the filename
public ImportStatus importFromFilename(String filename,
                                       ImportOptions options)
filename - the filenameoptions - the ImportOptions
public ImportStatus importFromFile(File file)
file - the file
public ImportStatus importFromFile(File file,
                                   ImportOptions options)
file - the fileoptions - the ImportOptions
public ImportStatus importFromDocument(org.jdom.Document doc)
doc - the JDom Document
public ImportStatus importFromDocument(org.jdom.Document doc,
                                       ImportOptions options)
doc - the JDom Documentoptions - the ImportOptions
public boolean checkMdate(Data importedData,
                          Data localData)
importedData - the imported DatalocalData - the local Data
public Data getImportedData(String source,
                            String importId)
source and bound to the given importId (do not return conflict copy).
source - the name of the import sourceimportId - the imported id
importId.public void indexImportedData(Data data)
data - the data to indexpublic void unindexImportedData(Data data)
data - the data to unindexpublic Member getImportAuthor()
public Workspace getImportWorkspace()
public Category getImportRootCategory()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||