Class Event
java.lang.Object
org.opencastproject.elasticsearch.index.objects.event.Event
- All Implemented Interfaces:
IndexObject
Object wrapper for a recording event.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe document typestatic final StringThe name of the surrounding XML tag to wrap a result of multiple eventsFields inherited from interface org.opencastproject.elasticsearch.index.objects.IndexObject
INDEX_XML_NAMESPACE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomments()Returns the event comments.static javax.xml.bind.UnmarshallerCreate an unmarshaller for eventsReturns the access policyReturns the agent configurationReturns the agent idReturns the archive versionReturns the recording contributors.Returns the creation dateReturns the creatorReturns the recording description.Return the displayable status of this eventReturns the recording durationReturns the event statusReturns the extended metadataReturns the recording event identifier.Returns the languageReturns the licenseReturns the recording location.Returns the name of the managed ACL, if the event does not have a custom ACL.Returns the organization of the recording.Returns the recording presenters.Returns the event publications.Returns the publisherReturns the recording end dateReturns the start dateReturns the recording statusReturns the rightsReturns the series identifierReturns the series nameReturns the source of this eventReturns the recording subject.Returns the technical end timeReturns the technical presentersReturns the technical start timegetTitle()Returns the recording title.Returns the current workflow definition id related to this eventReturns the current workflow id related to this eventReturns the current workflow state related to this eventbooleanReturns the has comments status from this eventbooleanReturns the has comments status from this eventbooleanReturns the has preview status from this eventbooleanCheck whether the recording of the event already has started.booleanbooleanReturns the has comment needs cutting for this eventvoidRemoves all external metadata.voidsetAccessPolicy(String accessPolicy) Sets the access policyvoidsetAgentConfiguration(Map<String, String> agentConfigurations) Sets the agent configurationvoidsetAgentId(String agentId) Sets the agent idvoidsetArchiveVersion(Long archiveVersion) Sets the archive versionvoidsetComments(List<Comment> comments) Sets the list of comments.voidsetContributors(List<String> contributors) Sets the list of contributors.voidsetCreated(String created) Sets the creation datevoidsetCreator(String creator) Sets the creatorvoidsetDescription(String description) Sets the recording description.voidsetDuration(long duration) Sets the recording durationvoidSets the external metadata for a catalog flavor.voidsetHasComments(boolean hasComments) Sets the has comments status from this eventvoidsetHasOpenComments(boolean hasOpenComments) Sets the has open comments status from this eventvoidsetHasPreview(boolean hasPreview) Sets the has preview status from this eventvoidsetLanguage(String language) Sets the languagevoidsetLicense(String license) Sets the licensevoidsetLocation(String location) Sets the recording location.voidsetManagedAcl(String managedAcl) Sets the name of the managed ACL used by the event.voidsetNeedsCutting(boolean needsCutting) Sets the has open needs cutting comment for this eventvoidsetPresenters(List<String> presenters) Sets the list of presenters.voidsetPublications(List<Publication> publications) Sets the list of publications.voidsetPublisher(String publisher) Sets the publishervoidsetRecordingEndDate(String recordingEndTime) Sets the recording end datevoidsetRecordingStartDate(String recordingStartTime) Sets the start datevoidsetRecordingStatus(String recordingStatus) Sets the recording statusvoidSets the rightsvoidsetSeriesId(String seriesId) Sets the series identifiervoidsetSeriesName(String seriesName) Sets the series namevoidSets the source of this eventvoidsetSubject(String subject) Sets the recording subjectvoidsetTechnicalEndTime(String technicalEndTime) Sets the technical end timevoidsetTechnicalPresenters(List<String> technicalPresenters) Sets the technical presentersvoidsetTechnicalStartTime(String technicalStartTime) Sets the technical start timevoidSets the recording title.voidsetWorkflowDefinitionId(String workflowDefinitionId) Sets the current workflow definition id related to this eventvoidsetWorkflowId(Long workflowId) Sets the current workflow id related to this eventvoidsetWorkflowState(WorkflowInstance.WorkflowState workflowState) Sets the current workflow state related to this eventtoJSON()Serializes the recording event.toXML()Serializes the recording event to an XML format.voidupdatePreview(String previewSubtype) Sets the subtype of the publication element that indicates a preview element.static EventvalueOf(InputStream xml, javax.xml.bind.Unmarshaller unmarshaller) Reads the recording event from the input stream.static EventvalueOfJson(InputStream json) Reads the recording event from the input stream.
-
Field Details
-
DOCUMENT_TYPE
The document type- See Also:
-
XML_SURROUNDING_TAG
The name of the surrounding XML tag to wrap a result of multiple events- See Also:
-
-
Constructor Details
-
Event
public Event()Required default no arg constructor for JAXB. -
Event
The recording identifier.- Parameters:
identifier- the object identifierorganization- the organization
-
-
Method Details
-
getIdentifier
Returns the recording event identifier.- Returns:
- the identifier
-
getOrganization
Returns the organization of the recording.- Returns:
- the organization
-
setTitle
Sets the recording title.- Parameters:
title- the title
-
getTitle
Returns the recording title.- Returns:
- the title
-
setDescription
Sets the recording description.- Parameters:
description- the description
-
getDescription
Returns the recording description.- Returns:
- the description
-
setSubject
Sets the recording subject- Parameters:
subject- the subject to set
-
getSubject
Returns the recording subject.- Returns:
- the subject
-
setLocation
Sets the recording location.- Parameters:
location- the location
-
getLocation
Returns the recording location.- Returns:
- the location
-
setSeriesId
Sets the series identifier- Parameters:
seriesId- the series identifier
-
getSeriesId
Returns the series identifier- Returns:
- the series identifier
-
setSeriesName
Sets the series name- Parameters:
seriesName- the series name
-
getSeriesName
Returns the series name- Returns:
- the series name
-
setLanguage
Sets the language- Parameters:
language- the language
-
getLanguage
Returns the language- Returns:
- the language
-
setSource
Sets the source of this event- Parameters:
source- the source
-
getSource
Returns the source of this event- Returns:
- the source
-
setCreated
Sets the creation date- Parameters:
created- the creation date
-
getCreated
Returns the creation date- Returns:
- the creation date
-
setCreator
Sets the creator- Parameters:
creator- the language
-
getCreator
Returns the creator- Returns:
- the language
-
setPublisher
Sets the publisher- Parameters:
publisher- the publisher
-
getPublisher
Returns the publisher- Returns:
- the publisher
-
setLicense
Sets the license- Parameters:
license- the language
-
getLicense
Returns the license- Returns:
- the license
-
setRights
Sets the rights- Parameters:
rights- the rights
-
getRights
Returns the rights- Returns:
- the rights
-
setAccessPolicy
Sets the access policy- Parameters:
accessPolicy- the access policy
-
getAccessPolicy
Returns the access policy- Returns:
- the access policy
-
setManagedAcl
Sets the name of the managed ACL used by the event.- Parameters:
managedAcl- the managed ACL name
-
getManagedAcl
Returns the name of the managed ACL, if the event does not have a custom ACL.- Returns:
- the managed ACL name
-
setWorkflowState
Sets the current workflow state related to this event- Parameters:
workflowState- the current workflow state
-
getWorkflowState
Returns the current workflow state related to this event- Returns:
- the workflow state
-
setWorkflowId
Sets the current workflow id related to this event- Parameters:
workflowId- the current workflow id
-
getWorkflowId
Returns the current workflow id related to this event- Returns:
- the workflow id
-
setWorkflowDefinitionId
Sets the current workflow definition id related to this event- Parameters:
workflowDefinitionId- the current workflow definition id
-
getWorkflowDefinitionId
Returns the current workflow definition id related to this event- Returns:
- the workflow definition id
-
setRecordingStartDate
Sets the start date- Parameters:
recordingStartTime- the start date
-
getRecordingStartDate
Returns the start date- Returns:
- the start date
-
setRecordingEndDate
Sets the recording end date- Parameters:
recordingEndTime- the end date
-
getRecordingEndDate
Returns the recording end date- Returns:
- the end date
-
setDuration
public void setDuration(long duration) Sets the recording duration- Parameters:
duration- the recording duration
-
getDuration
Returns the recording duration- Returns:
- the recording duration
-
setPresenters
Sets the list of presenters.- Parameters:
presenters- the presenters for this event
-
getPresenters
Returns the recording presenters.- Returns:
- the presenters
-
setContributors
Sets the list of contributors.- Parameters:
contributors- the contributors for this event
-
getContributors
Returns the recording contributors.- Returns:
- the contributors
-
setHasComments
public void setHasComments(boolean hasComments) Sets the has comments status from this event- Parameters:
hasComments- the has comments status from this event
-
hasComments
public boolean hasComments()Returns the has comments status from this event- Returns:
- the has comments status from this event
-
setHasOpenComments
public void setHasOpenComments(boolean hasOpenComments) Sets the has open comments status from this event- Parameters:
hasOpenComments- the has open comments status from this event
-
hasOpenComments
public boolean hasOpenComments()Returns the has comments status from this event- Returns:
- the has comments status from this event
-
setComments
Sets the list of comments.- Parameters:
comments- the comments for this event
-
comments
Returns the event comments.- Returns:
- the comments
-
setHasPreview
public void setHasPreview(boolean hasPreview) Sets the has preview status from this event- Parameters:
hasPreview- the has preview status from this event
-
hasPreview
public boolean hasPreview()Returns the has preview status from this event- Returns:
- the has preview status from this event
-
updatePreview
Sets the subtype of the publication element that indicates a preview element.- Parameters:
previewSubtype- the subtype
-
setNeedsCutting
public void setNeedsCutting(boolean needsCutting) Sets the has open needs cutting comment for this event- Parameters:
needsCutting- this event has the open comments status that it needs cutting
-
needsCutting
public boolean needsCutting()Returns the has comment needs cutting for this event- Returns:
- the event has the comments status that it needs cutting
-
setPublications
Sets the list of publications.- Parameters:
publications- the publications for this event
-
getPublications
Returns the event publications.- Returns:
- the publications
-
setArchiveVersion
Sets the archive version- Parameters:
archiveVersion- the archive version
-
getArchiveVersion
Returns the archive version- Returns:
- the archive version
-
getDisplayableStatus
Return the displayable status of this event- Parameters:
customWorkflowStatusMapping- The mappings used to get the displayable status for the workflow state.- Returns:
- the displayable status of this event
-
isScheduledEvent
public boolean isScheduledEvent() -
hasRecordingStarted
public boolean hasRecordingStarted()Check whether the recording of the event already has started. Always returns false for uploaded events.- Returns:
trueif recording of this event has started, andfalseotherwise
-
setRecordingStatus
Sets the recording status- Parameters:
recordingStatus- the recording status
-
getRecordingStatus
Returns the recording status- Returns:
- the recording status
-
getEventStatus
Returns the event status- Returns:
- the event status
-
getAgentId
Returns the agent id- Returns:
- the agent id
-
setAgentId
Sets the agent id- Parameters:
agentId- the agent id
-
getAgentConfiguration
Returns the agent configuration- Returns:
- the agent configuration
-
setAgentConfiguration
Sets the agent configuration- Parameters:
agentConfigurations- the agent configuration
-
getTechnicalEndTime
Returns the technical end time- Returns:
- the technical end time
-
setTechnicalEndTime
Sets the technical end time- Parameters:
technicalEndTime- the technical end time
-
getTechnicalStartTime
Returns the technical start time- Returns:
- the technical start time
-
setTechnicalStartTime
Sets the technical start time- Parameters:
technicalStartTime- the technical start time
-
getTechnicalPresenters
Returns the technical presenters- Returns:
- the technical presenters
-
setTechnicalPresenters
Sets the technical presenters- Parameters:
technicalPresenters- the technical presenters
-
setExtendedMetadata
Sets the external metadata for a catalog flavor.- Parameters:
type- The catalog typemetadata- The metadata
-
resetExtendedMetadata
public void resetExtendedMetadata()Removes all external metadata. -
getExtendedMetadata
Returns the extended metadata- Returns:
- the extended metadata in a map by catalog type
-
valueOf
public static Event valueOf(InputStream xml, javax.xml.bind.Unmarshaller unmarshaller) throws IOException Reads the recording event from the input stream.- Parameters:
xml- the input streamunmarshaller- the unmarshaller to use- Returns:
- the deserialized recording event
- Throws:
IOException
-
valueOfJson
public static Event valueOfJson(InputStream json) throws IOException, org.codehaus.jettison.json.JSONException, XMLStreamException, javax.xml.bind.JAXBException Reads the recording event from the input stream.- Parameters:
json- the input stream- Returns:
- the deserialized recording event
- Throws:
org.codehaus.jettison.json.JSONExceptionXMLStreamExceptionjavax.xml.bind.JAXBExceptionIOException
-
toJSON
Serializes the recording event.- Returns:
- the serialized recording event
-
toXML
Serializes the recording event to an XML format.- Returns:
- A String with this event's content as XML.
-
createUnmarshaller
Create an unmarshaller for events- Returns:
- an unmarshaller for events
- Throws:
IOException
-