|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface I_CmsSubscriptionDriver
The interface for drivers handling subscriptions and user tracking.
Field Summary | |
---|---|
static int |
DRIVER_TYPE_ID
The type ID to identify subscription driver implementations. |
Method Summary | |
---|---|
void |
deleteVisits(CmsDbContext dbc,
String poolName,
CmsVisitEntryFilter filter)
Deletes visit entries matching the given filter. |
long |
getDateLastVisitedBy(CmsDbContext dbc,
String poolName,
CmsUser user,
CmsResource resource)
Returns the date when the resource was last visited by the user. |
CmsSqlManager |
getSqlManager()
Returns the SQL manager of this driver, if possible. |
CmsSqlManager |
initSqlManager(String classname)
Initializes the SQL manager for this driver. |
void |
markResourceAsVisitedBy(CmsDbContext dbc,
String poolName,
CmsResource resource,
CmsUser user)
Mark the given resource as visited by the user. |
List<CmsResource> |
readAllSubscribedResources(CmsDbContext dbc,
String poolName,
CmsPrincipal principal)
Returns all resources subscribed by the given user or group. |
List<CmsResource> |
readResourcesVisitedBy(CmsDbContext dbc,
String poolName,
CmsVisitedByFilter filter)
Returns the resources that were visited by a user set in the filter. |
List<I_CmsHistoryResource> |
readSubscribedDeletedResources(CmsDbContext dbc,
String poolName,
CmsUser user,
List<CmsGroup> groups,
CmsResource parent,
boolean includeSubFolders,
long deletedFrom)
Returns the subscribed history resources that were deleted. |
List<CmsResource> |
readSubscribedResources(CmsDbContext dbc,
String poolName,
CmsSubscriptionFilter filter)
Returns the resources that were subscribed by a user or group set in the filter. |
void |
setSubscribedResourceAsDeleted(CmsDbContext dbc,
String poolName,
CmsResource resource)
Marks a subscribed resource as deleted. |
void |
subscribeResourceFor(CmsDbContext dbc,
String poolName,
CmsPrincipal principal,
CmsResource resource)
Subscribes the user or group to the resource. |
void |
unsubscribeAllDeletedResources(CmsDbContext dbc,
String poolName,
long deletedTo)
Unsubscribes all deleted resources that were deleted before the specified time stamp. |
void |
unsubscribeAllResourcesFor(CmsDbContext dbc,
String poolName,
CmsPrincipal principal)
Unsubscribes the principal from all resources. |
void |
unsubscribeResourceFor(CmsDbContext dbc,
String poolName,
CmsPrincipal principal,
CmsResource resource)
Unsubscribes the principal from the resource. |
void |
unsubscribeResourceForAll(CmsDbContext dbc,
String poolName,
CmsResource resource)
Unsubscribes all groups and users from the resource. |
Field Detail |
---|
static final int DRIVER_TYPE_ID
Method Detail |
---|
void deleteVisits(CmsDbContext dbc, String poolName, CmsVisitEntryFilter filter) throws CmsDataAccessException
dbc
- the database contextpoolName
- the name of the database pool to use, if null
, the default pool is usedfilter
- the log entry filter
CmsDataAccessException
- if something goes wronglong getDateLastVisitedBy(CmsDbContext dbc, String poolName, CmsUser user, CmsResource resource) throws CmsException
dbc
- the database contextpoolName
- the name of the database pool to useuser
- the user to check the dateresource
- the resource to check the date
CmsException
- if something goes wrongCmsSqlManager getSqlManager()
CmsSqlManager initSqlManager(String classname)
To obtain JDBC connections from different pools, further {online|offline|history} pool Urls have to be specified.
classname
- the classname of the SQL manager
void markResourceAsVisitedBy(CmsDbContext dbc, String poolName, CmsResource resource, CmsUser user) throws CmsDataAccessException
dbc
- the database contextpoolName
- the name of the database pool to useresource
- the resource to mark as visiteduser
- the user that visited the resource
CmsDataAccessException
- if something goes wrongList<CmsResource> readAllSubscribedResources(CmsDbContext dbc, String poolName, CmsPrincipal principal) throws CmsDataAccessException
dbc
- the database contextpoolName
- the name of the database pool to useprincipal
- the principal to read the subscribed resources
CmsDataAccessException
- if something goes wrongList<CmsResource> readResourcesVisitedBy(CmsDbContext dbc, String poolName, CmsVisitedByFilter filter) throws CmsDataAccessException
dbc
- the database contextpoolName
- the name of the database pool to usefilter
- the filter that is used to get the visited resources
CmsDataAccessException
- if something goes wrongList<I_CmsHistoryResource> readSubscribedDeletedResources(CmsDbContext dbc, String poolName, CmsUser user, List<CmsGroup> groups, CmsResource parent, boolean includeSubFolders, long deletedFrom) throws CmsDataAccessException
dbc
- the database contextpoolName
- the name of the database pool to useuser
- the user that subscribed to the resourcegroups
- the groups to check subscribed resources forparent
- the parent resource (folder) of the deleted resources, if null
all deleted resources will be returnedincludeSubFolders
- indicates if the sub folders of the specified folder path should be considered, toodeletedFrom
- the time stamp from which the resources should have been deleted
CmsDataAccessException
- if something goes wrongList<CmsResource> readSubscribedResources(CmsDbContext dbc, String poolName, CmsSubscriptionFilter filter) throws CmsDataAccessException
dbc
- the database contextpoolName
- the name of the database pool to usefilter
- the filter that is used to get the subscribed resources
CmsDataAccessException
- if something goes wrongvoid setSubscribedResourceAsDeleted(CmsDbContext dbc, String poolName, CmsResource resource) throws CmsDataAccessException
dbc
- the database contextpoolName
- the name of the database pool to useresource
- the subscribed resource to mark as deleted
CmsDataAccessException
- if something goes wrongvoid subscribeResourceFor(CmsDbContext dbc, String poolName, CmsPrincipal principal, CmsResource resource) throws CmsDataAccessException
dbc
- the database contextpoolName
- the name of the database pool to useprincipal
- the principal that subscribes to the resourceresource
- the resource to subscribe to
CmsDataAccessException
- if something goes wrongvoid unsubscribeAllDeletedResources(CmsDbContext dbc, String poolName, long deletedTo) throws CmsDataAccessException
dbc
- the database contextpoolName
- the name of the database pool to usedeletedTo
- the time stamp to which the resources have been deleted
CmsDataAccessException
- if something goes wrongvoid unsubscribeAllResourcesFor(CmsDbContext dbc, String poolName, CmsPrincipal principal) throws CmsDataAccessException
dbc
- the database contextpoolName
- the name of the database pool to useprincipal
- the principal that unsubscribes from all resources
CmsDataAccessException
- if something goes wrongvoid unsubscribeResourceFor(CmsDbContext dbc, String poolName, CmsPrincipal principal, CmsResource resource) throws CmsDataAccessException
dbc
- the database contextpoolName
- the name of the database pool to useprincipal
- the principal that unsubscribes from the resourceresource
- the resource to unsubscribe from
CmsDataAccessException
- if something goes wrongvoid unsubscribeResourceForAll(CmsDbContext dbc, String poolName, CmsResource resource) throws CmsDataAccessException
dbc
- the database contextpoolName
- the name of the database pool to useresource
- the resource to unsubscribe all groups and users from
CmsDataAccessException
- if something goes wrong
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |