org.opencms.db
Class CmsLogToPublishListChangeConverter

java.lang.Object
  extended by org.opencms.db.CmsLogToPublishListChangeConverter

public class CmsLogToPublishListChangeConverter
extends java.lang.Object

This class can be used to convert a series of log entry objects to a set of changes which should be applied to the user publish list.


Constructor Summary
CmsLogToPublishListChangeConverter()
           
 
Method Summary
 void add(CmsLogEntry entry)
          Feeds a log entry to the converter.
 java.util.List<CmsUserPublishListEntry> filterEntries(org.opencms.db.CmsLogToPublishListChangeConverter.Action action)
          Gets all CmsUserPublishListEntry values from the internal state map whose action matches the parameter given.
 java.util.List<CmsUserPublishListEntry> getPublishListAdditions()
          Gets the list of publish list entries which should be updated in the database.
 java.util.List<CmsUserPublishListEntry> getPublishListDeletions()
          Gets the list of user publish list entries to delete.
protected  boolean isChanging(CmsLogEntry entry)
          Checks whether the given log entry should update an entry in the publish list.
protected  boolean isDeleting(CmsLogEntry entry)
          Checks whether the given log entry should remove an entry from the publish list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsLogToPublishListChangeConverter

public CmsLogToPublishListChangeConverter()
Method Detail

add

public void add(CmsLogEntry entry)
Feeds a log entry to the converter.

Parameters:
entry - the log entry to process

isDeleting

protected boolean isDeleting(CmsLogEntry entry)
Checks whether the given log entry should remove an entry from the publish list.

Parameters:
entry - the log entry
Returns:
true if the corresponding publish list entry should be removed

isChanging

protected boolean isChanging(CmsLogEntry entry)
Checks whether the given log entry should update an entry in the publish list.

Parameters:
entry - the log entry
Returns:
true if the corresponding publish list entry should be removed

getPublishListAdditions

public java.util.List<CmsUserPublishListEntry> getPublishListAdditions()
Gets the list of publish list entries which should be updated in the database.

Returns:
the list of publish list entries to update

filterEntries

public java.util.List<CmsUserPublishListEntry> filterEntries(org.opencms.db.CmsLogToPublishListChangeConverter.Action action)
Gets all CmsUserPublishListEntry values from the internal state map whose action matches the parameter given.

Parameters:
action - an action constant
Returns:
all CmsUserPublishListEntry values from the internal state map whose action matches the parameter given

getPublishListDeletions

public java.util.List<CmsUserPublishListEntry> getPublishListDeletions()
Gets the list of user publish list entries to delete.

In the objects returned, only the structure id and user id fields are meaningful.

Returns:
the list of user publish list entries to delete