Package com.jalios.jcms.mashup
Class ImportSource
- java.lang.Object
 - 
- com.jalios.jcms.mashup.ImportSource
 
 
- 
- All Implemented Interfaces:
 ImportConstants,MashupConstants,JaliosConstants
public class ImportSource extends java.lang.Object implements ImportConstants, 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_PROP 
- 
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 
- 
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 
 - 
 
- 
Constructor Summary
Constructors Constructor Description ImportSource()Create an empty siteImportSource(java.lang.String id, JProperties prop)Create a site from properties 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetHost()Returns the host bound to the URLjava.lang.StringgetId()ImportOptionsgetImportOptions()Returns the ImportOptions.java.util.DategetLastImportDate()Returns the last import date.ImportStatusgetLastImportStatus()Returns the last import status (since JCMS last restart).java.lang.StringgetName()java.util.DategetNextImportDate()Returns the next import date.java.lang.StringgetScheduleCron()intgetScheduleFrequency()java.lang.StringgetUrl()ImportStatusimportData()Import data from this site.booleanisScheduleEnabled()voidresetLastImportDate()Reset the last import date.voidsetId(java.lang.String id)voidsetImportOptions(ImportOptions importOptions)Set the ImportOptionsvoidsetLastImportStatus(ImportStatus status)voidsetName(java.lang.String name)voidsetScheduleCron(java.lang.String scheduleCron)voidsetScheduleEnabled(boolean isScheduleEnabled)voidsetScheduleFrequency(int scheduleFrequency)voidsetUrl(java.lang.String url)java.lang.StringtoString() 
 - 
 
- 
- 
Constructor Detail
- 
ImportSource
public ImportSource()
Create an empty site- Since:
 - jcms-5.7.2
 
 
- 
ImportSource
public ImportSource(java.lang.String id, JProperties prop)Create a site from properties- Parameters:
 id- the site's idprop- the properties- Since:
 - jcms-5.7.2
 
 
 - 
 
- 
Method Detail
- 
importData
public ImportStatus 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
public java.lang.String 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
public java.util.Date getNextImportDate()
Returns the next import date.- Returns:
 - the next import date.
 - Since:
 - jcms-5.7.2
 
 
- 
getLastImportDate
public java.util.Date getLastImportDate()
Returns the last import date.- Returns:
 - the last import date.
 - Since:
 - jcms-5.7.2
 
 
- 
getLastImportStatus
public ImportStatus getLastImportStatus()
Returns the last import status (since JCMS last restart).- Returns:
 - the last import status.
 - Since:
 - jcms-5.7.2
 
 
- 
setLastImportStatus
public void setLastImportStatus(ImportStatus status)
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
- 
getName
public java.lang.String getName()
- Returns:
 - the name
 - Since:
 - jcms-5.7.2
 
 
- 
setName
public void setName(java.lang.String name)
- Parameters:
 name- the name to set- Since:
 - jcms-5.7.2
 
 
- 
getUrl
public java.lang.String getUrl()
- Returns:
 - the url
 - Since:
 - jcms-5.7.2
 
 
- 
setUrl
public void setUrl(java.lang.String url)
- Parameters:
 url- the url to set- Since:
 - jcms-5.7.2
 
 
- 
getScheduleCron
public java.lang.String getScheduleCron()
- Returns:
 - the scheduleCron
 - Since:
 - jcms-5.7.2
 
 
- 
setScheduleCron
public void setScheduleCron(java.lang.String scheduleCron)
- 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
public java.lang.String getId()
- Returns:
 - the id
 - Since:
 - jcms-5.7.2
 
 
- 
setId
public void setId(java.lang.String id)
- Parameters:
 id- the id to set- Since:
 - jcms-5.7.2
 
 
- 
getImportOptions
public ImportOptions getImportOptions()
Returns the ImportOptions.- Returns:
 - the ImportOptions.
 - Since:
 - jcms-5.7.3
 
 
- 
setImportOptions
public void setImportOptions(ImportOptions importOptions)
Set the ImportOptions- Parameters:
 importOptions- the ImportOptions to set.- Since:
 - jcms-5.7.3
 
 
 - 
 
 -