|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.db.BasicDBListener com.jalios.jcms.tracking.ReaderTrackerManager
public class ReaderTrackerManager
Nested Class Summary | |
---|---|
class |
ReaderTrackerManager.CacheEntry
|
Field Summary | |
---|---|
static String |
REVISION
|
Fields inherited from interface com.jalios.util.JaliosConstants |
---|
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR |
Method Summary | |
---|---|
void |
anonymizeAllReaderTracker(Member mbr)
|
int |
getAccessCount(List<ReaderTracker> list)
Returns the sum of access count for the list of ReaderTracker. |
int |
getAccessCount(Publication pub)
Returns the sum of access count for the given publication. |
static ReaderTrackerManager |
getInstance()
|
Set<ReaderTrackerEntry> |
getMergedReaderTrackerSet(List<ReaderTracker> readerList,
ReaderTrackerEntry.Sort Sort,
boolean isReverse)
Returns a List of ReaderTrackerEntry which merges a ReaderTracker List to avoid duplicates |
Set<ReaderTrackerEntry> |
getMergedReaderTrackerSet(Publication pub,
ReaderTrackerEntry.Sort Sort,
boolean isReverse)
|
int |
getReaderCount(Publication pub)
Returns the reader count for the given publication. |
ReaderTracker |
getReaderTracker(Publication pub,
Member mbr)
Returns the ReaderTracker for the given Publication and the given Member. |
List |
getReaderTrackerList(Publication pub)
Returns the reader list for the given publication. |
List |
getReaderTrackerList(Publication pub,
String orderBy,
boolean reverse)
|
void |
invalidateAllCacheEntries()
Invalidate all the cache entries. |
void |
invalidateCacheEntry(Publication pub)
Invalidate the cache entries for the given publication |
boolean |
isReader(Publication pub,
Member mbr)
Returns true if the given publication has been read by the given member. |
void |
onPostDelete(DBData data,
org.hibernate.event.PostDeleteEvent event,
boolean firstTime)
|
void |
onPostInsert(DBData data,
org.hibernate.event.PostInsertEvent event,
boolean firstTime)
|
void |
onPostUpdate(DBData data,
org.hibernate.event.PostUpdateEvent event,
boolean firstTime)
|
void |
removeAllReaderTracker(Member mbr,
boolean anonymize)
Removes all the ReaderTracekr bound to the given member ; and optionally report all the access of this member as anonymous access. |
void |
removeAllReaderTracker(Publication pub)
Removes all the ReaderTracker bound to the given publication. |
void |
track(Publication pub,
Member mbr)
Tracks the given member for the given publication. |
Methods inherited from class com.jalios.jcms.db.BasicDBListener |
---|
getAdateFromState, getAuthorIdFromState, getCdateFromState, getEdateFromState, getMdateFromState, getPdateFromState, getPrePstatus, getPrePstatus, getPstatusFromState, hasNoChange, hasNoChange, init, onPreUpdate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
Method Detail |
---|
public static ReaderTrackerManager getInstance()
public int getReaderCount(Publication pub)
pub
- the publication
public List getReaderTrackerList(Publication pub)
pub
- the publication
public List getReaderTrackerList(Publication pub, String orderBy, boolean reverse)
pub
- the Publication
orderBy
- the orderby of the queryreverse
- to defines the order of the query
public Set<ReaderTrackerEntry> getMergedReaderTrackerSet(Publication pub, ReaderTrackerEntry.Sort Sort, boolean isReverse)
pub
- the tracked Publication
Sort
- the ReaderTrackerEntry.Sort
of the queryisReverse
- true to sort results reversed
ReaderTrackerEntry
which merges a ReaderTracker
List to avoid duplicatespublic Set<ReaderTrackerEntry> getMergedReaderTrackerSet(List<ReaderTracker> readerList, ReaderTrackerEntry.Sort Sort, boolean isReverse)
ReaderTrackerEntry
which merges a ReaderTracker
List to avoid duplicates
readerList
- the list of ReaderTracker
Sort
- the ReaderTrackerEntry.Sort
of the queryisReverse
- true to sort results reversed
ReaderTrackerEntry
which merges a ReaderTracker
List to avoid duplicatespublic ReaderTracker getReaderTracker(Publication pub, Member mbr)
pub
- the publicationmbr
- the member
public int getAccessCount(Publication pub)
pub
- the publication.
public int getAccessCount(List<ReaderTracker> list)
list
- a list of ReaderTracker
public boolean isReader(Publication pub, Member mbr)
pub
- the publicationmbr
- the member
public void track(Publication pub, Member mbr)
pub
- the publicationmbr
- the reader to be tracked (may be null)public void removeAllReaderTracker(Publication pub)
pub
- the publicationpublic void removeAllReaderTracker(Member mbr, boolean anonymize)
mbr
- the memberanonymize
- if true report all the access of this member as anonymous access.public void anonymizeAllReaderTracker(Member mbr)
public void invalidateCacheEntry(Publication pub)
pub
- the publication idpublic void invalidateAllCacheEntries()
public void onPostInsert(DBData data, org.hibernate.event.PostInsertEvent event, boolean firstTime)
onPostInsert
in interface DBListener
onPostInsert
in class BasicDBListener
DBListener.onPostInsert(DBData, PostInsertEvent, boolean)
public void onPostUpdate(DBData data, org.hibernate.event.PostUpdateEvent event, boolean firstTime)
onPostUpdate
in interface DBListener
onPostUpdate
in class BasicDBListener
DBListener.onPostUpdate(DBData, PostUpdateEvent, boolean)
public void onPostDelete(DBData data, org.hibernate.event.PostDeleteEvent event, boolean firstTime)
onPostDelete
in interface DBListener
onPostDelete
in class BasicDBListener
DBListener.onPostDelete(DBData, PostDeleteEvent, boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |