|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jcms.db.BasicDBListener
com.jalios.jcms.tracking.ReaderTrackerManager
public class ReaderTrackerManager
| Nested Class Summary | |
|---|---|
class |
ReaderTrackerManager.CacheEntry
|
| Field Summary | |
|---|---|
static String |
READER_TRACKER_ANONYMIZE_PROP
|
static String |
READER_TRACKER_ENABLED_PROP
|
static String |
READER_TRACKER_TYPES_PROP
|
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)
|
boolean |
canAccessReaderTracker(Publication pub,
Member mbr)
|
boolean |
canDeleteReaderTracker(Publication pub,
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. |
int |
getAnonymousReaderAccessCount(Publication pub)
|
int |
getAnonymousReaderDownloadCount(Publication pub)
|
int |
getAuthentifiedReaderAccessCount(Publication pub)
|
int |
getAuthentifiedReaderDownloadCount(Publication pub)
|
int |
getAuthentifiedReaderUniqueAccessCount(Publication pub)
|
int |
getAuthentifiedReaderUniqueDownloadCount(Publication pub)
|
int |
getDownloadCount(Publication pub)
Returns the download count for the given publication for authentified users. |
static ReaderTrackerManager |
getInstance()
|
List<ReaderTrackerEntry> |
getMergedReaderTrackerList(List<ReaderTracker> readerList,
ReaderTrackerEntry.Sort Sort,
boolean isReverse)
|
List<ReaderTrackerEntry> |
getMergedReaderTrackerList(Publication pub,
ReaderTrackerEntry.Sort Sort,
boolean isReverse)
|
int |
getReaderAccessCount(Publication pub)
|
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. |
ReaderTracker |
getReaderTracker(Publication pub,
Member mbr,
int accessType)
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,
int accessType)
|
List |
getReaderTrackerList(Publication pub,
String orderBy,
boolean reverse,
int accessType)
|
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. |
boolean |
isReaderTrackerAnonymized()
|
boolean |
isReaderTrackerEnabled()
|
boolean |
isTracked(Publication pub)
|
boolean |
isTypeReaderTracked(Class clazz)
Returns true if the given class is reader tracked |
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 |
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk. |
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. |
void |
track(Publication pub,
Member mbr,
int accessType)
Tracks the given member for the given publication and for given access Type. |
| 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 READER_TRACKER_ANONYMIZE_PROP
public static final String READER_TRACKER_TYPES_PROP
public static final String READER_TRACKER_ENABLED_PROP
public static final String REVISION
| Method Detail |
|---|
public static ReaderTrackerManager getInstance()
public void propertiesChange(JProperties properties)
JPropertiesListenerYou cannot alter the value received in parameters.
propertiesChange in interface JPropertiesListenerproperties - the properties which have been modified (may not contain all JCMS properties)public boolean isReaderTrackerEnabled()
public boolean isReaderTrackerAnonymized()
public boolean isTypeReaderTracked(Class clazz)
clazz - the class to check
public boolean isTracked(Publication pub)
pub - the Publication
public int getReaderCount(Publication pub)
pub - the publication
public int getReaderAccessCount(Publication pub)
pub - the Publication
public int getAuthentifiedReaderUniqueAccessCount(Publication pub)
pub - the Publication
public int getAuthentifiedReaderAccessCount(Publication pub)
pub - the Publication
public int getAnonymousReaderAccessCount(Publication pub)
pub - the Publication
public List getReaderTrackerList(Publication pub)
pub - the publication
public List getReaderTrackerList(Publication pub,
int accessType)
pub - accessType -
public List getReaderTrackerList(Publication pub,
String orderBy,
boolean reverse,
int accessType)
pub - the PublicationorderBy - the orderby of the queryreverse - to defines the order of the queryaccessType - the type of access
public List<ReaderTrackerEntry> getMergedReaderTrackerList(Publication pub,
ReaderTrackerEntry.Sort Sort,
boolean isReverse)
pub - the tracked PublicationSort - the ReaderTrackerEntry.Sort of the queryisReverse - true to sort results reversed
ReaderTrackerEntry which merges a ReaderTracker List to avoid duplicates
public List<ReaderTrackerEntry> getMergedReaderTrackerList(List<ReaderTracker> readerList,
ReaderTrackerEntry.Sort Sort,
boolean isReverse)
readerList - the list of ReaderTrackerSort - the ReaderTrackerEntry.Sort of the queryisReverse - true to sort results reversed
ReaderTrackerEntry which merges a ReaderTracker List to avoid duplicates
public ReaderTracker getReaderTracker(Publication pub,
Member mbr)
pub - the publicationmbr - the member
public ReaderTracker getReaderTracker(Publication pub,
Member mbr,
int accessType)
pub - the publicationmbr - the member
public int getDownloadCount(Publication pub)
pub - the publication
public int getAuthentifiedReaderUniqueDownloadCount(Publication pub)
pub - the Publication
public int getAuthentifiedReaderDownloadCount(Publication pub)
pub - the Publication
public int getAnonymousReaderDownloadCount(Publication pub)
pub - the Publication
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 track(Publication pub,
Member mbr,
int accessType)
pub - the publicationmbr - the reader to be tracked (may be null)accessType - the type of accesspublic void removeAllReaderTracker(Publication pub)
pub - the publication
public 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 boolean canAccessReaderTracker(Publication pub,
Member mbr)
pub - the Publicationmbr - the Member
public boolean canDeleteReaderTracker(Publication pub,
Member mbr)
pub - the Publicationmbr - the Member
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 DBListeneronPostInsert in class BasicDBListenerDBListener.onPostInsert(DBData, PostInsertEvent, boolean)
public void onPostUpdate(DBData data,
org.hibernate.event.PostUpdateEvent event,
boolean firstTime)
onPostUpdate in interface DBListeneronPostUpdate in class BasicDBListenerDBListener.onPostUpdate(DBData, PostUpdateEvent, boolean)
public void onPostDelete(DBData data,
org.hibernate.event.PostDeleteEvent event,
boolean firstTime)
onPostDelete in interface DBListeneronPostDelete in class BasicDBListenerDBListener.onPostDelete(DBData, PostDeleteEvent, boolean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||