Package com.jalios.jcms.mashup
Class ImportStatus
java.lang.Object
com.jalios.jcms.mashup.ImportStatus
- All Implemented Interfaces:
ImportConstants,MashupConstants
This class represents an Import Status.
- 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.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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFileError(String filename) voidaddFileSuccess(String filename) voidaddImportedData(Data data) getBatch()intintintgetFile()intintReturns the greatest mdate.getHost()Returns the host bound to the URLReturns the resource used to performed the import (i.e.longlonggetTime()Returns the time (duration) of the import.intgetUrl()intReturns the number of writes done during this import.booleanReturns true if the import was in error.voidvoidvoidvoidbooleanisFile()Returns true if the import has been done from a file.booleanbooleanbooleanisText()Returns true if the import has been done from a text.booleanisUrl()Returns true if the import has been done from an URL.voidvoidsetConflictCount(int conflictCount) voidsetCreateCount(int createCount) voidsetDataCount(int dataCount) voidsetEndTime(long endTime) voidsetErrorMsg(String errorMsg) voidvoidsetFileCount(int fileCount) voidsetFileErrorCount(int fileErrorCount) voidsetImportDate(Date importDate) voidsetMilestoneAdded(boolean milestoneAdded) voidsetSource(ImportSource source) voidsetStartTime(long startTime) voidsetSuccess(boolean success) voidsetTime(long time) Sets the time (duration) of the import.voidsetUpdateCount(int updateCount) voidtoString()voidupdateGreatestMdate(Date mdate) Update the greatest imported mdate with the given date.
-
Constructor Details
-
ImportStatus
public ImportStatus() -
ImportStatus
- Throws:
IllegalArgumentException
-
-
Method Details
-
toString
-
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
-
getResource
Returns the resource used to performed the import (i.e. the file or the url).- Returns:
- the resource used to performed the import (i.e. the file or the url).
- Since:
- jcms-5.7.2
-
isText
public boolean isText()Returns true if the import has been done from a text.- Returns:
- true if the import has been done from a text.
- Since:
- jcms-5.7.2
-
isFile
public boolean isFile()Returns true if the import has been done from a file.- Returns:
- true if the import has been done from a file.
- Since:
- jcms-5.7.2
-
isUrl
public boolean isUrl()Returns true if the import has been done from an URL.- Returns:
- true if the import has been done from an URL.
- Since:
- jcms-5.7.2
-
getTime
public long getTime()Returns the time (duration) of the import.- Returns:
- the time (duration) of the import.
- Since:
- jcms-5.7.3
-
setTime
public void setTime(long time) Sets the time (duration) of the import.- Parameters:
time- the time (duration) to set.- Since:
- jcms-5.7.3
-
getFile
- Returns:
- the file
-
setFile
- Parameters:
file- the file to set
-
getUrl
- Returns:
- the url
-
setUrl
- Parameters:
url- the url to set
-
getStartTime
public long getStartTime()- Returns:
- the startTime
-
setStartTime
public void setStartTime(long startTime) - Parameters:
startTime- the startTime to set
-
addImportedData
- Parameters:
data- the imported data to add.- Since:
- jcms-6.0.0
-
getImportedDataSet
- Returns:
- the set of imported data during this import.
- Since:
- jcms-6.0.0
-
incDataCount
public void incDataCount() -
incCreateCount
public void incCreateCount() -
incUpdateCount
public void incUpdateCount() -
incConflictCount
public void incConflictCount() -
addFileSuccess
-
getFileSuccessList
-
addFileError
-
getFileErrorList
-
updateGreatestMdate
Update the greatest imported mdate with the given date.- Parameters:
mdate- an imported mdate- Since:
- jcms-5.7.2
-
getGreatestMdate
Returns the greatest mdate.- Returns:
- the greatest mdate.
- Since:
- jcms-5.7.2
-
hasFailed
public boolean hasFailed()Returns true if the import was in error.- Returns:
- true if the import was in error.
- Since:
- jcms-5.7.2
-
getWriteCount
public int getWriteCount()Returns the number of writes done during this import.- Returns:
- the number of writes done during this import.
- Since:
- jcms-5.7.2
-
isSuccess
public boolean isSuccess()- Returns:
- the success
-
setSuccess
public void setSuccess(boolean success) - Parameters:
success- the success to set
-
getSource
- Returns:
- the source
-
setSource
- Parameters:
source- the source to set
-
getBatch
- Returns:
- the batch
-
setBatch
- Parameters:
batch- the batch to set
-
getDataCount
public int getDataCount()- Returns:
- the dataCount
-
setDataCount
public void setDataCount(int dataCount) - Parameters:
dataCount- the dataCount to set
-
getCreateCount
public int getCreateCount()- Returns:
- the createCount
-
setCreateCount
public void setCreateCount(int createCount) - Parameters:
createCount- the createCount to set
-
getUpdateCount
public int getUpdateCount()- Returns:
- the updateCount
-
setUpdateCount
public void setUpdateCount(int updateCount) - Parameters:
updateCount- the updateCount to set
-
getConflictCount
public int getConflictCount()- Returns:
- the conflictCount
-
setConflictCount
public void setConflictCount(int conflictCount) - Parameters:
conflictCount- the conflictCount to set
-
getFileCount
public int getFileCount()- Returns:
- the fileCount
-
setFileCount
public void setFileCount(int fileCount) - Parameters:
fileCount- the fileCount to set
-
getFileErrorCount
public int getFileErrorCount()- Returns:
- the fileErrorCount
-
setFileErrorCount
public void setFileErrorCount(int fileErrorCount) - Parameters:
fileErrorCount- the fileErrorCount to set
-
setEndTime
public void setEndTime(long endTime) - Parameters:
endTime- the endTime to set
-
getErrorMsg
- Returns:
- the errorMsg
-
setErrorMsg
- Parameters:
errorMsg- the errorMsg to set
-
getImportDate
- Returns:
- the importDate
-
setImportDate
- Parameters:
importDate- the importDate to set
-
isMilestoneAdded
public boolean isMilestoneAdded() -
setMilestoneAdded
public void setMilestoneAdded(boolean milestoneAdded)
-