Class AuthorityLocations

java.lang.Object
nl.vpro.domain.media.AuthorityLocations

public class AuthorityLocations extends Object
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
  • 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

      public Program addVideoLocation(@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)
    • updatePredictionStates

      public static boolean updatePredictionStates(MediaObject object, Instant now)
      After locations are added or removed, this may have effect on the state of the prediction records
    • updatePredictionStates

      public static boolean updatePredictionStates(MediaObject mediaObject, Platform platform, Instant now)
    • getBytesize

      public static OptionalLong getBytesize(String locationUrl)
      Executes a HEAD request to determine the bytes size of given URL. For mp3's and such.
      Since:
      7.7