Class UrlEvent

java.lang.Object
de.espirit.firstspirit.event.UrlEvent
All Implemented Interfaces:
Serializable

public final class UrlEvent extends Object implements 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:
  • Field Details

  • Constructor Details

    • UrlEvent

      public UrlEvent()
  • Method Details

    • getType

      @NotNull public @NotNull UrlEvent.Type getType()
      Identifies the UrlEvent.Type of the event.
      Returns:
      the event type, never null.
      Since:
      5.2.230801
    • getProjectId

      public long getProjectId()
      The id of the Project 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

      public Optional<UUID> 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

      @NotNull public Store.Type 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

      public Optional<Long> getTemplateSetId()
      The id of the TemplateSet. May be empty if the node is a Media.
      Returns:
      the template set id or an empty Optional if the node is a Media.
      Since:
      5.2.230801
    • getPageParamsSuffix

      public Optional<String> getPageParamsSuffix()
      Returns the page suffix string of the corresponding PageParams, if available.
      Returns:
      the page suffix or an empty Optional if not available.
      Since:
      5.2.240204
      See Also:
    • getResolutionUid

      public Optional<String> getResolutionUid()
      The uid of the Resolution. May be empty of the node is not a Media.
      Returns:
      the resolution uid or an empty Optional if the node is not a Media.
      Since:
      5.2.230801
    • getLanguageAbbreviation

      @NotNull public @NotNull String getLanguageAbbreviation()
      The abbreviation of the Language.
      Returns:
      the language abbreviation, never null.
      Since:
      5.2.230801
    • getUrl

      public Optional<String> getUrl()
      Contains the new URL. This will be empty if UrlEvent.Type is UrlEvent.Type.RESET.
      Returns:
      the new URL or an empty Optional.
      Since:
      5.2.230801
    • getOldUrl

      public Optional<String> getOldUrl()
      Contains the old URL if available.
      Returns:
      the old URL or an empty Optional.
      Since:
      5.2.230801
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object