Class SchedulingUtils.SchedulingInfo
java.lang.Object
org.opencastproject.external.util.SchedulingUtils.SchedulingInfo
- Enclosing class:
SchedulingUtils
-
Constructor Summary
ConstructorsConstructorDescriptionCopy the given SchedulingInfo object. -
Method Summary
Modifier and TypeMethodDescriptioncom.entwinemedia.fn.data.Opt<String> com.entwinemedia.fn.data.Opt<Long> com.entwinemedia.fn.data.Opt<Date> com.entwinemedia.fn.data.Opt<String> com.entwinemedia.fn.data.Opt<net.fortuna.ical4j.model.property.RRule> getRrule()com.entwinemedia.fn.data.Opt<Date> merge(org.opencastproject.scheduler.api.TechnicalMetadata metadata) Creates a new SchedulingInfo of this instance which uses start date, end date, and agent id form the givenTechnicalMetadataif they are not present in this instance.Get the SchedulingInfo for the given event id.of(org.json.simple.JSONObject json) Parse the given json and create a new SchedulingInfo.voidsetAgentId(com.entwinemedia.fn.data.Opt<String> agentId) voidsetDuration(com.entwinemedia.fn.data.Opt<Long> duration) voidsetEndDate(com.entwinemedia.fn.data.Opt<Date> endDate) voidvoidsetRrule(com.entwinemedia.fn.data.Opt<net.fortuna.ical4j.model.property.RRule> rrule) voidsetStartDate(com.entwinemedia.fn.data.Opt<Date> startDate) com.entwinemedia.fn.data.json.JObjecttoJson()org.json.simple.JSONObjecttoSource()
-
Constructor Details
-
SchedulingInfo
public SchedulingInfo() -
SchedulingInfo
Copy the given SchedulingInfo object.- Parameters:
other- The SchedulingInfo object to copy.
-
-
Method Details
-
getStartDate
-
setStartDate
-
getEndDate
-
setEndDate
-
getDuration
-
setDuration
-
getAgentId
-
setAgentId
-
getInputs
-
setInputs
-
getRrule
public com.entwinemedia.fn.data.Opt<net.fortuna.ical4j.model.property.RRule> getRrule() -
setRrule
public void setRrule(com.entwinemedia.fn.data.Opt<net.fortuna.ical4j.model.property.RRule> rrule) -
toJson
public com.entwinemedia.fn.data.json.JObject toJson()- Returns:
- A JSON representation of this ScheudlingInfo object.
-
toSource
public org.json.simple.JSONObject toSource()- Returns:
- A JSON source representation of this SchedulingInfo as needed by the IndexService to create an event.
-
merge
public SchedulingUtils.SchedulingInfo merge(org.opencastproject.scheduler.api.TechnicalMetadata metadata) Creates a new SchedulingInfo of this instance which uses start date, end date, and agent id form the givenTechnicalMetadataif they are not present in this instance.- Parameters:
metadata- TheTechnicalMetadataof which to use start date, end date, and agent id in case they are missing.- Returns:
- The new SchedulingInfo with start date, end date, and agent id set.
-
of
Parse the given json and create a new SchedulingInfo.- Parameters:
json- The JSONObject to parse.- Returns:
- The SchedulingInfo instance represented by the given JSON.
-
of
public static SchedulingUtils.SchedulingInfo of(String eventId, org.opencastproject.scheduler.api.SchedulerService schedulerService) throws org.opencastproject.security.api.UnauthorizedException, org.opencastproject.scheduler.api.SchedulerException Get the SchedulingInfo for the given event id.- Parameters:
eventId- The id of the event to get the SchedulingInfo for.schedulerService- TheSchedulerServiceto query for the event id.- Returns:
- The SchedulingInfo for the given event id.
- Throws:
org.opencastproject.security.api.UnauthorizedException- If theSchedulerServicecannot be queried due to missing authorization.org.opencastproject.scheduler.api.SchedulerException- In case internal errors occur within theSchedulerService.
-