Interface AliasUpdate

All Known Implementing Classes:
AliasUpdateImpl

public interface AliasUpdate
Collection of changes made to entity aliases. This class represents changes in single language only. Alias update consists either of added (see getAdded()) and removed (see getRemoved()) aliases or a new list of aliases that completely replace old aliases (see getRecreated()).
  • Field Details

    • EMPTY

      static final AliasUpdate EMPTY
      Empty update that does not alter or remove any aliases.
  • Method Details

    • isEmpty

      boolean isEmpty()
      Checks whether the update is empty. Empty update will not alter alias list in any way.
      Returns:
      true if the update is empty, false otherwise
    • getLanguageCode

      Optional<String> getLanguageCode()
      Returns language code of aliases in this update. Language code is only available for non-empty updates.
      Returns:
      alias language code or Optional.empty() when the update is empty
    • getRecreated

      Returns the new list of aliases that completely replaces current aliases. If this list is present, then the update contains no added/removed aliases.
      Returns:
      new list of aliases or Optional.empty() if aliases are not being recreated
    • getAdded

      Returns aliases added in this update. If there are any added aliases, then getRecreated() must return Optional.empty(). It is however possible to add and remove aliases in the same update.
      Returns:
      added aliases
    • getRemoved

      Set<MonolingualTextValue> getRemoved()
      Returns aliases removed in this update. If there are any removed aliases, then getRecreated() must return Optional.empty(). It is however possible to add and remove aliases in the same update.
      Returns:
      removed aliases