Class UserActivity
java.lang.Object
io.goobi.viewer.model.security.user.UserActivity
Represents a single recorded activity of a user, such as creating a comment, bookmark, search, or annotation.
Each instance captures the activity type, a human-readable label, the timestamp, and whether it is an update
to an existing item. Factory methods are provided for constructing instances from domain objects such as
Comment or Search.
- Author:
- Florian Alpers
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUserActivity(UserActivity.ActivityType type, String label, LocalDateTime date, boolean update) -
Method Summary
Modifier and TypeMethodDescriptionbooleanEquals if label and type are equal.getDate()static UserActivitygetFromBookmark(Bookmark bookmark) static UserActivitystatic UserActivitystatic UserActivitygetFromComment(Comment comment) static UserActivitygetFromCommentUpdate(Comment comment) static UserActivitygetFromSearch(Search search) getLabel()getType()inthashCode()Builds from label and type.booleanisUpdate()
-
Field Details
-
MAX_LABEL_LENGTH
public static final int MAX_LABEL_LENGTH- See Also:
-
LABEL_TRUNCATE_SUFFIX
- See Also:
-
-
Constructor Details
-
UserActivity
public UserActivity(UserActivity.ActivityType type, String label, LocalDateTime date, boolean update) - Parameters:
type- type of user activitylabel- display label describing the activitydate- date and time of the activityupdate- true if this represents an update to an existing item
-
-
Method Details
-
getFromComment
-
getFromCommentUpdate
-
getFromCampaignAnnotation
-
getFromCampaignAnnotationUpdate
-
getFromBookmark
-
getFromSearch
-
getType
-
getLabel
-
getDate
-
isUpdate
public boolean isUpdate() -
equals
Equals if label and type are equal. -
hashCode
public int hashCode()Builds from label and type.
-