public abstract class ChangeHistories extends Object
Modifier and Type | Field and Description |
---|---|
protected List<HistoryData> |
allHistories
Saved History data
|
protected boolean |
artificialTRS
A flag which should be turned on to true in case the inheriting class will be exposing
artificial TRS data which using the utility method of the ArtificialTRSMaker class.
|
protected ArtificialTRSMaker |
artificialTRSMaker
Mutex used for managing concurrent accesses to TRS information
|
static Comparator<org.eclipse.lyo.core.trs.ChangeEvent> |
changeEventComparator |
protected boolean |
hasBeenTweaked
This flag should be set to true by the implementing class in case it generates TRS data for
its TRS interface using the artifical TRS maker class functionality.
|
static Comparator<HistoryData> |
histDataComparator
Comparators for change events and history data
|
protected boolean |
periodicArtificialTRS
If this flag is turned on, artificial history data will be periodically added for the
existing base resources
|
protected String |
serviceBase
url prefix for the trs url e.g http://host/services/ will imply the trs uri shall be of the
type http://host/services/trs
|
protected long |
UPDATEINTERVAL
interval for updating the base resources
|
Constructor and Description |
---|
ChangeHistories() |
ChangeHistories(long UPDATEINTERVAL,
String serviceBase) |
Modifier and Type | Method and Description |
---|---|
void |
buildBaseResourcesAndChangeLogs(javax.servlet.http.HttpServletRequest httpServletRequest)
A synchronized call to the buildBaseResourcesAndChangeLogsInternal to manage concurrent calls
to the TRS service
|
org.eclipse.lyo.core.trs.Base |
getBaseResource(String pagenum,
javax.servlet.http.HttpServletRequest httpServletRequest)
Return pagenum's Base resource
|
org.eclipse.lyo.core.trs.ChangeLog |
getChangeLog(String pagenum,
javax.servlet.http.HttpServletRequest httpServletRequest)
Return pagenum's ChangeLog
|
abstract HistoryData[] |
getHistory(javax.servlet.http.HttpServletRequest httpServletRequest,
Date dateAfter)
Implemented by inheriting classes.
|
HistoryData[] |
getOrderedHistory(javax.servlet.http.HttpServletRequest httpServletRequest,
Date dateAfter)
Order the history data returned by the getHistory method to use it in the rest of the class
|
String |
getServiceBase() |
long |
getUPDATEINTERVAL() |
void |
setServiceBase(String serviceBase) |
void |
setUPDATEINTERVAL(long uPDATEINTERVAL) |
void |
updateHistories(List<HistoryData> hd) |
void |
updateHistories(String changeType,
List<URI> changedUris)
add a list of changes to the existing history data list.
|
public static Comparator<HistoryData> histDataComparator
public static Comparator<org.eclipse.lyo.core.trs.ChangeEvent> changeEventComparator
protected ArtificialTRSMaker artificialTRSMaker
protected List<HistoryData> allHistories
protected long UPDATEINTERVAL
protected boolean artificialTRS
protected boolean periodicArtificialTRS
protected boolean hasBeenTweaked
protected String serviceBase
public ChangeHistories(long UPDATEINTERVAL, String serviceBase)
public ChangeHistories()
public abstract HistoryData[] getHistory(javax.servlet.http.HttpServletRequest httpServletRequest, Date dateAfter)
dateAfter
- the date starting from which the change data is returnedpublic void updateHistories(String changeType, List<URI> changedUris)
changeType
- the type of change to be added: modification, creation or deletionchangedUris
- the uris of the changed objectspublic void updateHistories(List<HistoryData> hd)
public HistoryData[] getOrderedHistory(javax.servlet.http.HttpServletRequest httpServletRequest, Date dateAfter)
public void buildBaseResourcesAndChangeLogs(javax.servlet.http.HttpServletRequest httpServletRequest) throws URISyntaxException
URISyntaxException
public org.eclipse.lyo.core.trs.Base getBaseResource(String pagenum, javax.servlet.http.HttpServletRequest httpServletRequest) throws URISyntaxException
pagenum
- the required page of the basehttpServletRequest
- the http request for the base pageURISyntaxException
- propagated from called method throwing same exceptionpublic org.eclipse.lyo.core.trs.ChangeLog getChangeLog(String pagenum, javax.servlet.http.HttpServletRequest httpServletRequest) throws URISyntaxException
pagenum
- the required page of the change loghttpServletRequest
- the http request for the change log pageURISyntaxException
- propagated from called method throwing same exceptionpublic String getServiceBase()
public void setServiceBase(String serviceBase)
public long getUPDATEINTERVAL()
public void setUPDATEINTERVAL(long uPDATEINTERVAL)
Copyright © 2018. All Rights Reserved.