com.jalios.jcms.mashup
Class ImportSource

java.lang.Object
  extended by com.jalios.jcms.mashup.ImportSource
All Implemented Interfaces:
ImportConstants, MashupConstants, JaliosConstants

public class ImportSource
extends Object
implements ImportConstants, JaliosConstants

This class represents an Import Source.

Since:
jcms-5.7.2
Version:
$Revision: 27753 $
Author:
Olivier Dedieu

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
ImportSource()
          Create an empty site
ImportSource(String id, JProperties prop)
          Create a site from properties
 
Method Summary
 String getHost()
          Returns the host bound to the URL
 String getId()
           
 ImportOptions getImportOptions()
          Returns the ImportOptions.
 Date getLastImportDate()
          Returns the last import date.
 ImportStatus getLastImportStatus()
          Returns the last import status (since JCMS last restart).
 String getName()
           
 Date getNextImportDate()
          Returns the next import date.
 String getScheduleCron()
           
 int getScheduleFrequency()
           
 String getUrl()
           
 ImportStatus importData()
          Import data from this site.
 boolean isScheduleEnabled()
           
 void resetLastImportDate()
          Reset the last import date.
 void setId(String id)
           
 void setImportOptions(ImportOptions importOptions)
          Set the ImportOptions
 void setLastImportStatus(ImportStatus status)
           
 void setName(String name)
           
 void setScheduleCron(String scheduleCron)
           
 void setScheduleEnabled(boolean isScheduleEnabled)
           
 void setScheduleFrequency(int scheduleFrequency)
           
 void setUrl(String url)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

ImportSource

public ImportSource()
Create an empty site

Since:
jcms-5.7.2

ImportSource

public ImportSource(String id,
                    JProperties prop)
Create a site from properties

Parameters:
id - the site's id
prop - 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 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 Date getNextImportDate()
Returns the next import date.

Returns:
the next import date.
Since:
jcms-5.7.2

getLastImportDate

public 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 String toString()
Overrides:
toString in class Object

getName

public String getName()
Returns:
the name
Since:
jcms-5.7.2

setName

public void setName(String name)
Parameters:
name - the name to set
Since:
jcms-5.7.2

getUrl

public String getUrl()
Returns:
the url
Since:
jcms-5.7.2

setUrl

public void setUrl(String url)
Parameters:
url - the url to set
Since:
jcms-5.7.2

getScheduleCron

public String getScheduleCron()
Returns:
the scheduleCron
Since:
jcms-5.7.2

setScheduleCron

public void setScheduleCron(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 String getId()
Returns:
the id
Since:
jcms-5.7.2

setId

public void setId(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


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