Package org.opencms.db
Class CmsSubscriptionFilter
java.lang.Object
org.opencms.db.CmsVisitedByFilter
org.opencms.db.CmsSubscriptionFilter
Provides filters for getting resources subscribed by a user or group in a specified time range.
- Since:
- 8.0
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor, without parameters.Constructor, setting the user to the current user from the context.CmsSubscriptionFilter
(CmsObject cms, boolean addUserGroups) Constructor, setting the user to the current user from the context. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a group to the list of groups to check subscribed resources for.clone()
Returns the groups to check subscribed resources for.getMode()
Returns the mode to read subscribed resources.void
Sets the groups to check subscribed resources for.void
Sets the mode to read subscribed resources.void
setUserGroups
(CmsObject cms) Sets the groups of the user currently set in this filter as the list of groups to check subscribed resources for.toString()
Returns a user readable representation of the filter.Methods inherited from class org.opencms.db.CmsVisitedByFilter
getFromDate, getParentPath, getToDate, getUser, isIncludeSubFolders, setFromDate, setIncludeSubfolders, setParentPath, setParentResource, setToDate, setUser, setVisitedDates
-
Constructor Details
-
CmsSubscriptionFilter
public CmsSubscriptionFilter()Constructor, without parameters.It is required to set the user or group manually if using this constructor.
-
CmsSubscriptionFilter
Constructor, setting the user to the current user from the context.- Parameters:
cms
- the current users context
-
CmsSubscriptionFilter
Constructor, setting the user to the current user from the context.- Parameters:
cms
- the current users contextaddUserGroups
- determines if the groups of the current user should be added to the list of groups of the filter
-
-
Method Details
-
addGroup
Adds a group to the list of groups to check subscribed resources for.- Parameters:
group
- the group to add
-
clone
- Overrides:
clone
in classCmsVisitedByFilter
- See Also:
-
getGroups
Returns the groups to check subscribed resources for.- Returns:
- the groups to check subscribed resources for
-
getMode
Returns the mode to read subscribed resources.- Returns:
- the mode to read subscribed resources
-
setGroups
Sets the groups to check subscribed resources for.- Parameters:
groups
- the groups to check subscribed resources for
-
setMode
Sets the mode to read subscribed resources.- Parameters:
mode
- the mode to read subscribed resources
-
setUserGroups
Sets the groups of the user currently set in this filter as the list of groups to check subscribed resources for.- Parameters:
cms
- the current users context
-
toString
Returns a user readable representation of the filter.- Overrides:
toString
in classCmsVisitedByFilter
- See Also:
-