Class AssemblageConfig

java.lang.Object
nl.vpro.domain.media.update.AssemblageConfig

public class AssemblageConfig extends Object
Contains hints and configuration about how to assemble media objects from MediaUpdate objects.
Since:
5.5
Author:
Michiel Meeuwissen
  • Field Details

  • Constructor Details

  • Method Details

    • getOwnerAndSimilar

      public Set<nl.vpro.domain.media.support.OwnerType> getOwnerAndSimilar()
    • loggerFor

      public nl.vpro.logging.simple.SimpleLogger loggerFor(Logger log)
    • loggerFor

      public nl.vpro.logging.simple.SimpleLogger loggerFor(Logger log)
    • copy

      public AssemblageConfig copy()
    • withLogger

      public AssemblageConfig withLogger(nl.vpro.logging.simple.SimpleLogger logger)
    • withThreadLocalLogger

      public AssemblageConfig withThreadLocalLogger()
    • isMemberOfUpdate

      public boolean isMemberOfUpdate()
    • getMemberOfUpdatePredicate

      public Predicate<MemberRef> getMemberOfUpdatePredicate()
    • withAllTrue

      public static AssemblageConfig.Builder withAllTrue()
      Sets updating as permissive as possible, with a few exceptions:
      • relations: only sync relations of the broadcasters associated with the account (this is also the default)
      • memberrefs
    • considerForDeletion

      public boolean considerForDeletion(Segment segment)
    • backwardsCompatible

      public void backwardsCompatible(IntegerVersion version)
      Makes the default assemblage backwards compatible for certain properties (unless they were explicitly stated).
    • setMemberOfUpdateBoolean

      public void setMemberOfUpdateBoolean(boolean bool)
    • isCopyPredictions

      public boolean isCopyPredictions()
    • isCopyTwitterRefs

      public boolean isCopyTwitterRefs()
    • isCopyLanguageAndCountry

      public boolean isCopyLanguageAndCountry()
    • builder

      public static @NonNull AssemblageConfig.Builder builder()
    • toBuilder

      public @NonNull AssemblageConfig.Builder toBuilder()
    • getOwner

      public nl.vpro.domain.media.support.OwnerType getOwner()
    • getSimilarOwnerTypes

      public List<nl.vpro.domain.media.support.OwnerType> getSimilarOwnerTypes()
    • isCopyWorkflow

      public boolean isCopyWorkflow()
    • getCopyLanguageAndCountry

      public Boolean getCopyLanguageAndCountry()
    • isImageMetaData

      public boolean isImageMetaData()
    • getCopyPredictions

      public Boolean getCopyPredictions()
    • getAuthority

      public Authority getAuthority()
    • isEpisodeOfUpdate

      public boolean isEpisodeOfUpdate()
    • isGuessEpisodePosition

      public boolean isGuessEpisodePosition()
    • getMemberOfUpdate

      public BiPredicate<MemberRef,AssemblageConfig> getMemberOfUpdate()
    • isRatingsUpdate

      public boolean isRatingsUpdate()
    • getCopyTwitterRefs

      public Boolean getCopyTwitterRefs()
    • isCopyIntentions

      public boolean isCopyIntentions()
    • isCopyTargetGroups

      public boolean isCopyTargetGroups()
    • isCopyGeoLocations

      public boolean isCopyGeoLocations()
    • isCopyTopics

      public boolean isCopyTopics()
    • getRelations

      public BiPredicate<List<String>,Relation> getRelations()
    • isCreateScheduleEvents

      public boolean isCreateScheduleEvents()
    • getDeleteIfNoScheduleEventsLeft

      public Predicate<Program> getDeleteIfNoScheduleEventsLeft()
    • getMergeScheduleEvents

      public Duration getMergeScheduleEvents()
      This is mainly targeted at PREPR which does not support programs spanning 0 o'clock. If this is set to >= 0, then schedule merging will merge adjacent schedule events if they are of the same MID The size of the duration defines the maximal gap between the events. (For PREPR there is never anything broadcast in the second before midnight)
    • getInferDurationFromScheduleEvents

      public BiPredicate<MediaObject,AssemblageConfig> getInferDurationFromScheduleEvents()
    • isLocationsUpdate

      public boolean isLocationsUpdate()
    • getStealMids

      public AssemblageConfig.Steal getStealMids()
    • getStealCrids

      public org.meeuw.functional.TriPredicate<MediaObject,MediaObject,String> getStealCrids()
      Matching happens on crid. There is a possibility though that the found object is of the wrong type (e.g. a Program and not a Segment) If stealCrids is true, then in that situation the existing object is left, but the matching crid is removed.
    • getStealSegments

      public AssemblageConfig.Steal getStealSegments()
      If an incoming segment matches a segment of _different_ program, then disconnect it from that other program Otherwise consider this situation errorneous.
    • getSegmentsForDeletion

      public BiPredicate<Segment,AssemblageConfig> getSegmentsForDeletion()
      On default, if you merge a program, existing segments will not be removed This can be configured using this. See als AssemblageConfig.Builder.deleteSegmentsForOwner()
    • getCridsForDelete

      public Predicate<String> getCridsForDelete()
    • getUpdateType

      public AssemblageConfig.Steal getUpdateType()
    • isFollowMerges

      public boolean isFollowMerges()
      TODO
      Since:
      5.13
    • getRequireIncomingMid

      public AssemblageConfig.MidRequire getRequireIncomingMid()
      Since:
      5.13
    • getMarkForDeleteOnly

      public BiPredicate<MediaObject,PublishableObject<?>> getMarkForDeleteOnly()
    • getDeleteBroadcasters

      public Predicate<MediaObject> getDeleteBroadcasters()
    • getLogger

      public nl.vpro.logging.simple.SimpleLogger getLogger()
    • setOwner

      public void setOwner(nl.vpro.domain.media.support.OwnerType owner)
    • setSimilarOwnerTypes

      public void setSimilarOwnerTypes(List<nl.vpro.domain.media.support.OwnerType> similarOwnerTypes)
    • setCopyWorkflow

      public void setCopyWorkflow(boolean copyWorkflow)
    • setCopyLanguageAndCountry

      public void setCopyLanguageAndCountry(Boolean copyLanguageAndCountry)
    • setImageMetaData

      public void setImageMetaData(boolean imageMetaData)
    • setCopyPredictions

      public void setCopyPredictions(Boolean copyPredictions)
    • setAuthority

      public void setAuthority(Authority authority)
    • setEpisodeOfUpdate

      public void setEpisodeOfUpdate(boolean episodeOfUpdate)
    • setGuessEpisodePosition

      public void setGuessEpisodePosition(boolean guessEpisodePosition)
    • setMemberOfUpdate

      public void setMemberOfUpdate(BiPredicate<MemberRef,AssemblageConfig> memberOfUpdate)
    • setRatingsUpdate

      public void setRatingsUpdate(boolean ratingsUpdate)
    • setCopyTwitterRefs

      public void setCopyTwitterRefs(Boolean copyTwitterRefs)
    • setCopyIntentions

      public void setCopyIntentions(boolean copyIntentions)
    • setCopyTargetGroups

      public void setCopyTargetGroups(boolean copyTargetGroups)
    • setCopyGeoLocations

      public void setCopyGeoLocations(boolean copyGeoLocations)
    • setCopyTopics

      public void setCopyTopics(boolean copyTopics)
    • setRelations

      public void setRelations(BiPredicate<List<String>,Relation> relations)
    • setCreateScheduleEvents

      public void setCreateScheduleEvents(boolean createScheduleEvents)
    • setDeleteIfNoScheduleEventsLeft

      public void setDeleteIfNoScheduleEventsLeft(Predicate<Program> deleteIfNoScheduleEventsLeft)
    • setMergeScheduleEvents

      public void setMergeScheduleEvents(Duration mergeScheduleEvents)
      This is mainly targeted at PREPR which does not support programs spanning 0 o'clock. If this is set to >= 0, then schedule merging will merge adjacent schedule events if they are of the same MID The size of the duration defines the maximal gap between the events. (For PREPR there is never anything broadcast in the second before midnight)
    • setInferDurationFromScheduleEvents

      public void setInferDurationFromScheduleEvents(BiPredicate<MediaObject,AssemblageConfig> inferDurationFromScheduleEvents)
    • setLocationsUpdate

      public void setLocationsUpdate(boolean locationsUpdate)
    • setStealMids

      public void setStealMids(AssemblageConfig.Steal stealMids)
    • setStealCrids

      public void setStealCrids(org.meeuw.functional.TriPredicate<MediaObject,MediaObject,String> stealCrids)
      Matching happens on crid. There is a possibility though that the found object is of the wrong type (e.g. a Program and not a Segment) If stealCrids is true, then in that situation the existing object is left, but the matching crid is removed.
    • setStealSegments

      public void setStealSegments(AssemblageConfig.Steal stealSegments)
      If an incoming segment matches a segment of _different_ program, then disconnect it from that other program Otherwise consider this situation errorneous.
    • setSegmentsForDeletion

      public void setSegmentsForDeletion(BiPredicate<Segment,AssemblageConfig> segmentsForDeletion)
      On default, if you merge a program, existing segments will not be removed This can be configured using this. See als AssemblageConfig.Builder.deleteSegmentsForOwner()
    • setCridsForDelete

      public void setCridsForDelete(Predicate<String> cridsForDelete)
    • setUpdateType

      public void setUpdateType(AssemblageConfig.Steal updateType)
    • setFollowMerges

      public void setFollowMerges(boolean followMerges)
      TODO
      Since:
      5.13
    • setRequireIncomingMid

      public void setRequireIncomingMid(AssemblageConfig.MidRequire requireIncomingMid)
      Since:
      5.13
    • setMarkForDeleteOnly

      public void setMarkForDeleteOnly(BiPredicate<MediaObject,PublishableObject<?>> markForDeleteOnly)
    • setDeleteBroadcasters

      public void setDeleteBroadcasters(Predicate<MediaObject> deleteBroadcasters)
    • setLogger

      public void setLogger(nl.vpro.logging.simple.SimpleLogger logger)
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(@Nullable Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public @NonNull String toString()
      Overrides:
      toString in class Object