Package nl.vpro.domain.media
Class AuthorityLocations
java.lang.Object
nl.vpro.domain.media.AuthorityLocations
Utilities related to poms 'authorative locations'. I.e.
locations
that are implicitly added (because of some notification from an external system, currently NEP), with owner
OwnerType.AUTHORITY
- Since:
- 5.7
- Author:
- Michiel Meeuwissen
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateWebOnlyPredictionIfNeeded
(MediaObject mediaObject) Creates a prediction because of a NEP notification.realize
(@NonNull Program program, @NonNull Platform platform, @NonNull String pubOptie, @NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull Set<nl.vpro.domain.media.support.OwnerType> replaces) This will be called if for a certain platform and 'puboptie' a 'notify' is received.realizeStreamingPlatformIfNeeded
(@NonNull MediaObject mediaObject, @NonNull AVType avType, @NonNull Platform platform, @NonNull Predicate<Location> locationPredicate, @NonNull Instant now) This will be called per platform if an NEP notify is received.void
removeLocationForPlatformIfNeeded
(MediaObject mediaObject, Platform platform, Predicate<Location> locationPredicate, Instant now) static boolean
updatePredictionStates
(MediaObject object, Instant now) After locations are added or removed, this may have effect on the state of theprediction records
static boolean
updatePredictionStates
(MediaObject mediaObject, Platform platform, Instant now)
-
Constructor Details
-
AuthorityLocations
public AuthorityLocations()
-
-
Method Details
-
realize
public Program realize(@NonNull Program program, @NonNull Platform platform, @NonNull String pubOptie, @NonNull nl.vpro.domain.media.support.OwnerType owner, @NonNull Set<nl.vpro.domain.media.support.OwnerType> replaces) This will be called if for a certain platform and 'puboptie' a 'notify' is received. E.g. a 'projecm' notify message would trigger this. TODO I think this is not used any more, we receive notification from NEP (which we assign 'pubOptie=nep') -
realizeStreamingPlatformIfNeeded
public AuthorityLocations.RealizeResult realizeStreamingPlatformIfNeeded(@NonNull MediaObject mediaObject, @NonNull AVType avType, @NonNull Platform platform, @NonNull Predicate<Location> locationPredicate, @NonNull Instant now) This will be called per platform if an NEP notify is received. -
removeLocationForPlatformIfNeeded
public void removeLocationForPlatformIfNeeded(MediaObject mediaObject, Platform platform, Predicate<Location> locationPredicate, Instant now) -
createWebOnlyPredictionIfNeeded
Creates a prediction because of a NEP notification.If a mediaobject has INTERNETVOD locations (which are not deleted) (which were not created because of NEP)
then we need to have INTERNETVOD prediction which can be set to 'REALIZED'.
This is not always the case, this method can correct that.
-
updatePredictionStates
After locations are added or removed, this may have effect on the state of theprediction records
-
updatePredictionStates
public static boolean updatePredictionStates(MediaObject mediaObject, Platform platform, Instant now)
-