Package nl.vpro.domain.media
Class AuthorityLocations
java.lang.Object
nl.vpro.domain.media.AuthorityLocations
Utilities related to poms 'authoritative 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
Modifier and TypeClassDescriptionstatic class
static enum
These are the relevant 'stream types' that are relevant for POMS. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddVideoLocation
(@NonNull Program program, @NonNull Platform platform, Encryption encryption, @NonNull String pubOptie, nl.vpro.domain.media.support.OwnerType owner, @NonNull Set<nl.vpro.domain.media.support.OwnerType> replaces) static OptionalLong
getBytesize
(String locationUrl) Executes a HEAD request to determine the bytes size of given URL.realizeStreamingPlatformIfNeeded
(@NonNull MediaObject mediaObject, @NonNull Platform platform) This will be called per platform if an NEP notify is received.void
removeLocationForPlatformIfNeeded
(@NonNull 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
@Inject public AuthorityLocations(@Value("${authority.locations.audioTemplate:https://entry.cdn.npoaudio.nl/handle/%s.mp3}") String audioTemplate)
-
-
Method Details
-
realizeStreamingPlatformIfNeeded
public AuthorityLocations.RealizeResult realizeStreamingPlatformIfNeeded(@NonNull MediaObject mediaObject, @NonNull Platform platform) This will be called per platform if an NEP notify is received. -
removeLocationForPlatformIfNeeded
public void removeLocationForPlatformIfNeeded(@NonNull MediaObject mediaObject, Platform platform, Predicate<Location> locationPredicate, Instant now) -
addVideoLocation
-
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) -
getBytesize
Executes a HEAD request to determine the bytes size of given URL. For mp3's and such.- Since:
- 7.7
-