public class DefaultPreContentEvent extends Object implements PreContentEvent
An container class that to be used in the ContentListener
implementations.
It holds the content resource involved in the content management operation as well as the
content metadata, the content scope and the content manager that triggered the event.
ContentManager
Modifier and Type | Class and Description |
---|---|
static class |
DefaultPreContentEvent.Builder |
PreContentEvent.Type
Modifier and Type | Method and Description |
---|---|
static DefaultPreContentEvent.Builder |
builder() |
boolean |
equals(Object o) |
ContentManager |
getContentManager()
Gets the content manager that triggered the event.
|
Optional<ContentMetadata> |
getContentMetadata() |
Optional<ContentReference> |
getContentReference()
The content reference for the event.
|
ContentScope |
getContentScope()
Gets the content scope from the content involved in the event.
|
Optional<org.springframework.core.io.Resource> |
getResource()
The input stream of the event.
|
PreContentEvent.Type |
getType()
Gets the
PreContentEvent.Type of the event |
int |
hashCode() |
public PreContentEvent.Type getType()
PreContentEvent
Gets the PreContentEvent.Type
of the event
getType
in interface PreContentEvent
public Optional<org.springframework.core.io.Resource> getResource()
PreContentEvent
The input stream of the event.
When the PreContentEvent.Type
is PreContentEvent.Type.ADD
and PreContentEvent.Type.UPDATE
the input stream is always present.
<br />
<b>NB</b>: The input stream must not be closed and must be reset if it is consumed
getResource
in interface PreContentEvent
public Optional<ContentMetadata> getContentMetadata()
getContentMetadata
in interface PreContentEvent
public Optional<ContentReference> getContentReference()
PreContentEvent
The content reference for the event.
It is only present when the PreContentEvent.Type
is PreContentEvent.Type.DELETE
.
getContentReference
in interface PreContentEvent
public ContentScope getContentScope()
PreContentEvent
Gets the content scope from the content involved in the event.
getContentScope
in interface PreContentEvent
public ContentManager getContentManager()
PreContentEvent
Gets the content manager that triggered the event.
getContentManager
in interface PreContentEvent
public static DefaultPreContentEvent.Builder builder()
Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.