Package org.opencms.db.userpublishlist
Class A_CmsLogPublishListConverter
java.lang.Object
org.opencms.db.userpublishlist.A_CmsLogPublishListConverter
- Direct Known Subclasses:
CmsLogPublishListConverterAllUsers
,CmsLogPublishListConverterCurrentUser
Abstract base class used for converting from CmsLogEntry instances to the necessary changes in the user's publish list.
Multiple log entries can be added via the add() method, and then all changes to the database are performed when the writeToDatabase() method is called.
-
Field Summary
Modifier and TypeFieldDescriptionprotected Map<CmsUUID,
CmsPublishListResourceState> Map from structure ids to publish list state objects. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
add
(CmsLogEntry entry) Processes a log entry.Gets the state entry for the given structure id, creating it if it doesn't already exist.void
writeChangesToDatabase
(CmsDbContext dbc, I_CmsProjectDriver projectDriver) Writes the collected changes to the database.
-
Field Details
-
m_entries
Map from structure ids to publish list state objects.
-
-
Constructor Details
-
A_CmsLogPublishListConverter
public A_CmsLogPublishListConverter()
-
-
Method Details
-
add
Processes a log entry.- Parameters:
entry
- the entry to process
-
getEntry
Gets the state entry for the given structure id, creating it if it doesn't already exist.- Parameters:
key
- the structure id of a resource- Returns:
- the state object for the structure id
-
writeChangesToDatabase
public void writeChangesToDatabase(CmsDbContext dbc, I_CmsProjectDriver projectDriver) throws CmsDataAccessException Writes the collected changes to the database.- Parameters:
dbc
- the database contextprojectDriver
- the project driver- Throws:
CmsDataAccessException
- if something goes wrong
-