Package com.jalios.jcms.mashup
Class ImportStatus
- java.lang.Object
 - 
- com.jalios.jcms.mashup.ImportStatus
 
 
- 
- All Implemented Interfaces:
 ImportConstants,MashupConstants
public class ImportStatus extends java.lang.Object implements ImportConstants
This class represents an Import Status.- Since:
 - jcms-5.7.2
 - Version:
 - $Revision: 37622 $
 - Author:
 - Olivier Dedieu
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static java.lang.StringREVISION- 
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 
 - 
 
- 
Constructor Summary
Constructors Constructor Description ImportStatus()ImportStatus(java.lang.String logEntry) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFileError(java.lang.String filename)voidaddFileSuccess(java.lang.String filename)voidaddImportedData(Data data)java.lang.StringgetBatch()intgetConflictCount()intgetCreateCount()intgetDataCount()java.lang.StringgetErrorMsg()java.io.FilegetFile()intgetFileCount()intgetFileErrorCount()java.util.ListgetFileErrorList()java.util.ListgetFileSuccessList()java.util.DategetGreatestMdate()Returns the greatest mdate.java.lang.StringgetHost()Returns the host bound to the URLjava.util.DategetImportDate()java.util.Set<Data>getImportedDataSet()java.lang.StringgetResource()Returns the resource used to performed the import (i.e.ImportSourcegetSource()longgetStartTime()longgetTime()Returns the time (duration) of the import.intgetUpdateCount()java.lang.StringgetUrl()intgetWriteCount()Returns the number of writes done during this import.booleanhasFailed()Returns true if the import was in error.voidincConflictCount()voidincCreateCount()voidincDataCount()voidincUpdateCount()booleanisFile()Returns true if the import has been done from a file.booleanisMilestoneAdded()booleanisSuccess()booleanisText()Returns true if the import has been done from a text.booleanisUrl()Returns true if the import has been done from an URL.voidsetBatch(java.lang.String batch)voidsetConflictCount(int conflictCount)voidsetCreateCount(int createCount)voidsetDataCount(int dataCount)voidsetEndTime(long endTime)voidsetErrorMsg(java.lang.String errorMsg)voidsetFile(java.io.File file)voidsetFileCount(int fileCount)voidsetFileErrorCount(int fileErrorCount)voidsetImportDate(java.util.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)voidsetUrl(java.lang.String url)java.lang.StringtoString()voidupdateGreatestMdate(java.util.Date mdate)Update the greatest imported mdate with the given date. 
 - 
 
- 
- 
Field Detail
- 
REVISION
public static final java.lang.String REVISION
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
- 
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
 
 
- 
getResource
public java.lang.String 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
public java.io.File getFile()
- Returns:
 - the file
 
 
- 
setFile
public void setFile(java.io.File file)
- Parameters:
 file- the file to set
 
- 
getUrl
public java.lang.String getUrl()
- Returns:
 - the url
 
 
- 
setUrl
public void setUrl(java.lang.String url)
- 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
public void addImportedData(Data data)
- Parameters:
 data- the imported data to add.- Since:
 - jcms-6.0.0
 
 
- 
getImportedDataSet
public java.util.Set<Data> 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
public void addFileSuccess(java.lang.String filename)
 
- 
getFileSuccessList
public java.util.List getFileSuccessList()
 
- 
addFileError
public void addFileError(java.lang.String filename)
 
- 
getFileErrorList
public java.util.List getFileErrorList()
 
- 
updateGreatestMdate
public void updateGreatestMdate(java.util.Date mdate)
Update the greatest imported mdate with the given date.- Parameters:
 mdate- an imported mdate- Since:
 - jcms-5.7.2
 
 
- 
getGreatestMdate
public java.util.Date 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
public ImportSource getSource()
- Returns:
 - the source
 
 
- 
setSource
public void setSource(ImportSource source)
- Parameters:
 source- the source to set
 
- 
getBatch
public java.lang.String getBatch()
- Returns:
 - the batch
 
 
- 
setBatch
public void setBatch(java.lang.String batch)
- 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
public java.lang.String getErrorMsg()
- Returns:
 - the errorMsg
 
 
- 
setErrorMsg
public void setErrorMsg(java.lang.String errorMsg)
- Parameters:
 errorMsg- the errorMsg to set
 
- 
getImportDate
public java.util.Date getImportDate()
- Returns:
 - the importDate
 
 
- 
setImportDate
public void setImportDate(java.util.Date importDate)
- Parameters:
 importDate- the importDate to set
 
- 
isMilestoneAdded
public boolean isMilestoneAdded()
 
- 
setMilestoneAdded
public void setMilestoneAdded(boolean milestoneAdded)
 
 - 
 
 -