Class 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
    • Constructor Detail

      • ImportStatus

        public ImportStatus()
      • ImportStatus

        public ImportStatus​(java.lang.String logEntry)
                     throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
    • Method Detail

      • toString

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