Package com.jalios.jcms.recenthistory
Class RecentHistoryManager
java.lang.Object
com.jalios.jcms.recenthistory.RecentHistoryManager
- All Implemented Interfaces:
JPropertiesListener
The Recent history manager
- Since:
- jcms-9.0.0
- Author:
- Kevin Bransard
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclearHistory(Member loggedMember, String workspaceId) Clean the logged member history in the given workspace.
If the workspace is empty clear, it cleans all history.static RecentHistoryManagergetPubRecentHistory(Member mbr, String workspaceId) Get the logged member recent browsed data collection.getPubRecentHistory(Member mbr, String workspaceId, int maxItemToDisplay) Get the member recent accessed content collection for the given workspace.Get the map of recent browsed data.getRecentWorkspaceSet(Member mbr, String userLang, boolean belongsToWorkspace, boolean isWorker, boolean withPortal) Returns the set of recently browsed Workspace (Workspace is returned when at least one of its publication has been read by the member)booleanvoidpropertiesChange(JProperties properties) Invoked after properties have been modified in JCMS and save on disk.booleanremoveEntry(String heId, Set<RecentHistoryEntry> set) Removes the specified history entry from this set by id if it is present.voidremoveHistory(Member loggedMember, String workspaceId, String pubId) Remove the entry in the user history entries for a workspacevoidupdateHistory(Publication pub, Member loggedMember) Update the navigation history of the member
-
Field Details
-
RECENT_HISTORY_ATTRIBUTE
- See Also:
-
RECENT_HISTORY_ENABLED_PROP
- See Also:
-
IGNORED_CLASS_PREFIXPROP
- See Also:
-
PARENT_SUBSTITUTION_PREFIXPROP
- See Also:
-
-
Method Details
-
getInstance
-
propertiesChange
Description copied from interface:JPropertiesListenerInvoked after properties have been modified in JCMS and save on disk.You cannot alter the value received in parameters.
Note that properties parameter may be null, a limited set of site properties, or all site properties.
To check that a property has been modified, reload the "current" property instead using
channel.getPropertiesorchannel.getProperty.- Specified by:
propertiesChangein interfaceJPropertiesListener- Parameters:
properties- the properties which have been submitted to change
-
isRecentHistoryEnabled
public boolean isRecentHistoryEnabled()- Returns:
- true if Recent History is enabled
- Since:
- jcms-9.0.3
-
updateHistory
Update the navigation history of the member- Parameters:
pub- the content or user content accessed by the memberloggedMember- the member- Since:
- jcms-9.0.0
-
removeHistory
Remove the entry in the user history entries for a workspace- Parameters:
loggedMember- the memberworkspaceId- the workspace identifierpubId- the Publication to remove from recent history- Since:
- jcms-9.0.0
-
clearHistory
Clean the logged member history in the given workspace.
If the workspace is empty clear, it cleans all history.- Parameters:
loggedMember- the memberworkspaceId- the workspace identifier- Since:
- jcms-9.0.0
-
getPubRecentHistory
Get the logged member recent browsed data collection.- Parameters:
mbr- logged memberworkspaceId- the workspace id, can be empty- Returns:
- the collection of recent browsed publication.
- Since:
- jcms-9.0.0
-
getPubRecentHistory
Get the member recent accessed content collection for the given workspace.- Parameters:
mbr- the memberworkspaceId- the workspace identifiermaxItemToDisplay- the number of items to display- Returns:
- the collection of recent accessed content
- Since:
- jcms-9.0.0
-
getRecentHistoryMap
Get the map of recent browsed data.- Parameters:
mbr- theMember- Returns:
- the map of RecentHistoryEntry for given Member
- Since:
- jcms-9.0.0
-
getRecentWorkspaceSet
public Set<Workspace> getRecentWorkspaceSet(Member mbr, String userLang, boolean belongsToWorkspace, boolean isWorker, boolean withPortal) Returns the set of recently browsed Workspace (Workspace is returned when at least one of its publication has been read by the member)- Parameters:
mbr- theMemberuserLang- the current user languagebelongsToWorkspace- if true the member must belongs to the workspaceisWorker- if true the member must be a worker in the workspacewithPortal- if true the workspace must have a portal- Returns:
- the set of
Workspacesorted on given member recent navigation - Since:
- jcms-10.0.0
-
removeEntry
Removes the specified history entry from this set by id if it is present.- Parameters:
heId- the id of the entryset- the set- Returns:
- true if removed, false otherwise.
- Since:
- jcms-9.0.0
-