org.opencms.db
Class CmsVisitedByFilter

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

public class CmsVisitedByFilter
extends java.lang.Object

Provides filters for getting resources visited by a user in a specified time range.

Since:
8.0

Constructor Summary
CmsVisitedByFilter()
          Constructor, without parameters.
CmsVisitedByFilter(CmsObject cms)
          Constructor, setting the user to the current user from the context.
 
Method Summary
 java.lang.Object clone()
           
 long getFromDate()
          Returns the date specifying the start point in time from which a resource was visited.
 java.lang.String getParentPath()
          Returns the parent root path to read visited resources from.
 long getToDate()
          Returns the date specifying the end point in time to which a resource was visited.
 CmsUser getUser()
          Returns the user to check the visited resources for.
 boolean isIncludeSubFolders()
          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(java.lang.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 setUser(CmsUser user)
          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.
 java.lang.String toString()
          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 Detail

CmsVisitedByFilter

public CmsVisitedByFilter()
Constructor, without parameters.

It is required to set the user manually if using this constructor.


CmsVisitedByFilter

public CmsVisitedByFilter(CmsObject cms)
Constructor, setting the user to the current user from the context.

Parameters:
cms - the current users context
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object
See Also:
Object.clone()

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

public java.lang.String 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(java.lang.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 java.lang.String toString()
Returns a user readable representation of the filter.

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()