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 Summary
Modifier and TypeFieldDescriptionstatic final AliasUpdate
Empty update that does not alter or remove any aliases. -
Method Summary
Modifier and TypeMethodDescriptiongetAdded()
Returns aliases added in this update.Returns language code of aliases in this update.Returns the new list of aliases that completely replaces current aliases.Returns aliases removed in this update.boolean
isEmpty()
Checks whether the update is empty.
-
Field Details
-
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
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
Optional<List<MonolingualTextValue>> 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
List<MonolingualTextValue> getAdded()Returns aliases added in this update. If there are any added aliases, thengetRecreated()
must returnOptional.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, thengetRecreated()
must returnOptional.empty()
. It is however possible to add and remove aliases in the same update.- Returns:
- removed aliases
-