java.lang.Object
org.opencastproject.elasticsearch.index.objects.event.Event
All Implemented Interfaces:
IndexObject

public class Event extends Object implements IndexObject
Object wrapper for a recording event.
  • Field Details

    • DOCUMENT_TYPE

      public static final String DOCUMENT_TYPE
      The document type
      See Also:
    • XML_SURROUNDING_TAG

      public static final String 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

      public Event(String identifier, String organization)
      The recording identifier.
      Parameters:
      identifier - the object identifier
      organization - the organization
  • Method Details

    • getIdentifier

      public String getIdentifier()
      Returns the recording event identifier.
      Returns:
      the identifier
    • getOrganization

      public String getOrganization()
      Returns the organization of the recording.
      Returns:
      the organization
    • setTitle

      public void setTitle(String title)
      Sets the recording title.
      Parameters:
      title - the title
    • getTitle

      public String getTitle()
      Returns the recording title.
      Returns:
      the title
    • setDescription

      public void setDescription(String description)
      Sets the recording description.
      Parameters:
      description - the description
    • getDescription

      public String getDescription()
      Returns the recording description.
      Returns:
      the description
    • setSubject

      public void setSubject(String subject)
      Sets the recording subject
      Parameters:
      subject - the subject to set
    • getSubject

      public String getSubject()
      Returns the recording subject.
      Returns:
      the subject
    • setLocation

      public void setLocation(String location)
      Sets the recording location.
      Parameters:
      location - the location
    • getLocation

      public String getLocation()
      Returns the recording location.
      Returns:
      the location
    • setSeriesId

      public void setSeriesId(String seriesId)
      Sets the series identifier
      Parameters:
      seriesId - the series identifier
    • getSeriesId

      public String getSeriesId()
      Returns the series identifier
      Returns:
      the series identifier
    • setSeriesName

      public void setSeriesName(String seriesName)
      Sets the series name
      Parameters:
      seriesName - the series name
    • getSeriesName

      public String getSeriesName()
      Returns the series name
      Returns:
      the series name
    • setLanguage

      public void setLanguage(String language)
      Sets the language
      Parameters:
      language - the language
    • getLanguage

      public String getLanguage()
      Returns the language
      Returns:
      the language
    • setSource

      public void setSource(String source)
      Sets the source of this event
      Parameters:
      source - the source
    • getSource

      public String getSource()
      Returns the source of this event
      Returns:
      the source
    • setCreated

      public void setCreated(String created)
      Sets the creation date
      Parameters:
      created - the creation date
    • getCreated

      public String getCreated()
      Returns the creation date
      Returns:
      the creation date
    • setCreator

      public void setCreator(String creator)
      Sets the creator
      Parameters:
      creator - the language
    • getCreator

      public String getCreator()
      Returns the creator
      Returns:
      the language
    • setPublisher

      public void setPublisher(String publisher)
      Sets the publisher
      Parameters:
      publisher - the publisher
    • getPublisher

      public String getPublisher()
      Returns the publisher
      Returns:
      the publisher
    • setLicense

      public void setLicense(String license)
      Sets the license
      Parameters:
      license - the language
    • getLicense

      public String getLicense()
      Returns the license
      Returns:
      the license
    • setRights

      public void setRights(String rights)
      Sets the rights
      Parameters:
      rights - the rights
    • getRights

      public String getRights()
      Returns the rights
      Returns:
      the rights
    • setAccessPolicy

      public void setAccessPolicy(String accessPolicy)
      Sets the access policy
      Parameters:
      accessPolicy - the access policy
    • getAccessPolicy

      public String getAccessPolicy()
      Returns the access policy
      Returns:
      the access policy
    • setManagedAcl

      public void setManagedAcl(String managedAcl)
      Sets the name of the managed ACL used by the event.
      Parameters:
      managedAcl - the managed ACL name
    • getManagedAcl

      public String getManagedAcl()
      Returns the name of the managed ACL, if the event does not have a custom ACL.
      Returns:
      the managed ACL name
    • setWorkflowState

      public void setWorkflowState(WorkflowInstance.WorkflowState workflowState)
      Sets the current workflow state related to this event
      Parameters:
      workflowState - the current workflow state
    • getWorkflowState

      public String getWorkflowState()
      Returns the current workflow state related to this event
      Returns:
      the workflow state
    • setWorkflowId

      public void setWorkflowId(Long workflowId)
      Sets the current workflow id related to this event
      Parameters:
      workflowId - the current workflow id
    • getWorkflowId

      public Long getWorkflowId()
      Returns the current workflow id related to this event
      Returns:
      the workflow id
    • setWorkflowDefinitionId

      public void setWorkflowDefinitionId(String workflowDefinitionId)
      Sets the current workflow definition id related to this event
      Parameters:
      workflowDefinitionId - the current workflow definition id
    • getWorkflowDefinitionId

      public String getWorkflowDefinitionId()
      Returns the current workflow definition id related to this event
      Returns:
      the workflow definition id
    • setRecordingStartDate

      public void setRecordingStartDate(String recordingStartTime)
      Sets the start date
      Parameters:
      recordingStartTime - the start date
    • getRecordingStartDate

      public String getRecordingStartDate()
      Returns the start date
      Returns:
      the start date
    • setRecordingEndDate

      public void setRecordingEndDate(String recordingEndTime)
      Sets the recording end date
      Parameters:
      recordingEndTime - the end date
    • getRecordingEndDate

      public String 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

      public Long getDuration()
      Returns the recording duration
      Returns:
      the recording duration
    • setPresenters

      public void setPresenters(List<String> presenters)
      Sets the list of presenters.
      Parameters:
      presenters - the presenters for this event
    • getPresenters

      public List<String> getPresenters()
      Returns the recording presenters.
      Returns:
      the presenters
    • setContributors

      public void setContributors(List<String> contributors)
      Sets the list of contributors.
      Parameters:
      contributors - the contributors for this event
    • getContributors

      public List<String> 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

      public void setComments(List<Comment> comments)
      Sets the list of comments.
      Parameters:
      comments - the comments for this event
    • comments

      public List<Comment> 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

      public void updatePreview(String previewSubtype)
      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

      public void setPublications(List<Publication> publications)
      Sets the list of publications.
      Parameters:
      publications - the publications for this event
    • getPublications

      public List<Publication> getPublications()
      Returns the event publications.
      Returns:
      the publications
    • setArchiveVersion

      public void setArchiveVersion(Long archiveVersion)
      Sets the archive version
      Parameters:
      archiveVersion - the archive version
    • getArchiveVersion

      public Long getArchiveVersion()
      Returns the archive version
      Returns:
      the archive version
    • getDisplayableStatus

      public String getDisplayableStatus(Map<String,Map<String,String>> customWorkflowStatusMapping)
      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:
      true if recording of this event has started, and false otherwise
    • setRecordingStatus

      public void setRecordingStatus(String recordingStatus)
      Sets the recording status
      Parameters:
      recordingStatus - the recording status
    • getRecordingStatus

      public String getRecordingStatus()
      Returns the recording status
      Returns:
      the recording status
    • getEventStatus

      public String getEventStatus()
      Returns the event status
      Returns:
      the event status
    • getAgentId

      public String getAgentId()
      Returns the agent id
      Returns:
      the agent id
    • setAgentId

      public void setAgentId(String agentId)
      Sets the agent id
      Parameters:
      agentId - the agent id
    • getAgentConfiguration

      public Map<String,String> getAgentConfiguration()
      Returns the agent configuration
      Returns:
      the agent configuration
    • setAgentConfiguration

      public void setAgentConfiguration(Map<String,String> agentConfigurations)
      Sets the agent configuration
      Parameters:
      agentConfigurations - the agent configuration
    • getTechnicalEndTime

      public String getTechnicalEndTime()
      Returns the technical end time
      Returns:
      the technical end time
    • setTechnicalEndTime

      public void setTechnicalEndTime(String technicalEndTime)
      Sets the technical end time
      Parameters:
      technicalEndTime - the technical end time
    • getTechnicalStartTime

      public String getTechnicalStartTime()
      Returns the technical start time
      Returns:
      the technical start time
    • setTechnicalStartTime

      public void setTechnicalStartTime(String technicalStartTime)
      Sets the technical start time
      Parameters:
      technicalStartTime - the technical start time
    • getTechnicalPresenters

      public List<String> getTechnicalPresenters()
      Returns the technical presenters
      Returns:
      the technical presenters
    • setTechnicalPresenters

      public void setTechnicalPresenters(List<String> technicalPresenters)
      Sets the technical presenters
      Parameters:
      technicalPresenters - the technical presenters
    • setExtendedMetadata

      public void setExtendedMetadata(String type, Map<String,List<String>> metadata)
      Sets the external metadata for a catalog flavor.
      Parameters:
      type - The catalog type
      metadata - The metadata
    • resetExtendedMetadata

      public void resetExtendedMetadata()
      Removes all external metadata.
    • getExtendedMetadata

      public Map<String,Map<String,List<String>>> 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 stream
      unmarshaller - 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.JSONException
      XMLStreamException
      javax.xml.bind.JAXBException
      IOException
    • toJSON

      public String toJSON()
      Serializes the recording event.
      Returns:
      the serialized recording event
    • toXML

      public String toXML()
      Serializes the recording event to an XML format.
      Returns:
      A String with this event's content as XML.
    • createUnmarshaller

      public static javax.xml.bind.Unmarshaller createUnmarshaller() throws IOException
      Create an unmarshaller for events
      Returns:
      an unmarshaller for events
      Throws:
      IOException