Package org.opencms.db
Class CmsSubscriptionFilter
- java.lang.Object
-
- org.opencms.db.CmsVisitedByFilter
-
- org.opencms.db.CmsSubscriptionFilter
-
public class CmsSubscriptionFilter extends CmsVisitedByFilter
Provides filters for getting resources subscribed by a user or group in a specified time range.- Since:
- 8.0
-
-
Constructor Summary
Constructors Constructor Description CmsSubscriptionFilter()
Constructor, without parameters.CmsSubscriptionFilter(CmsObject cms)
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGroup(CmsGroup group)
Adds a group to the list of groups to check subscribed resources for.java.lang.Object
clone()
java.util.List<CmsGroup>
getGroups()
Returns the groups to check subscribed resources for.CmsSubscriptionReadMode
getMode()
Returns the mode to read subscribed resources.void
setGroups(java.util.List<CmsGroup> groups)
Sets the groups to check subscribed resources for.void
setMode(CmsSubscriptionReadMode mode)
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.java.lang.String
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 Detail
-
CmsSubscriptionFilter
public CmsSubscriptionFilter()
Constructor, without parameters.It is required to set the user or group manually if using this constructor.
-
CmsSubscriptionFilter
public CmsSubscriptionFilter(CmsObject cms)
Constructor, setting the user to the current user from the context.- Parameters:
cms
- the current users context
-
CmsSubscriptionFilter
public CmsSubscriptionFilter(CmsObject cms, boolean addUserGroups)
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 Detail
-
addGroup
public void addGroup(CmsGroup group)
Adds a group to the list of groups to check subscribed resources for.- Parameters:
group
- the group to add
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classCmsVisitedByFilter
- See Also:
Object.clone()
-
getGroups
public java.util.List<CmsGroup> getGroups()
Returns the groups to check subscribed resources for.- Returns:
- the groups to check subscribed resources for
-
getMode
public CmsSubscriptionReadMode getMode()
Returns the mode to read subscribed resources.- Returns:
- the mode to read subscribed resources
-
setGroups
public void setGroups(java.util.List<CmsGroup> groups)
Sets the groups to check subscribed resources for.- Parameters:
groups
- the groups to check subscribed resources for
-
setMode
public void setMode(CmsSubscriptionReadMode mode)
Sets the mode to read subscribed resources.- Parameters:
mode
- the mode to read subscribed resources
-
setUserGroups
public 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.- Parameters:
cms
- the current users context
-
toString
public java.lang.String toString()
Returns a user readable representation of the filter.- Overrides:
toString
in classCmsVisitedByFilter
- See Also:
Object.toString()
-
-