com.jalios.jcms.mashup
Class ImportStatus

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

public class ImportStatus
extends Object
implements ImportConstants

This class represents an Import Status.

Since:
jcms-5.7.2
Version:
$Revision: 24723 $
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
 
Constructor Summary
ImportStatus()
           
ImportStatus(String logEntry)
           
 
Method Summary
 void addFileError(String filename)
           
 void addFileSuccess(String filename)
           
 void addImportedData(Data data)
           
 String getBatch()
           
 int getConflictCount()
           
 int getCreateCount()
           
 int getDataCount()
           
 String getErrorMsg()
           
 File getFile()
           
 int getFileCount()
           
 int getFileErrorCount()
           
 List getFileErrorList()
           
 List getFileSuccessList()
           
 Date getGreatestMdate()
          Returns the greatest mdate.
 String getHost()
          Returns the host bound to the URL
 Date getImportDate()
           
 Set<Data> getImportedDataSet()
           
 String getResource()
          Returns the resource used to performed the import (i.e. the file or the url).
 ImportSource getSource()
           
 long getStartTime()
           
 long getTime()
          Returns the time (duration) of the import.
 int getUpdateCount()
           
 String getUrl()
           
 int getWriteCount()
          Returns the number of writes done during this import.
 boolean hasFailed()
          Returns true if the import was in error.
 void incConflictCount()
           
 void incCreateCount()
           
 void incDataCount()
           
 void incUpdateCount()
           
 boolean isFile()
          Returns true if the import has been done from a file.
 boolean isMilestoneAdded()
           
 boolean isSuccess()
           
 boolean isText()
          Returns true if the import has been done from a text.
 boolean isUrl()
          Returns true if the import has been done from an URL.
 void setBatch(String batch)
           
 void setConflictCount(int conflictCount)
           
 void setCreateCount(int createCount)
           
 void setDataCount(int dataCount)
           
 void setEndTime(long endTime)
           
 void setErrorMsg(String errorMsg)
           
 void setFile(File file)
           
 void setFileCount(int fileCount)
           
 void setFileErrorCount(int fileErrorCount)
           
 void setImportDate(Date importDate)
           
 void setMilestoneAdded(boolean milestoneAdded)
           
 void setSource(ImportSource source)
           
 void setStartTime(long startTime)
           
 void setSuccess(boolean success)
           
 void setTime(long time)
          Sets the time (duration) of the import.
 void setUpdateCount(int updateCount)
           
 void setUrl(String url)
           
 String toString()
           
 void updateGreatestMdate(Date mdate)
          Update the greatest imported mdate with the given date.
 
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

ImportStatus

public ImportStatus()

ImportStatus

public ImportStatus(String logEntry)
             throws IllegalArgumentException
Throws:
IllegalArgumentException
Method Detail

toString

public String toString()
Overrides:
toString in class Object

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

getResource

public 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 File getFile()
Returns:
the file

setFile

public void setFile(File file)
Parameters:
file - the file to set

getUrl

public String getUrl()
Returns:
the url

setUrl

public void setUrl(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 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(String filename)

getFileSuccessList

public List getFileSuccessList()

addFileError

public void addFileError(String filename)

getFileErrorList

public List getFileErrorList()

updateGreatestMdate

public void updateGreatestMdate(Date mdate)
Update the greatest imported mdate with the given date.

Parameters:
mdate - an imported mdate
Since:
jcms-5.7.2

getGreatestMdate

public 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 String getBatch()
Returns:
the batch

setBatch

public void setBatch(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 String getErrorMsg()
Returns:
the errorMsg

setErrorMsg

public void setErrorMsg(String errorMsg)
Parameters:
errorMsg - the errorMsg to set

getImportDate

public Date getImportDate()
Returns:
the importDate

setImportDate

public void setImportDate(Date importDate)
Parameters:
importDate - the importDate to set

isMilestoneAdded

public boolean isMilestoneAdded()

setMilestoneAdded

public void setMilestoneAdded(boolean milestoneAdded)


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