Package org.opencms.db
Class CmsVisitedByFilter
java.lang.Object
org.opencms.db.CmsVisitedByFilter
- Direct Known Subclasses:
CmsSubscriptionFilter
Provides filters for getting resources visited by a user in a specified time range.
- Since:
- 8.0
-
Constructor Summary
ConstructorDescriptionConstructor, without parameters.Constructor, setting the user to the current user from the context. -
Method Summary
Modifier and TypeMethodDescriptionclone()
long
Returns the date specifying the start point in time from which a resource was visited.Returns the parent root path to read visited resources from.long
Returns the date specifying the end point in time to which a resource was visited.getUser()
Returns the user to check the visited resources for.boolean
Returns if subfolders should be included to search for visited resources.void
setFromDate
(long fromDate) Sets the date specifying the start point in time from which a resource was visited.void
setIncludeSubfolders
(boolean includeSubFolders) Returns if subfolders should be included to search for visited resources.void
setParentPath
(String parentPath) Sets the parent path to read visited resources from.void
setParentResource
(CmsResource parentResource) Sets the parent path to read visited resources from using the given resource as parent.void
setToDate
(long toDate) Sets the date specifying the end point in time to which a resource was visited.void
Sets the user to check the visited resources for.void
setVisitedDates
(long fromDate, long toDate) Sets the start and end point in time in which a resource was visited.toString()
Returns a user readable representation of the filter.
-
Constructor Details
-
CmsVisitedByFilter
public CmsVisitedByFilter()Constructor, without parameters.It is required to set the user manually if using this constructor.
-
CmsVisitedByFilter
Constructor, setting the user to the current user from the context.- Parameters:
cms
- the current users context
-
-
Method Details
-
clone
-
getFromDate
Returns the date specifying the start point in time from which a resource was visited.- Returns:
- the date specifying the start point in time from which a resource was visited
-
getParentPath
Returns the parent root path to read visited resources from.- Returns:
- the parent root path to read visited resources from
-
getToDate
Returns the date specifying the end point in time to which a resource was visited.- Returns:
- the date specifying the end point in time to which a resource was visited
-
getUser
Returns the user to check the visited resources for.- Returns:
- the user to check the visited resources for
-
isIncludeSubFolders
Returns if subfolders should be included to search for visited resources.- Returns:
true
if subfolders should be included to search for visited resources, otherwisefalse
-
setFromDate
Sets the date specifying the start point in time from which a resource was visited.- Parameters:
fromDate
- the date specifying the start point in time from which a resource was visited
-
setIncludeSubfolders
Returns if subfolders should be included to search for visited resources.- Parameters:
includeSubFolders
- the flag to determine if subfolders should be included
-
setParentPath
Sets the parent path to read visited resources from.This has to be the root path of the parent resource, not the site path.
- Parameters:
parentPath
- the parent path to read visited resources from
-
setParentResource
Sets the parent path to read visited resources from using the given resource as parent.- Parameters:
parentResource
- the resource to use as parent resource
-
setToDate
Sets the date specifying the end point in time to which a resource was visited.- Parameters:
toDate
- the date specifying the end point in time to which a resource was visited
-
setUser
Sets the user to check the visited resources for.- Parameters:
user
- the user to check the visited resources for
-
setVisitedDates
Sets the start and end point in time in which a resource was visited.- Parameters:
fromDate
- the date specifying the start point in time from which a resource was visitedtoDate
- the date specifying the end point in time to which a resource was visited
-
toString
Returns a user readable representation of the filter.
-