public interface I_CmsSubscriptionDriver
限定符和类型 | 字段和说明 |
---|---|
static int |
DRIVER_TYPE_ID
The type ID to identify subscription driver implementations.
|
限定符和类型 | 方法和说明 |
---|---|
void |
deleteVisits(CmsDbContext dbc,
java.lang.String poolName,
CmsVisitEntryFilter filter)
Deletes visit entries matching the given filter.
|
long |
getDateLastVisitedBy(CmsDbContext dbc,
java.lang.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(java.lang.String classname)
Initializes the SQL manager for this driver.
|
void |
markResourceAsVisitedBy(CmsDbContext dbc,
java.lang.String poolName,
CmsResource resource,
CmsUser user)
Mark the given resource as visited by the user.
|
java.util.List<CmsResource> |
readAllSubscribedResources(CmsDbContext dbc,
java.lang.String poolName,
CmsPrincipal principal)
Returns all resources subscribed by the given user or group.
|
java.util.List<CmsResource> |
readResourcesVisitedBy(CmsDbContext dbc,
java.lang.String poolName,
CmsVisitedByFilter filter)
Returns the resources that were visited by a user set in the filter.
|
java.util.List<I_CmsHistoryResource> |
readSubscribedDeletedResources(CmsDbContext dbc,
java.lang.String poolName,
CmsUser user,
java.util.List<CmsGroup> groups,
CmsResource parent,
boolean includeSubFolders,
long deletedFrom)
Returns the subscribed history resources that were deleted.
|
java.util.List<CmsResource> |
readSubscribedResources(CmsDbContext dbc,
java.lang.String poolName,
CmsSubscriptionFilter filter)
Returns the resources that were subscribed by a user or group set in the filter.
|
void |
setSubscribedResourceAsDeleted(CmsDbContext dbc,
java.lang.String poolName,
CmsResource resource)
Marks a subscribed resource as deleted.
|
void |
subscribeResourceFor(CmsDbContext dbc,
java.lang.String poolName,
CmsPrincipal principal,
CmsResource resource)
Subscribes the user or group to the resource.
|
void |
unsubscribeAllDeletedResources(CmsDbContext dbc,
java.lang.String poolName,
long deletedTo)
Unsubscribes all deleted resources that were deleted before the specified time stamp.
|
void |
unsubscribeAllResourcesFor(CmsDbContext dbc,
java.lang.String poolName,
CmsPrincipal principal)
Unsubscribes the principal from all resources.
|
void |
unsubscribeResourceFor(CmsDbContext dbc,
java.lang.String poolName,
CmsPrincipal principal,
CmsResource resource)
Unsubscribes the principal from the resource.
|
void |
unsubscribeResourceForAll(CmsDbContext dbc,
java.lang.String poolName,
CmsResource resource)
Unsubscribes all groups and users from the resource.
|
static final int DRIVER_TYPE_ID
void deleteVisits(CmsDbContext dbc, java.lang.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 filterCmsDataAccessException
- if something goes wronglong getDateLastVisitedBy(CmsDbContext dbc, java.lang.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 dateCmsException
- if something goes wrongCmsSqlManager getSqlManager()
CmsSqlManager initSqlManager(java.lang.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 managervoid markResourceAsVisitedBy(CmsDbContext dbc, java.lang.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 resourceCmsDataAccessException
- if something goes wrongjava.util.List<CmsResource> readAllSubscribedResources(CmsDbContext dbc, java.lang.String poolName, CmsPrincipal principal) throws CmsDataAccessException
dbc
- the database contextpoolName
- the name of the database pool to useprincipal
- the principal to read the subscribed resourcesCmsDataAccessException
- if something goes wrongjava.util.List<CmsResource> readResourcesVisitedBy(CmsDbContext dbc, java.lang.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 resourcesCmsDataAccessException
- if something goes wrongjava.util.List<I_CmsHistoryResource> readSubscribedDeletedResources(CmsDbContext dbc, java.lang.String poolName, CmsUser user, java.util.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 deletedCmsDataAccessException
- if something goes wrongjava.util.List<CmsResource> readSubscribedResources(CmsDbContext dbc, java.lang.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 resourcesCmsDataAccessException
- if something goes wrongvoid setSubscribedResourceAsDeleted(CmsDbContext dbc, java.lang.String poolName, CmsResource resource) throws CmsDataAccessException
dbc
- the database contextpoolName
- the name of the database pool to useresource
- the subscribed resource to mark as deletedCmsDataAccessException
- if something goes wrongvoid subscribeResourceFor(CmsDbContext dbc, java.lang.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 toCmsDataAccessException
- if something goes wrongvoid unsubscribeAllDeletedResources(CmsDbContext dbc, java.lang.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 deletedCmsDataAccessException
- if something goes wrongvoid unsubscribeAllResourcesFor(CmsDbContext dbc, java.lang.String poolName, CmsPrincipal principal) throws CmsDataAccessException
dbc
- the database contextpoolName
- the name of the database pool to useprincipal
- the principal that unsubscribes from all resourcesCmsDataAccessException
- if something goes wrongvoid unsubscribeResourceFor(CmsDbContext dbc, java.lang.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 fromCmsDataAccessException
- if something goes wrongvoid unsubscribeResourceForAll(CmsDbContext dbc, java.lang.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 fromCmsDataAccessException
- if something goes wrong