Package nl.vpro.domain
Interface TextualObjectUpdate<T extends TypedText,D extends TypedText,TO extends TextualObjectUpdate<T,D,TO>>
- Type Parameters:
T
- The type of 'titles' in this object.D
- The type of 'descriptions'.TO
- The type ofself()
which is returned by several setters, so they can easily be chained
- All Known Subinterfaces:
LocalizedObject<T,
,D, WS, TR, TO> Media<T>
,TextualObject<T,
D, TO>
- All Known Implementing Classes:
AbstractTextualObject
,AbstractTextualObjectUpdate
,BasicTextualObject
,BasicTextualUpdate
,Group
,GroupUpdate
,MediaObject
,MediaObjectTranslation
,MediaUpdate
,Program
,ProgramUpdate
,ScheduleEvent
,ScheduleEventUpdate
,Segment
,SegmentUpdate
public interface TextualObjectUpdate<T extends TypedText,D extends TypedText,TO extends TextualObjectUpdate<T,D,TO>>
An object that has titles and descriptions, which are typed, but not necessary owned (unlike
TextualObject
).
This means that the object generally is used to update 'TextualObjects', since the user updating is associated with only one OwnerType
.- Since:
- 5.3
- Author:
- Michiel Meeuwissen
-
Method Summary
Modifier and TypeMethodDescriptiondefault TO
addDescription
(@Nullable String description, @NonNull TextualType type) default TO
addDescription
(D description) default TO
addTitle
(String title, @NonNull TextualType type) default TO
default D
findDescription
(@NonNull TextualType type) default T
findTitle
(@NonNull TextualType type) default String
default Locale
Describes in which language the contained text objects are.default String
Return the 'lexicographic title'.default String
Returns the description with textual type 'LONG' if there is one.default String
Returns the first available description.default String
default String
default String
default String
default String
default String
Retrieves the first sub- or episode title.How to create an instance of a title.default String
default boolean
Default implementation based ongetDescriptions()
, you may want to override this, if getDescriptions may modify the object (it is e.g.default boolean
Default implementation based ongetTitles()
, you may want to override this, if getTitles may modify the object (it is e.g.default boolean
removeDescription
(D description) default boolean
removeDescription
(TextualType type) default boolean
removeTitle
(T title) default TO
self()
default TO
setDescription
(@Nullable Supplier<String> up, @NonNull TextualType type) Updates a description with aSupplier
, if at least the given supplier is not null.default void
setDescription
(String description, @NonNull TextualType type) Sets description if already set, otherwiseaddDescription(String, TextualType)
void
setDescriptions
(SortedSet<D> descriptions) default void
setLongDescription
(String description) default void
setMainDescription
(String description) default void
setMainTitle
(String title) default TO
setTitle
(@Nullable Supplier<String> up, @NonNull TextualType type) Updates a title with aSupplier
, if at least the given supplier is not null.default void
setTitle
(String title, @NonNull TextualType type) Sets title if already set, otherwiseaddTitle(String, TextualType)
void
-
Method Details
-
getLanguage
Describes in which language the contained text objects are. This defaults toLocales.DUTCH
. -
getTitleCreator
BiFunction<String,TextualType, getTitleCreator()T> How to create an instance of a title. This makes a lot of default methods possible.- Since:
- 5.5
-
addTitle
-
setTitle
Sets title if already set, otherwiseaddTitle(String, TextualType)
- Since:
- 5.11
-
setTitle
Updates a title with aSupplier
, if at least the given supplier is not null. -
getTitles
-
setTitles
-
hasTitles
default boolean hasTitles()Default implementation based ongetTitles()
, you may want to override this, if getTitles may modify the object (it is e.g. required by jaxb that this will never returnnull
-
addTitle
-
removeTitle
-
self
-
findTitle
-
getMainTitle
-
setMainTitle
-
getSubTitle
Retrieves the first sub- or episode title. MIS distributes episode titles. For internal use this episode title is handled as a subtitle.- Returns:
- - the first subtitle
-
getShortTitle
-
getOriginalTitle
-
getWorkTitle
-
getLexicoTitle
Return the 'lexicographic title'. This is the title where the object normally would be sorted on. This defaults togetMainTitle()
if no explicit value was set. If an explicit value is set, it may e.g. be the same asgetMainTitle()
but with leading articles ommitted. -
getAbbreviatedTitle
- Since:
- 2.1
-
setDescription
Sets description if already set, otherwiseaddDescription(String, TextualType)
- Since:
- 5.11
-
setDescription
Updates a description with aSupplier
, if at least the given supplier is not null. -
getDescriptionCreator
BiFunction<String,TextualType, getDescriptionCreator()D> - Since:
- 5.5
-
addDescription
-
getDescriptions
-
setDescriptions
-
hasDescriptions
default boolean hasDescriptions()Default implementation based ongetDescriptions()
, you may want to override this, if getDescriptions may modify the object (it is e.g. required by hibernate that this will never returnnull
-
addDescription
-
removeDescription
-
removeDescription
-
findDescription
-
getMainDescription
Returns the first available description. Probably the 'MAIN' description. -
setMainDescription
-
getLongDescription
Returns the description with textual type 'LONG' if there is one. Otherwise, returnsgetMainDescription()
-
setLongDescription
-
getSubDescription
-
getShortDescription
-