Package nl.vpro.domain
Interface TextualObject<T extends OwnedText,D extends OwnedText,TO extends TextualObject<T,D,TO>>
- Type Parameters:
T
- The type of the titleD
- The type of the descriptionTO
- The type of the object itself
- All Superinterfaces:
TextualObjectUpdate<T,
D, TO>
- All Known Subinterfaces:
LocalizedObject<T,
,D, WS, TR, TO> Media<T>
- All Known Implementing Classes:
AbstractTextualObject
,BasicTextualObject
,Group
,MediaObject
,MediaObjectTranslation
,Program
,ScheduleEvent
,Segment
public interface TextualObject<T extends OwnedText,D extends OwnedText,TO extends TextualObject<T,D,TO>>
extends TextualObjectUpdate<T,D,TO>
Represents an object having owned and typed titles and descriptions.
- Since:
- 5.1
- Author:
- Michiel Meeuwissen
-
Field Summary
Modifier and TypeFieldDescriptionstatic final nl.vpro.domain.media.support.OwnerType
-
Method Summary
Modifier and TypeMethodDescriptiondefault TO
addDescription
(@Nullable String description, @NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) default TO
addDescription
(@Nullable String description, @NonNull TextualType type) default TO
addTitle
(@NonNull String title, @NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) default TO
addTitle
(@NonNull String title, @NonNull TextualType type) default D
findDescription
(@NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) default T
findTitle
(@NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) default BiFunction<String,
TextualType, D> org.meeuw.functional.TriFunction<String,
nl.vpro.domain.media.support.OwnerType, TextualType, D> org.meeuw.functional.TriFunction<String,
nl.vpro.domain.media.support.OwnerType, TextualType, T> default BiFunction<String,
TextualType, T> How to create an instance of a title.default boolean
removeDescription
(@NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) default TO
removeDescriptionsForOwner
(@NonNull nl.vpro.domain.media.support.OwnerType owner) default boolean
removeTitle
(@NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) default TO
removeTitlesForOwner
(@NonNull nl.vpro.domain.media.support.OwnerType owner) default void
setDescription
(@Nullable String description, @NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) default void
setTitle
(String title, @NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) Sets title if already set, otherwiseaddTitle(String, OwnerType owner, TextualType)
Methods inherited from interface nl.vpro.domain.TextualObjectUpdate
addDescription, addTitle, findDescription, findTitle, getAbbreviatedTitle, getDescriptions, getLanguage, getLexicoTitle, getLongDescription, getMainDescription, getMainTitle, getOriginalTitle, getShortDescription, getShortTitle, getSubDescription, getSubTitle, getTitles, getWorkTitle, hasDescriptions, hasTitles, removeDescription, removeDescription, removeTitle, self, setDescription, setDescription, setDescriptions, setLongDescription, setMainDescription, setMainTitle, setTitle, setTitle, setTitles
-
Field Details
-
DEFAULT_OWNER
static final nl.vpro.domain.media.support.OwnerType DEFAULT_OWNER
-
-
Method Details
-
getOwnedTitleCreator
org.meeuw.functional.TriFunction<String,nl.vpro.domain.media.support.OwnerType, getOwnedTitleCreator()TextualType, T> - Since:
- 5.5
-
getTitleCreator
Description copied from interface:TextualObjectUpdate
How to create an instance of a title. This makes a lot of default methods possible.- Specified by:
getTitleCreator
in interfaceTextualObjectUpdate<T extends OwnedText,
D extends OwnedText, TO extends TextualObject<T, D, TO>>
-
addTitle
default TO addTitle(@NonNull String title, @NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) -
setTitle
default void setTitle(String title, @NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) Sets title if already set, otherwiseaddTitle(String, OwnerType owner, TextualType)
- Since:
- 5.11
-
addTitle
-
removeTitle
default boolean removeTitle(@NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) -
removeTitlesForOwner
-
findTitle
default T findTitle(@NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) -
getDescriptionCreator
- Specified by:
getDescriptionCreator
in interfaceTextualObjectUpdate<T extends OwnedText,
D extends OwnedText, TO extends TextualObject<T, D, TO>>
-
getOwnedDescriptionCreator
org.meeuw.functional.TriFunction<String,nl.vpro.domain.media.support.OwnerType, getOwnedDescriptionCreator()TextualType, D> - Since:
- 5.5
-
addDescription
default TO addDescription(@Nullable String description, @NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) -
setDescription
default void setDescription(@Nullable String description, @NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) - Parameters:
description
- the new description to set for given owner/type. If empty or blank, the description will be removed- Since:
- 5.11
-
addDescription
- Specified by:
addDescription
in interfaceTextualObjectUpdate<T extends OwnedText,
D extends OwnedText, TO extends TextualObject<T, D, TO>>
-
removeDescription
default boolean removeDescription(@NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type) -
removeDescriptionsForOwner
-
findDescription
default D findDescription(@NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull TextualType type)
-