Class EventHttpServletRequest

java.lang.Object
org.opencastproject.index.service.impl.util.EventHttpServletRequest

public class EventHttpServletRequest extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    createFromHttpServletRequest(javax.servlet.http.HttpServletRequest request, org.opencastproject.ingest.api.IngestService ingestService, List<org.opencastproject.metadata.dublincore.EventCatalogUIAdapter> eventCatalogUIAdapters, String startDatePattern, String startTimePattern)
    Create a EventHttpServletRequest from a HttpServletRequest to create a new Event.
    protected static org.opencastproject.security.api.AccessControlList
    deserializeJsonToAcl(String json, boolean assumeAllow)
    De-serialize an JSON into an AccessControlList.
    protected static org.opencastproject.metadata.dublincore.MetadataList
    deserializeMetadataList(String json, List<org.opencastproject.metadata.dublincore.EventCatalogUIAdapter> catalogAdapters, String startDatePattern, String startTimePattern)
    Change the simplified fields of key values provided to the external api into a MetadataList.
    com.entwinemedia.fn.data.Opt<org.opencastproject.security.api.AccessControlList>
     
    com.entwinemedia.fn.data.Opt<org.opencastproject.mediapackage.MediaPackage>
     
    com.entwinemedia.fn.data.Opt<org.opencastproject.metadata.dublincore.MetadataList>
     
    com.entwinemedia.fn.data.Opt<org.json.simple.JSONObject>
     
    com.entwinemedia.fn.data.Opt<org.json.simple.JSONObject>
     
    com.entwinemedia.fn.data.Opt<org.json.simple.JSONObject>
     
    void
    setAcl(org.opencastproject.security.api.AccessControlList acl)
     
    void
    setMediaPackage(org.opencastproject.mediapackage.MediaPackage mediaPackage)
     
    void
    setMetadataList(org.opencastproject.metadata.dublincore.MetadataList metadataList)
     
    void
    setProcessing(org.json.simple.JSONObject processing)
     
    void
    setScheduling(org.json.simple.JSONObject scheduling)
     
    void
    setSource(org.json.simple.JSONObject source)
     
    updateFromHttpServletRequest(org.opencastproject.elasticsearch.index.objects.event.Event event, javax.servlet.http.HttpServletRequest request, List<org.opencastproject.metadata.dublincore.EventCatalogUIAdapter> eventCatalogUIAdapters, String startDatePattern, String startTimePattern)
    Load the details of updating an event.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EventHttpServletRequest

      public EventHttpServletRequest()
  • Method Details

    • setAcl

      public void setAcl(org.opencastproject.security.api.AccessControlList acl)
    • setMediaPackage

      public void setMediaPackage(org.opencastproject.mediapackage.MediaPackage mediaPackage)
    • setMetadataList

      public void setMetadataList(org.opencastproject.metadata.dublincore.MetadataList metadataList)
    • setProcessing

      public void setProcessing(org.json.simple.JSONObject processing)
    • setScheduling

      public void setScheduling(org.json.simple.JSONObject scheduling)
    • setSource

      public void setSource(org.json.simple.JSONObject source)
    • getAcl

      public com.entwinemedia.fn.data.Opt<org.opencastproject.security.api.AccessControlList> getAcl()
    • getMediaPackage

      public com.entwinemedia.fn.data.Opt<org.opencastproject.mediapackage.MediaPackage> getMediaPackage()
    • getMetadataList

      public com.entwinemedia.fn.data.Opt<org.opencastproject.metadata.dublincore.MetadataList> getMetadataList()
    • getProcessing

      public com.entwinemedia.fn.data.Opt<org.json.simple.JSONObject> getProcessing()
    • getScheduling

      public com.entwinemedia.fn.data.Opt<org.json.simple.JSONObject> getScheduling()
    • getSource

      public com.entwinemedia.fn.data.Opt<org.json.simple.JSONObject> getSource()
    • createFromHttpServletRequest

      public static EventHttpServletRequest createFromHttpServletRequest(javax.servlet.http.HttpServletRequest request, org.opencastproject.ingest.api.IngestService ingestService, List<org.opencastproject.metadata.dublincore.EventCatalogUIAdapter> eventCatalogUIAdapters, String startDatePattern, String startTimePattern) throws IndexServiceException
      Create a EventHttpServletRequest from a HttpServletRequest to create a new Event.
      Parameters:
      request - The multipart request that should result in a new Event
      ingestService - The IngestService to use to ingest Event media.
      eventCatalogUIAdapters - The catalog ui adapters to use for getting the event metadata.
      startDatePattern - The pattern to use to parse the start date from the request.
      startTimePattern - The pattern to use to parse the start time from the request.
      Returns:
      An EventHttpServletRequest populated from the request.
      Throws:
      IndexServiceException - Thrown if unable to create the event for an internal reason.
      IllegalArgumentException - Thrown if the multi part request doesn't have the necessary data.
    • updateFromHttpServletRequest

      public static EventHttpServletRequest updateFromHttpServletRequest(org.opencastproject.elasticsearch.index.objects.event.Event event, javax.servlet.http.HttpServletRequest request, List<org.opencastproject.metadata.dublincore.EventCatalogUIAdapter> eventCatalogUIAdapters, String startDatePattern, String startTimePattern) throws IllegalArgumentException, IndexServiceException, org.opencastproject.util.NotFoundException
      Load the details of updating an event.
      Parameters:
      event - The event to update.
      request - The multipart request that has the data to load the updated event.
      eventCatalogUIAdapters - The list of catalog ui adapters to use to load the event metadata.
      startDatePattern - The pattern to use to parse the start date from the request.
      startTimePattern - The pattern to use to parse the start time from the request.
      Returns:
      The data for the event update
      Throws:
      IllegalArgumentException - Thrown if the request to update the event is malformed.
      IndexServiceException - Thrown if something is unable to load the event data.
      org.opencastproject.util.NotFoundException - Thrown if unable to find a metadata catalog or field that matches an input catalog or field.
    • deserializeJsonToAcl

      protected static org.opencastproject.security.api.AccessControlList deserializeJsonToAcl(String json, boolean assumeAllow) throws org.json.simple.parser.ParseException
      De-serialize an JSON into an AccessControlList.
      Parameters:
      json - The AccessControlList to serialize.
      assumeAllow - Assume that all entries are allows.
      Returns:
      An AccessControlList representation of the Json
      Throws:
      org.json.simple.parser.ParseException
    • deserializeMetadataList

      protected static org.opencastproject.metadata.dublincore.MetadataList deserializeMetadataList(String json, List<org.opencastproject.metadata.dublincore.EventCatalogUIAdapter> catalogAdapters, String startDatePattern, String startTimePattern) throws org.json.simple.parser.ParseException, org.opencastproject.util.NotFoundException, ParseException
      Change the simplified fields of key values provided to the external api into a MetadataList.
      Parameters:
      json - The json string that contains an array of metadata field lists for the different catalogs.
      startDatePattern - The pattern to use to parse the start date from the json payload.
      startTimePattern - The pattern to use to parse the start time from the json payload.
      Returns:
      A MetadataList with the fields populated with the values provided.
      Throws:
      org.json.simple.parser.ParseException - Thrown if unable to parse the json string.
      org.opencastproject.util.NotFoundException - Thrown if unable to find the catalog or field that the json refers to.
      ParseException