Package org.opencms.db.userpublishlist
Class CmsPublishListResourceState
- java.lang.Object
-
- org.opencms.db.userpublishlist.CmsPublishListResourceState
-
public class CmsPublishListResourceState extends java.lang.Object
Keeps track of publish list changes for a single resource.
-
-
Constructor Summary
Constructors Constructor Description CmsPublishListResourceState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRemove(CmsUUID userId)
Adds a removal from the publish list for the given user id.void
addUpdate(CmsUUID userId, long timestamp)
Adds an update for the publish list for the given user id.java.util.List<CmsUUID>
getRemoveUsers()
Gets the users from whose publish list the resource should be removed.long
getTimestamp(CmsUUID userId)
Gets the log timestamp for the given user id.java.util.List<CmsUUID>
getUpdateUsers()
Gets the users to whose publish list the resource should be addedboolean
isRemoveAll()
Returns true if the structure id should be removed for all users.void
setRemoveAll()
Sets the 'remove all' status to 'true'.
-
-
-
Constructor Detail
-
CmsPublishListResourceState
public CmsPublishListResourceState()
-
-
Method Detail
-
addRemove
public void addRemove(CmsUUID userId)
Adds a removal from the publish list for the given user id.- Parameters:
userId
- a user id
-
addUpdate
public void addUpdate(CmsUUID userId, long timestamp)
Adds an update for the publish list for the given user id.- Parameters:
userId
- a user idtimestamp
- the change timestamp
-
getRemoveUsers
public java.util.List<CmsUUID> getRemoveUsers()
Gets the users from whose publish list the resource should be removed.- Returns:
- list of user ids
-
getTimestamp
public long getTimestamp(CmsUUID userId)
Gets the log timestamp for the given user id.- Parameters:
userId
- the user id- Returns:
- the timestamp for the change with the given user id
-
getUpdateUsers
public java.util.List<CmsUUID> getUpdateUsers()
Gets the users to whose publish list the resource should be added- Returns:
- list of user ids
-
isRemoveAll
public boolean isRemoveAll()
Returns true if the structure id should be removed for all users.- Returns:
- true if resource should be removed from all publish lists
-
setRemoveAll
public void setRemoveAll()
Sets the 'remove all' status to 'true'.All collected changes/removals done before this will be discarded. Changes/removals done after this will not clear the removeAll status.
-
-