Package de.espirit.firstspirit.event
Class UrlEvent
java.lang.Object
de.espirit.firstspirit.event.UrlEvent
- All Implemented Interfaces:
Serializable
An event that is fired when a stored URL is changed. Use the
EventBusAgent
to register a listener.- Since:
- 5.2.230801
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Allows for distinguishing different event types. -
Field Summary
Modifier and TypeFieldDescriptionstatic final BusIdentifier<UrlEvent>
Use this identifier to register a listener for this event. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getGid()
The GID of the node if one exists.@NotNull String
The abbreviation of theLanguage
.long
The id of the node (e.g.Contains the old URL if available.Returns the page suffix string of the correspondingPageParams
, if available.long
The id of theProject
in which the changed node is stored.The uid of theResolution
.The type of the store the node belongs to.The id of theTemplateSet
.@NotNull UrlEvent.Type
getType()
Identifies theUrlEvent.Type
of the event.getUrl()
Contains the new URL.int
hashCode()
toString()
-
Field Details
-
BUS_IDENTIFIER
Use this identifier to register a listener for this event.- Since:
- 5.2.230801
- See Also:
-
-
Constructor Details
-
UrlEvent
public UrlEvent()
-
-
Method Details
-
getType
Identifies theUrlEvent.Type
of the event.- Returns:
- the event type, never
null
. - Since:
- 5.2.230801
-
getProjectId
public long getProjectId()The id of theProject
in which the changed node is stored.- Returns:
- the id of the project in which the changed node is stored.
- Since:
- 5.2.230801
- See Also:
-
getNodeId
public long getNodeId()The id of the node (e.g.PageRef
) for which the URL is changed.- Returns:
- the id of the node for which the URL is changed.
- Since:
- 5.2.230801
- See Also:
-
getGid
The GID of the node if one exists.- Returns:
- the GID of the node. May be empty if the GID does not exist (yet).
- Since:
- 5.2.230801
-
getStoreType
The type of the store the node belongs to.- Returns:
- the type of the store the node belongs to, never
null
. - Since:
- 5.2.230801
-
getTemplateSetId
The id of theTemplateSet
. May be empty if the node is aMedia
. -
getPageParamsSuffix
Returns the page suffix string of the correspondingPageParams
, if available.- Returns:
- the page suffix or an empty
Optional
if not available. - Since:
- 5.2.240204
- See Also:
-
getResolutionUid
The uid of theResolution
. May be empty of the node is not aMedia
. -
getLanguageAbbreviation
The abbreviation of theLanguage
.- Returns:
- the language abbreviation, never
null
. - Since:
- 5.2.230801
-
getUrl
Contains the new URL. This will be empty ifUrlEvent.Type
isUrlEvent.Type.RESET
.- Returns:
- the new URL or an empty
Optional
. - Since:
- 5.2.230801
-
getOldUrl
Contains the old URL if available.- Returns:
- the old URL or an empty
Optional
. - Since:
- 5.2.230801
-
equals
-
hashCode
public int hashCode() -
toString
-