public class RecentHistoryManager extends java.lang.Object implements JPropertiesListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
RECENT_HISTORY_ATTRIBUTE |
static java.lang.String |
RECENT_HISTORY_ENABLED_PROP |
REVISION
Modifier and Type | Method and Description |
---|---|
void |
clearHistory(Member loggedMember,
java.lang.String workspaceId)
Clean the logged member history in the given workspace.
If the workspace is empty clear, it cleans all history. |
static RecentHistoryManager |
getInstance() |
java.util.Set<Publication> |
getPubRecentHistory(Member mbr,
java.lang.String workspaceId)
Get the logged member recent browsed data collection.
|
java.util.Set<Publication> |
getPubRecentHistory(Member mbr,
java.lang.String workspaceId,
int maxItemToDisplay)
Get the member recent accessed content collection for the given workspace.
|
boolean |
isRecentHistoryEnabled() |
void |
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.
|
boolean |
removeEntry(java.lang.String heId,
java.util.Set<RecentHistoryEntry> set)
Removes the specified history entry from this set by id if it is present.
|
void |
removeHistory(Member loggedMember,
java.lang.String workspaceId,
java.lang.String pubId)
Remove the entry in the user history entries for a workspace
|
void |
updateHistory(Publication pub,
Member loggedMember)
Update the navigation history of the member
|
public static final java.lang.String RECENT_HISTORY_ATTRIBUTE
public static final java.lang.String RECENT_HISTORY_ENABLED_PROP
public static RecentHistoryManager getInstance()
public void propertiesChange(JProperties properties)
JPropertiesListener
You cannot alter the value received in parameters.
propertiesChange
in interface JPropertiesListener
properties
- the properties which have been modified (may not contain all JCMS properties)public boolean isRecentHistoryEnabled()
public void updateHistory(Publication pub, Member loggedMember)
pub
- the content or user content accessed by the memberloggedMember
- the memberpublic void removeHistory(Member loggedMember, java.lang.String workspaceId, java.lang.String pubId)
loggedMember
- the memberworkspaceId
- the workspace identifierpubId
- the Publication to remove from recent historypublic void clearHistory(Member loggedMember, java.lang.String workspaceId)
loggedMember
- the memberworkspaceId
- the workspace identifierpublic java.util.Set<Publication> getPubRecentHistory(Member mbr, java.lang.String workspaceId)
mbr
- logged memberworkspaceId
- the workspace id, can be emptypublic java.util.Set<Publication> getPubRecentHistory(Member mbr, java.lang.String workspaceId, int maxItemToDisplay)
mbr
- the memberworkspaceId
- the workspace identifiermaxItemToDisplay
- the number of items to displaypublic boolean removeEntry(java.lang.String heId, java.util.Set<RecentHistoryEntry> set)
heId
- the id of the entryset
- the setCopyright © 2001-2016 Jalios SA. All Rights Reserved.