Package com.jalios.jcms.mashup
Class ImportSource
java.lang.Object
com.jalios.jcms.mashup.ImportSource
- All Implemented Interfaces:
ImportConstants,MashupConstants,JaliosConstants
This class represents an Import Source.
- Since:
- jcms-5.7.2
- Author:
- Olivier Dedieu
-
Field Summary
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_PROPFields 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_YEARFields 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 -
Constructor Summary
ConstructorsConstructorDescriptionCreate an empty siteImportSource(String id, JProperties prop) Create a site from properties -
Method Summary
Modifier and TypeMethodDescriptiongetHost()Returns the host bound to the URLgetId()Returns the ImportOptions.Returns the last import date.Returns the last import status (since JCMS last restart).getName()Returns the next import date.intgetUrl()Import data from this site.booleanvoidReset the last import date.voidvoidsetImportOptions(ImportOptions importOptions) Set the ImportOptionsvoidsetLastImportStatus(ImportStatus status) voidvoidsetScheduleCron(String scheduleCron) voidsetScheduleEnabled(boolean isScheduleEnabled) voidsetScheduleFrequency(int scheduleFrequency) voidtoString()
-
Constructor Details
-
ImportSource
public ImportSource()Create an empty site- Since:
- jcms-5.7.2
-
ImportSource
Create a site from properties- Parameters:
id- the site's idprop- the properties- Since:
- jcms-5.7.2
-
-
Method Details
-
importData
Import data from this site.- Returns:
- an ImportStatus that contains information about this import.
- Since:
- jcms-5.7.2
-
resetLastImportDate
public void resetLastImportDate()Reset the last import date. The next import will be a full-import.- Since:
- jcms-5.7.2
-
getHost
Returns the host bound to the URL- Returns:
- the host bound to the URL (or an empty String if there is no valid host for this ImportSource)
- Since:
- jcms-5.7.2
-
getNextImportDate
Returns the next import date.- Returns:
- the next import date.
- Since:
- jcms-5.7.2
-
getLastImportDate
Returns the last import date.- Returns:
- the last import date.
- Since:
- jcms-5.7.2
-
getLastImportStatus
Returns the last import status (since JCMS last restart).- Returns:
- the last import status.
- Since:
- jcms-5.7.2
-
setLastImportStatus
-
toString
-
getName
- Returns:
- the name
- Since:
- jcms-5.7.2
-
setName
- Parameters:
name- the name to set- Since:
- jcms-5.7.2
-
getUrl
- Returns:
- the url
- Since:
- jcms-5.7.2
-
setUrl
- Parameters:
url- the url to set- Since:
- jcms-5.7.2
-
getScheduleCron
- Returns:
- the scheduleCron
- Since:
- jcms-5.7.2
-
setScheduleCron
- Parameters:
scheduleCron- the scheduleCron to set- Since:
- jcms-5.7.2
-
getScheduleFrequency
public int getScheduleFrequency()- Returns:
- the scheduleFrequency
- Since:
- jcms-5.7.2
-
setScheduleFrequency
public void setScheduleFrequency(int scheduleFrequency) - Parameters:
scheduleFrequency- the scheduleFrequency to set- Since:
- jcms-5.7.2
-
isScheduleEnabled
public boolean isScheduleEnabled()- Returns:
- true if isScheduleEnabled
- Since:
- jcms-5.7.2
-
setScheduleEnabled
public void setScheduleEnabled(boolean isScheduleEnabled) - Parameters:
isScheduleEnabled- the isScheduleEnabled to set- Since:
- jcms-5.7.2
-
getId
- Returns:
- the id
- Since:
- jcms-5.7.2
-
setId
- Parameters:
id- the id to set- Since:
- jcms-5.7.2
-
getImportOptions
Returns the ImportOptions.- Returns:
- the ImportOptions.
- Since:
- jcms-5.7.3
-
setImportOptions
Set the ImportOptions- Parameters:
importOptions- the ImportOptions to set.- Since:
- jcms-5.7.3
-