Package nl.vpro.domain.media
Class Prediction
java.lang.Object
nl.vpro.domain.media.Prediction
- All Implemented Interfaces:
Serializable
,Comparable<Prediction>
,Child<MediaObject>
,Embargo
,Updatable<Prediction>
,MutableEmbargo<Prediction>
@Entity
public class Prediction
extends Object
implements Comparable<Prediction>, Updatable<Prediction>, Serializable, MutableEmbargo<Prediction>, Child<MediaObject>
A prediction is related to a program and indicates that locations (for a certain platform) will be available, and nowadays also whether it is or was available.
Also, it contains information about the embargo restrictions for that platform.
There may be an encryption
associated. If set then the prediction will only be valid for the platform and that given prediction. If not set, normally both encrypted and non-encrypted locations will be present.
- Since:
- 1.6
- Author:
- Michiel Meeuwissen
- See Also:
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected Encryption
protected @NotNull Instant
protected MediaObject
protected @NotNull Platform
protected Instant
protected Instant
protected @NotNull Prediction.State
-
Constructor Summary
ConstructorDescriptionPrediction
(String platform) Constructor needed for jackson unmarshallingPrediction
(Platform platform) Prediction
(Platform platform, Instant publishStart, Instant publishStop) Prediction
(Platform platform, Prediction.State state) -
Method Summary
Modifier and TypeMethodDescriptionstatic Prediction.Builder
static @NonNull Prediction.Builder
builder()
int
compareTo
(@NonNull Prediction o) static Prediction
copy
(Prediction source, Authority authority) static Prediction
copy
(Prediction source, MediaObject parent) Copied a prediction to a new parent, with authorityAuthority.USER
boolean
boolean
fieldEquals
(Prediction prediction) getState()
int
hashCode()
protected void
boolean
isDRM()
// See MSE-3992boolean
isNew()
boolean
TODO The state is 'ANNOUNCED', so shouldn't we name this field 'announcedAvailability'?static Prediction.Builder
realized()
static Prediction.Builder
revoked()
void
setAuthority
(Authority authority) void
setEncryption
(Encryption encryption) void
setIssueDate
(Instant issueDate) void
setParent
(MediaObject mo) void
setPlannedAvailability
(boolean plannedAvailability) void
setPlatform
(Platform platform) @NonNull Prediction
setPublishStartInstant
(Instant start) @NonNull Prediction
setPublishStopInstant
(Instant publishStop) void
setState
(Prediction.State state) toString()
static Prediction
unavailable
(MediaObject parent, Platform platform, Authority authority) void
update
(Prediction from) Copies all fields from argumentstatic Prediction
virtual
(MediaObject parent, Platform platform, Authority authority) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface nl.vpro.domain.Embargo
asRange, inPublicationWindow, inPublicationWindow, isPublishable, isUnderEmbargo, isUnderEmbargo, wasUnderEmbargo, wasUnderEmbargo, willBePublished, willBePublished, willBeUnderEmbargo, willBeUnderEmbargo
Methods inherited from interface nl.vpro.domain.MutableEmbargo
set
-
Field Details
-
issueDate
-
state
-
publishStart
-
publishStop
-
platform
-
mediaObject
-
encryption
-
-
Constructor Details
-
Prediction
public Prediction() -
Prediction
Constructor needed for jackson unmarshalling -
Prediction
-
Prediction
-
Prediction
-
-
Method Details
-
copy
-
copy
Copied a prediction to a new parent, with authorityAuthority.USER
-
virtual
-
announced
-
revoked
-
realized
-
setParent
- Specified by:
setParent
in interfaceChild<MediaObject>
-
getParent
- Specified by:
getParent
in interfaceChild<MediaObject>
-
isNew
public boolean isNew() -
getPublishStartInstant
- Specified by:
getPublishStartInstant
in interfaceEmbargo
-
setPublishStartInstant
- Specified by:
setPublishStartInstant
in interfaceMutableEmbargo<Prediction>
-
getPublishStopInstant
- Specified by:
getPublishStopInstant
in interfaceEmbargo
-
setPublishStopInstant
- Specified by:
setPublishStopInstant
in interfaceMutableEmbargo<Prediction>
-
setPlatform
-
setAuthority
-
setPlannedAvailability
public void setPlannedAvailability(boolean plannedAvailability) -
setEncryption
-
invalidateXml
protected void invalidateXml() -
compareTo
- Specified by:
compareTo
in interfaceComparable<Prediction>
-
equals
-
fieldEquals
-
hashCode
public int hashCode() -
update
Description copied from interface:Updatable
Copies all fields from argument- Specified by:
update
in interfaceUpdatable<Prediction>
-
isDRM
public boolean isDRM()// See MSE-3992 -
toString
-
builder
-
getIssueDate
-
setIssueDate
-
getState
-
setState
-
getPlatform
-
getAuthority
-
isPlannedAvailability
public boolean isPlannedAvailability()TODO The state is 'ANNOUNCED', so shouldn't we name this field 'announcedAvailability'?- Since:
- 5.6
-
getEncryption
-