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()
PreContentEventGets the PreContentEvent.Type of the event
getType in interface PreContentEventpublic Optional<org.springframework.core.io.Resource> getResource()
PreContentEventThe 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 PreContentEventpublic Optional<ContentMetadata> getContentMetadata()
getContentMetadata in interface PreContentEventpublic Optional<ContentReference> getContentReference()
PreContentEventThe content reference for the event.
It is only present when the PreContentEvent.Type is PreContentEvent.Type.DELETE.
getContentReference in interface PreContentEventpublic ContentScope getContentScope()
PreContentEventGets the content scope from the content involved in the event.
getContentScope in interface PreContentEventpublic ContentManager getContentManager()
PreContentEventGets the content manager that triggered the event.
getContentManager in interface PreContentEventpublic static DefaultPreContentEvent.Builder builder()
Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.