org.opencms.db.mysql
Class CmsSubscriptionDriver

java.lang.Object
  extended by org.opencms.db.generic.CmsSubscriptionDriver
      extended by org.opencms.db.mysql.CmsSubscriptionDriver
All Implemented Interfaces:
I_CmsDriver, I_CmsSubscriptionDriver

public class CmsSubscriptionDriver
extends CmsSubscriptionDriver

MySQL implementation of the subscription driver.

Since:
8.0.0

Field Summary
 
Fields inherited from class org.opencms.db.generic.CmsSubscriptionDriver
m_driverManager, m_sqlManager
 
Fields inherited from interface org.opencms.db.I_CmsDriver
AND_CONDITION, BEGIN_CONDITION, BEGIN_EXCLUDE_CONDITION, BEGIN_INCLUDE_CONDITION, END_CONDITION, OR_CONDITION
 
Fields inherited from interface org.opencms.db.I_CmsSubscriptionDriver
DRIVER_TYPE_ID
 
Constructor Summary
CmsSubscriptionDriver()
           
 
Method Summary
 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.
 
Methods inherited from class org.opencms.db.generic.CmsSubscriptionDriver
addVisit, deleteVisits, getDateLastVisitedBy, getSqlManager, init, internalReadVisitEntry, prepareVisitConditions, readAllSubscribedResources, readResourcesVisitedBy, readSubscribedDeletedResources, readSubscribedResources, readVisits, setSubscribedResourceAsDeleted, subscribeResourceFor, unsubscribeAllDeletedResources, unsubscribeAllResourcesFor, unsubscribeResourceFor, unsubscribeResourceForAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opencms.db.I_CmsDriver
toString
 

Constructor Detail

CmsSubscriptionDriver

public CmsSubscriptionDriver()
Method Detail

initSqlManager

public CmsSqlManager initSqlManager(String classname)
Description copied from interface: I_CmsSubscriptionDriver
Initializes the SQL manager for this driver.

To obtain JDBC connections from different pools, further {online|offline|history} pool Urls have to be specified.

Specified by:
initSqlManager in interface I_CmsSubscriptionDriver
Overrides:
initSqlManager in class CmsSubscriptionDriver
Parameters:
classname - the classname of the SQL manager
Returns:
the SQL manager for this driver
See Also:
CmsSubscriptionDriver.initSqlManager(java.lang.String)

markResourceAsVisitedBy

public void markResourceAsVisitedBy(CmsDbContext dbc,
                                    String poolName,
                                    CmsResource resource,
                                    CmsUser user)
                             throws CmsDataAccessException
Description copied from interface: I_CmsSubscriptionDriver
Mark the given resource as visited by the user.

Specified by:
markResourceAsVisitedBy in interface I_CmsSubscriptionDriver
Overrides:
markResourceAsVisitedBy in class CmsSubscriptionDriver
Parameters:
dbc - the database context
poolName - the name of the database pool to use
resource - the resource to mark as visited
user - the user that visited the resource
Throws:
CmsDataAccessException - if something goes wrong
See Also:
CmsSubscriptionDriver.markResourceAsVisitedBy(org.opencms.db.CmsDbContext, java.lang.String, org.opencms.file.CmsResource, org.opencms.file.CmsUser)