Package eu.europa.esig.dss.tsl.dto
Class AbstractCacheDTO
java.lang.Object
eu.europa.esig.dss.tsl.dto.AbstractCacheDTO
- All Implemented Interfaces:
InfoRecord,Serializable
- Direct Known Subclasses:
DownloadCacheDTO,ParsingCacheDTO,ValidationCacheDTO
public class AbstractCacheDTO extends Object implements InfoRecord
The abstract cache DTO
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description AbstractCacheDTO()Empty constructorAbstractCacheDTO(AbstractCacheDTO cacheDTO)Copies the cache DTO -
Method Summary
Modifier and Type Method Description CacheStateEnumgetCacheState()Gets the state of the cacheDategetExceptionFirstOccurrenceTime()Gets the first time when the error is occurredDategetExceptionLastOccurrenceTime()Gets the last time when the error is occurredStringgetExceptionMessage()Gets the exception message for an error stateStringgetExceptionStackTrace()Gets the exception stack trace for an error stateDategetLastStateTransitionTime()Gets the last time when the state of record has been changedDategetLastSuccessSynchronizationTime()Gets the last time when the record has been synchronizedStringgetStatusName()Gets the record's status namebooleanisDesynchronized()Gets if the record is desynchronizedbooleanisError()Gets if the error is present for the recordbooleanisRefreshNeeded()Gets if the refresh is needed for an entrybooleanisResultExist()Gets if a result exist under the recordbooleanisSynchronized()Gets if the record is synchronizedbooleanisToBeDeleted()Gets if the record shall be deletedvoidsetCacheState(CacheStateEnum cacheState)Sets the cache statevoidsetExceptionFirstOccurrenceTime(Date exceptionFirstOccurrenceTime)Sets the first time of a the exception occurrencevoidsetExceptionLastOccurrenceTime(Date exceptionLastOccurrenceTime)Sets the last time of a the exception occurrencevoidsetExceptionMessage(String exceptionMessage)Sets the exception messagevoidsetExceptionStackTrace(String exceptionStackTrace)Sets the exception stack tracevoidsetLastStateTransitionTime(Date lastStateTransitionTime)Sets the last time of the state changevoidsetLastSuccessSynchronizationTime(Date lastSuccessSynchronizationTime)Sets the last time of a successful synchronizationvoidsetResultExist(boolean resultExist)Sets if the cache result exists
-
Constructor Details
-
AbstractCacheDTO
public AbstractCacheDTO()Empty constructor -
AbstractCacheDTO
Copies the cache DTO- Parameters:
cacheDTO-AbstractCacheDTOto copy
-
-
Method Details
-
getCacheState
Gets the state of the cache- Returns:
CacheStateEnum
-
setCacheState
Sets the cache state- Parameters:
cacheState-CacheStateEnum
-
getLastStateTransitionTime
Description copied from interface:InfoRecordGets the last time when the state of record has been changed- Specified by:
getLastStateTransitionTimein interfaceInfoRecord- Returns:
Date
-
setLastStateTransitionTime
Sets the last time of the state change- Parameters:
lastStateTransitionTime-Date
-
getLastSuccessSynchronizationTime
Description copied from interface:InfoRecordGets the last time when the record has been synchronized- Specified by:
getLastSuccessSynchronizationTimein interfaceInfoRecord- Returns:
Date
-
setLastSuccessSynchronizationTime
Sets the last time of a successful synchronization- Parameters:
lastSuccessSynchronizationTime-Date
-
getExceptionMessage
Description copied from interface:InfoRecordGets the exception message for an error state- Specified by:
getExceptionMessagein interfaceInfoRecord- Returns:
String
-
setExceptionMessage
Sets the exception message- Parameters:
exceptionMessage-String
-
getExceptionStackTrace
Description copied from interface:InfoRecordGets the exception stack trace for an error state- Specified by:
getExceptionStackTracein interfaceInfoRecord- Returns:
String
-
setExceptionStackTrace
Sets the exception stack trace- Parameters:
exceptionStackTrace-String
-
getExceptionFirstOccurrenceTime
Description copied from interface:InfoRecordGets the first time when the error is occurred- Specified by:
getExceptionFirstOccurrenceTimein interfaceInfoRecord- Returns:
Date
-
setExceptionFirstOccurrenceTime
Sets the first time of a the exception occurrence- Parameters:
exceptionFirstOccurrenceTime-Date
-
getExceptionLastOccurrenceTime
Description copied from interface:InfoRecordGets the last time when the error is occurred- Specified by:
getExceptionLastOccurrenceTimein interfaceInfoRecord- Returns:
Date
-
setExceptionLastOccurrenceTime
Sets the last time of a the exception occurrence- Parameters:
exceptionLastOccurrenceTime-Date
-
isResultExist
public boolean isResultExist()Description copied from interface:InfoRecordGets if a result exist under the record- Specified by:
isResultExistin interfaceInfoRecord- Returns:
- TRUE if the result exists, FALSE otherwise
-
setResultExist
public void setResultExist(boolean resultExist)Sets if the cache result exists- Parameters:
resultExist- if the cache result exists
-
isRefreshNeeded
public boolean isRefreshNeeded()Description copied from interface:InfoRecordGets if the refresh is needed for an entry- Specified by:
isRefreshNeededin interfaceInfoRecord- Returns:
- TRUE if the refresh is needed, FALSE otherwise
-
isDesynchronized
public boolean isDesynchronized()Description copied from interface:InfoRecordGets if the record is desynchronized- Specified by:
isDesynchronizedin interfaceInfoRecord- Returns:
- TRUE if the record is desynchronized, FALSE otherwise
-
isSynchronized
public boolean isSynchronized()Description copied from interface:InfoRecordGets if the record is synchronized- Specified by:
isSynchronizedin interfaceInfoRecord- Returns:
- TRUE if the record is synchronized, FALSE otherwise
-
isError
public boolean isError()Description copied from interface:InfoRecordGets if the error is present for the record- Specified by:
isErrorin interfaceInfoRecord- Returns:
- TRUE if the record defines an error, FALSE otherwise
-
isToBeDeleted
public boolean isToBeDeleted()Description copied from interface:InfoRecordGets if the record shall be deleted- Specified by:
isToBeDeletedin interfaceInfoRecord- Returns:
- TRUE if the record shall be deleted, FALSE otherwise
-
getStatusName
Description copied from interface:InfoRecordGets the record's status name- Specified by:
getStatusNamein interfaceInfoRecord- Returns:
String
-