public abstract class AttachmentEvent extends ContentEvent
source
Modifier | Constructor and Description |
---|---|
protected |
AttachmentEvent(Object src,
Attachment attachment)
Convenience method.
|
protected |
AttachmentEvent(Object src,
Attachment attachment,
boolean suppressNotifications)
Convenience method.
|
protected |
AttachmentEvent(Object src,
List<Attachment> attachments)
Convenience method.
|
protected |
AttachmentEvent(Object src,
List<Attachment> attachments,
boolean suppressNotifications)
Constructs a multi-attachment event.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(@Nullable Object o)
Equals for ConfluenceEvents is defined such that specific sub-events are only equal to events of the same type.
|
@NonNull ContentEntityObject |
getAttachedTo() |
Attachment |
getAttachment()
Returns the real content (the first attachment of the list or null if there is none)
|
@NonNull List<Attachment> |
getAttachments() |
@NonNull ContentEntityObject |
getContent() |
int |
hashCode()
Subclasses must override this to hash their own fields.
|
isSuppressNotifications, setSuppressNotifications
getSource, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getTimestamp
protected AttachmentEvent(Object src, List<Attachment> attachments, boolean suppressNotifications)
src
- the object publishing the eventattachments
- the list of attachments that this event is aboutsuppressNotifications
- whether or not to trigger notifications (e.g. emails to users watching the page)protected AttachmentEvent(Object src, List<Attachment> attachments)
new AttachmentEvent(src, attachments, false)
protected AttachmentEvent(Object src, Attachment attachment)
new AttachmentEvent(src, Collections.singletonList(attachment), false)
protected AttachmentEvent(Object src, Attachment attachment, boolean suppressNotifications)
new AttachmentEvent(src, Collections.singletonList(attachment), suppressNotifications)
public @NonNull ContentEntityObject getContent()
public @NonNull ContentEntityObject getAttachedTo()
public Attachment getAttachment()
getAttachments()
public @NonNull List<Attachment> getAttachments()
public boolean equals(@Nullable Object o)
ConfluenceEvent
Subclasses must override this to compare their own fields.
equals
in class ContentEvent
o
- the object to compare.Event.equals(Object)
public int hashCode()
ConfluenceEvent
hashCode
in class ContentEvent
Event.hashCode()
Copyright © 2003–2020 Atlassian. All rights reserved.