Class CmsVisitedByFilter

java.lang.Object
org.opencms.db.CmsVisitedByFilter
Direct Known Subclasses:
CmsSubscriptionFilter

public class CmsVisitedByFilter extends Object
Provides filters for getting resources visited by a user in a specified time range.

Since:
8.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor, without parameters.
    Constructor, setting the user to the current user from the context.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    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.
    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
    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.
    Returns a user readable representation of the filter.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • 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

      public Object clone()
      Overrides:
      clone in class Object
      See Also:
    • getFromDate

      public long 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

      public long 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

      public CmsUser getUser()
      Returns the user to check the visited resources for.

      Returns:
      the user to check the visited resources for
    • isIncludeSubFolders

      public boolean isIncludeSubFolders()
      Returns if subfolders should be included to search for visited resources.

      Returns:
      true if subfolders should be included to search for visited resources, otherwise false
    • setFromDate

      public void setFromDate(long fromDate)
      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

      public void setIncludeSubfolders(boolean includeSubFolders)
      Returns if subfolders should be included to search for visited resources.

      Parameters:
      includeSubFolders - the flag to determine if subfolders should be included
    • setParentPath

      public void setParentPath(String parentPath)
      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

      public void setParentResource(CmsResource parentResource)
      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

      public void setToDate(long toDate)
      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

      public void setUser(CmsUser user)
      Sets the user to check the visited resources for.

      Parameters:
      user - the user to check the visited resources for
    • setVisitedDates

      public void setVisitedDates(long fromDate, long toDate)
      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 visited
      toDate - the date specifying the end point in time to which a resource was visited
    • toString

      public String toString()
      Returns a user readable representation of the filter.

      Overrides:
      toString in class Object
      See Also: