Class AbstractEventEndpoint

java.lang.Object
org.opencastproject.adminui.endpoint.AbstractEventEndpoint
Direct Known Subclasses:
OsgiEventEndpoint

@Path("/admin-ng/event") public abstract class AbstractEventEndpoint extends Object
The event endpoint acts as a facade for WorkflowService and Archive providing a unified query interface and result set.

This first implementation uses the AssetManager. In a later iteration the endpoint may abstract over the concrete archive.

  • Field Details

    • SCHEDULING_AGENT_ID_KEY

      public static final String SCHEDULING_AGENT_ID_KEY
      Scheduling JSON keys
      See Also:
    • SCHEDULING_START_KEY

      public static final String SCHEDULING_START_KEY
      See Also:
    • SCHEDULING_END_KEY

      public static final String SCHEDULING_END_KEY
      See Also:
    • SCHEDULING_PREVIOUS_AGENTID

      public static final String SCHEDULING_PREVIOUS_AGENTID
      See Also:
    • SCHEDULING_PREVIOUS_PREVIOUSENTRIES

      public static final String SCHEDULING_PREVIOUS_PREVIOUSENTRIES
      See Also:
    • WORKFLOW_DEFINITION_DEFAULT

      protected static final String WORKFLOW_DEFINITION_DEFAULT
      The configuration key that defines the default workflow definition
      See Also:
    • DEFAULT_URL_SIGNING_EXPIRE_DURATION

      protected static final long DEFAULT_URL_SIGNING_EXPIRE_DURATION
      The default time before a piece of signed content expires. 2 Hours.
      See Also:
    • serverUrl

      protected String serverUrl
      Default server URL
    • serviceUrl

      protected String serviceUrl
      Service url
    • defaultWorkflowDefinionId

      protected String defaultWorkflowDefinionId
      The default workflow identifier, if one is configured
  • Constructor Details

    • AbstractEventEndpoint

      public AbstractEventEndpoint()
  • Method Details

    • getAssetManager

      public abstract org.opencastproject.assetmanager.api.AssetManager getAssetManager()
    • getWorkflowService

      public abstract org.opencastproject.workflow.api.WorkflowService getWorkflowService()
    • getIndex

      public abstract org.opencastproject.elasticsearch.index.ElasticsearchIndex getIndex()
    • getJobService

      public abstract JobEndpoint getJobService()
    • getSeriesEndpoint

      public abstract SeriesEndpoint getSeriesEndpoint()
    • getAclService

      public abstract org.opencastproject.authorization.xacml.manager.api.AclService getAclService()
    • getEventCommentService

      public abstract org.opencastproject.event.comment.EventCommentService getEventCommentService()
    • getSecurityService

      public abstract org.opencastproject.security.api.SecurityService getSecurityService()
    • getIndexService

      public abstract org.opencastproject.index.service.api.IndexService getIndexService()
    • getAuthorizationService

      public abstract org.opencastproject.security.api.AuthorizationService getAuthorizationService()
    • getSchedulerService

      public abstract org.opencastproject.scheduler.api.SchedulerService getSchedulerService()
    • getCaptureAgentStateService

      public abstract org.opencastproject.capture.admin.api.CaptureAgentStateService getCaptureAgentStateService()
    • getAdminUIConfiguration

      public abstract AdminUIConfiguration getAdminUIConfiguration()
    • getUrlSigningExpireDuration

      public abstract long getUrlSigningExpireDuration()
    • getUrlSigningService

      public abstract org.opencastproject.security.urlsigning.service.UrlSigningService getUrlSigningService()
    • signWithClientIP

      public abstract Boolean signWithClientIP()
    • getOnlySeriesWithWriteAccessEventModal

      public abstract Boolean getOnlySeriesWithWriteAccessEventModal()
    • getOnlyEventsWithWriteAccessEventsTab

      public abstract Boolean getOnlyEventsWithWriteAccessEventsTab()
    • getUserDirectoryService

      public abstract org.opencastproject.security.api.UserDirectoryService getUserDirectoryService()
    • activate

      public void activate(org.osgi.service.component.ComponentContext cc)
      Activates REST service.
      Parameters:
      cc - ComponentContext
    • getEventWorkflowProperties

      @POST @Path("workflowProperties") @Produces("application/json") public javax.ws.rs.core.Response getEventWorkflowProperties(@FormParam("eventIds") String eventIds) throws org.opencastproject.security.api.UnauthorizedException
      Throws:
      org.opencastproject.security.api.UnauthorizedException
    • getCatalogAdapters

      @GET @Path("catalogAdapters") @Produces("application/json") public javax.ws.rs.core.Response getCatalogAdapters()
    • getEventResponse

      @GET @Path("{eventId}") @Produces("application/json") public javax.ws.rs.core.Response getEventResponse(@PathParam("eventId") String id) throws Exception
      Throws:
      Exception
    • deleteEvent

      @DELETE @Path("{eventId}") @Produces("application/json") public javax.ws.rs.core.Response deleteEvent(@PathParam("eventId") String id) throws org.opencastproject.security.api.UnauthorizedException, org.opencastproject.elasticsearch.api.SearchIndexException
      Throws:
      org.opencastproject.security.api.UnauthorizedException
      org.opencastproject.elasticsearch.api.SearchIndexException
    • deleteEvents

      @POST @Path("deleteEvents") @Produces("application/json") public javax.ws.rs.core.Response deleteEvents(String eventIdsContent) throws org.opencastproject.security.api.UnauthorizedException, org.opencastproject.elasticsearch.api.SearchIndexException
      Throws:
      org.opencastproject.security.api.UnauthorizedException
      org.opencastproject.elasticsearch.api.SearchIndexException
    • getEventPublicationsTab

      @GET @Path("{eventId}/publications.json") @Produces("application/json") public javax.ws.rs.core.Response getEventPublicationsTab(@PathParam("eventId") String id) throws Exception
      Throws:
      Exception
    • getEventScheduling

      @GET @Path("{eventId}/scheduling.json") @Produces("application/json") public javax.ws.rs.core.Response getEventScheduling(@PathParam("eventId") String eventId) throws org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedException, org.opencastproject.elasticsearch.api.SearchIndexException
      Throws:
      org.opencastproject.util.NotFoundException
      org.opencastproject.security.api.UnauthorizedException
      org.opencastproject.elasticsearch.api.SearchIndexException
    • getEventsScheduling

      @POST @Path("scheduling.json") @Produces("application/json") public javax.ws.rs.core.Response getEventsScheduling(@FormParam("eventIds") List<String> eventIds, @FormParam("ignoreNonScheduled") boolean ignoreNonScheduled)
    • updateEventScheduling

      @PUT @Path("{eventId}/scheduling") public javax.ws.rs.core.Response updateEventScheduling(@PathParam("eventId") String eventId, @FormParam("scheduling") String scheduling) throws org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedException, org.opencastproject.elasticsearch.api.SearchIndexException, org.opencastproject.index.service.exception.IndexServiceException
      Throws:
      org.opencastproject.util.NotFoundException
      org.opencastproject.security.api.UnauthorizedException
      org.opencastproject.elasticsearch.api.SearchIndexException
      org.opencastproject.index.service.exception.IndexServiceException
    • getEventComments

      @GET @Path("{eventId}/comments") @Produces("application/json") public javax.ws.rs.core.Response getEventComments(@PathParam("eventId") String eventId) throws Exception
      Throws:
      Exception
    • hasActiveTransaction

      @GET @Path("{eventId}/hasActiveTransaction") @Produces("text/plain") public javax.ws.rs.core.Response hasActiveTransaction(@PathParam("eventId") String eventId) throws Exception
      Throws:
      Exception
    • getEventComment

      @GET @Produces("application/json") @Path("{eventId}/comment/{commentId}") public javax.ws.rs.core.Response getEventComment(@PathParam("eventId") String eventId, @PathParam("commentId") long commentId) throws org.opencastproject.util.NotFoundException, Exception
      Throws:
      org.opencastproject.util.NotFoundException
      Exception
    • updateEventComment

      @PUT @Path("{eventId}/comment/{commentId}") public javax.ws.rs.core.Response updateEventComment(@PathParam("eventId") String eventId, @PathParam("commentId") long commentId, @FormParam("text") String text, @FormParam("reason") String reason, @FormParam("resolved") Boolean resolved) throws Exception
      Throws:
      Exception
    • applyAclToEvent

      @POST @Path("{eventId}/access") public javax.ws.rs.core.Response applyAclToEvent(@PathParam("eventId") String eventId, @FormParam("acl") String acl) throws org.opencastproject.util.NotFoundException, org.opencastproject.security.api.UnauthorizedException, org.opencastproject.elasticsearch.api.SearchIndexException, org.opencastproject.index.service.exception.IndexServiceException
      Throws:
      org.opencastproject.util.NotFoundException
      org.opencastproject.security.api.UnauthorizedException
      org.opencastproject.elasticsearch.api.SearchIndexException
      org.opencastproject.index.service.exception.IndexServiceException
    • createEventComment

      @POST @Path("{eventId}/comment") @Produces("application/json") public javax.ws.rs.core.Response createEventComment(@PathParam("eventId") String eventId, @FormParam("text") String text, @FormParam("reason") String reason, @FormParam("resolved") Boolean resolved) throws Exception
      Throws:
      Exception
    • resolveEventComment

      @POST @Path("{eventId}/comment/{commentId}") public javax.ws.rs.core.Response resolveEventComment(@PathParam("eventId") String eventId, @PathParam("commentId") long commentId) throws Exception
      Throws:
      Exception
    • deleteEventComment

      @DELETE @Path("{eventId}/comment/{commentId}") @Produces("application/json") public javax.ws.rs.core.Response deleteEventComment(@PathParam("eventId") String eventId, @PathParam("commentId") long commentId) throws Exception
      Throws:
      Exception
    • deleteEventCommentReply

      @DELETE @Path("{eventId}/comment/{commentId}/{replyId}") public javax.ws.rs.core.Response deleteEventCommentReply(@PathParam("eventId") String eventId, @PathParam("commentId") long commentId, @PathParam("replyId") long replyId) throws Exception
      Throws:
      Exception
    • updateEventCommentReply

      @PUT @Path("{eventId}/comment/{commentId}/{replyId}") public javax.ws.rs.core.Response updateEventCommentReply(@PathParam("eventId") String eventId, @PathParam("commentId") long commentId, @PathParam("replyId") long replyId, @FormParam("text") String text) throws Exception
      Throws:
      Exception
    • createEventCommentReply

      @POST @Path("{eventId}/comment/{commentId}/reply") public javax.ws.rs.core.Response createEventCommentReply(@PathParam("eventId") String eventId, @PathParam("commentId") long commentId, @FormParam("text") String text, @FormParam("resolved") Boolean resolved) throws Exception
      Throws:
      Exception
    • getEventMetadata

      @GET @Path("{eventId}/metadata.json") @Produces("application/json") public javax.ws.rs.core.Response getEventMetadata(@PathParam("eventId") String eventId) throws Exception
      Throws:
      Exception
    • getEventsMetadata

      @POST @Path("events/metadata.json") @Produces("application/json") public javax.ws.rs.core.Response getEventsMetadata(@FormParam("eventIds") String eventIds) throws Exception
      Throws:
      Exception
    • bulkUpdate

      @PUT @Path("bulk/update") public javax.ws.rs.core.Response bulkUpdate(@FormParam("update") String updateJson)
    • getBulkConflicts

      @POST @Path("bulk/conflicts") public javax.ws.rs.core.Response getBulkConflicts(@FormParam("update") String updateJson) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • updateEventMetadata

      @PUT @Path("{eventId}/metadata") public javax.ws.rs.core.Response updateEventMetadata(@PathParam("eventId") String id, @FormParam("metadata") String metadataJSON) throws Exception
      Throws:
      Exception
    • updateEventsMetadata

      @PUT @Path("events/metadata") public javax.ws.rs.core.Response updateEventsMetadata(@FormParam("eventIds") String eventIds, @FormParam("metadata") String metadata) throws Exception
      Throws:
      Exception
    • getAssetList

      @GET @Path("{eventId}/asset/assets.json") @Produces("application/json") public javax.ws.rs.core.Response getAssetList(@PathParam("eventId") String id) throws Exception
      Throws:
      Exception
    • getAttachmentsList

      @GET @Path("{eventId}/asset/attachment/attachments.json") @Produces("application/json") public javax.ws.rs.core.Response getAttachmentsList(@PathParam("eventId") String id) throws Exception
      Throws:
      Exception
    • getAttachment

      @GET @Path("{eventId}/asset/attachment/{id}.json") @Produces("application/json") public javax.ws.rs.core.Response getAttachment(@PathParam("eventId") String eventId, @PathParam("id") String id) throws org.opencastproject.util.NotFoundException, org.opencastproject.elasticsearch.api.SearchIndexException, org.opencastproject.index.service.exception.IndexServiceException
      Throws:
      org.opencastproject.util.NotFoundException
      org.opencastproject.elasticsearch.api.SearchIndexException
      org.opencastproject.index.service.exception.IndexServiceException
    • getCatalogList

      @GET @Path("{eventId}/asset/catalog/catalogs.json") @Produces("application/json") public javax.ws.rs.core.Response getCatalogList(@PathParam("eventId") String id) throws Exception
      Throws:
      Exception
    • getCatalog

      @GET @Path("{eventId}/asset/catalog/{id}.json") @Produces("application/json") public javax.ws.rs.core.Response getCatalog(@PathParam("eventId") String eventId, @PathParam("id") String id) throws org.opencastproject.util.NotFoundException, org.opencastproject.elasticsearch.api.SearchIndexException, org.opencastproject.index.service.exception.IndexServiceException
      Throws:
      org.opencastproject.util.NotFoundException
      org.opencastproject.elasticsearch.api.SearchIndexException
      org.opencastproject.index.service.exception.IndexServiceException
    • getMediaList

      @GET @Path("{eventId}/asset/media/media.json") @Produces("application/json") public javax.ws.rs.core.Response getMediaList(@PathParam("eventId") String id) throws Exception
      Throws:
      Exception
    • getMedia

      @GET @Path("{eventId}/asset/media/{id}.json") @Produces("application/json") public javax.ws.rs.core.Response getMedia(@PathParam("eventId") String eventId, @PathParam("id") String id) throws org.opencastproject.util.NotFoundException, org.opencastproject.elasticsearch.api.SearchIndexException, org.opencastproject.index.service.exception.IndexServiceException
      Throws:
      org.opencastproject.util.NotFoundException
      org.opencastproject.elasticsearch.api.SearchIndexException
      org.opencastproject.index.service.exception.IndexServiceException
    • getPublicationList

      @GET @Path("{eventId}/asset/publication/publications.json") @Produces("application/json") public javax.ws.rs.core.Response getPublicationList(@PathParam("eventId") String id) throws Exception
      Throws:
      Exception
    • getPublication

      @GET @Path("{eventId}/asset/publication/{id}.json") @Produces("application/json") public javax.ws.rs.core.Response getPublication(@PathParam("eventId") String eventId, @PathParam("id") String id) throws org.opencastproject.util.NotFoundException, org.opencastproject.elasticsearch.api.SearchIndexException, org.opencastproject.index.service.exception.IndexServiceException
      Throws:
      org.opencastproject.util.NotFoundException
      org.opencastproject.elasticsearch.api.SearchIndexException
      org.opencastproject.index.service.exception.IndexServiceException
    • getEventHostPages

      @GET @Path("{eventId}/tobira/pages") public javax.ws.rs.core.Response getEventHostPages(@PathParam("eventId") String eventId)
    • getEventWorkflows

      @GET @Path("{eventId}/workflows.json") @Produces("application/json") public javax.ws.rs.core.Response getEventWorkflows(@PathParam("eventId") String id) throws org.opencastproject.security.api.UnauthorizedException, org.opencastproject.elasticsearch.api.SearchIndexException, JobEndpointException
      Throws:
      org.opencastproject.security.api.UnauthorizedException
      org.opencastproject.elasticsearch.api.SearchIndexException
      JobEndpointException
    • updateEventWorkflow

      @PUT @Path("{eventId}/workflows") public javax.ws.rs.core.Response updateEventWorkflow(@PathParam("eventId") String id, @FormParam("configuration") String configuration) throws org.opencastproject.elasticsearch.api.SearchIndexException, org.opencastproject.security.api.UnauthorizedException
      Throws:
      org.opencastproject.elasticsearch.api.SearchIndexException
      org.opencastproject.security.api.UnauthorizedException
    • getEventWorkflow

      @GET @Path("{eventId}/workflows/{workflowId}") @Produces("application/json") public javax.ws.rs.core.Response getEventWorkflow(@PathParam("eventId") String eventId, @PathParam("workflowId") String workflowId) throws org.opencastproject.elasticsearch.api.SearchIndexException
      Throws:
      org.opencastproject.elasticsearch.api.SearchIndexException
    • getEventOperations

      @GET @Path("{eventId}/workflows/{workflowId}/operations.json") @Produces("application/json") public javax.ws.rs.core.Response getEventOperations(@PathParam("eventId") String eventId, @PathParam("workflowId") String workflowId) throws org.opencastproject.elasticsearch.api.SearchIndexException
      Throws:
      org.opencastproject.elasticsearch.api.SearchIndexException
    • getEventOperation

      @GET @Path("{eventId}/workflows/{workflowId}/operations/{operationPosition}") @Produces("application/json") public javax.ws.rs.core.Response getEventOperation(@PathParam("eventId") String eventId, @PathParam("workflowId") String workflowId, @PathParam("operationPosition") Integer operationPosition) throws org.opencastproject.elasticsearch.api.SearchIndexException
      Throws:
      org.opencastproject.elasticsearch.api.SearchIndexException
    • getEventErrors

      @GET @Path("{eventId}/workflows/{workflowId}/errors.json") @Produces("application/json") public javax.ws.rs.core.Response getEventErrors(@PathParam("eventId") String eventId, @PathParam("workflowId") String workflowId, @Context javax.servlet.http.HttpServletRequest req) throws JobEndpointException, org.opencastproject.elasticsearch.api.SearchIndexException
      Throws:
      JobEndpointException
      org.opencastproject.elasticsearch.api.SearchIndexException
    • getEventError

      @GET @Path("{eventId}/workflows/{workflowId}/errors/{errorId}.json") @Produces("application/json") public javax.ws.rs.core.Response getEventError(@PathParam("eventId") String eventId, @PathParam("workflowId") String workflowId, @PathParam("errorId") String errorId, @Context javax.servlet.http.HttpServletRequest req) throws JobEndpointException, org.opencastproject.elasticsearch.api.SearchIndexException
      Throws:
      JobEndpointException
      org.opencastproject.elasticsearch.api.SearchIndexException
    • getEventAccessInformation

      @GET @Path("{eventId}/access.json") @Produces("application/json") public javax.ws.rs.core.Response getEventAccessInformation(@PathParam("eventId") String eventId) throws Exception
      Throws:
      Exception
    • updateAssets

      @POST @Path("{eventId}/assets") @Consumes("multipart/form-data") public javax.ws.rs.core.Response updateAssets(@PathParam("eventId") String eventId, @Context javax.servlet.http.HttpServletRequest request) throws Exception
      Throws:
      Exception
    • getNewMetadata

      @GET @Path("new/metadata") public javax.ws.rs.core.Response getNewMetadata()
    • getNewProcessing

      @GET @Path("new/processing") public javax.ws.rs.core.Response getNewProcessing(@QueryParam("tags") String tagsString)
    • getNewConflicts

      @POST @Path("new/conflicts") public javax.ws.rs.core.Response getNewConflicts(@FormParam("metadata") String metadata) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • createNewEvent

      @POST @Path("/new") @Consumes("multipart/form-data") public javax.ws.rs.core.Response createNewEvent(@Context javax.servlet.http.HttpServletRequest request)
    • getEvents

      @GET @Path("events.json") @Produces("application/json") public javax.ws.rs.core.Response getEvents(@QueryParam("id") String id, @QueryParam("commentReason") String reasonFilter, @QueryParam("commentResolution") String resolutionFilter, @QueryParam("filter") String filter, @QueryParam("sort") String sort, @QueryParam("offset") Integer offset, @QueryParam("limit") Integer limit, @QueryParam("getComments") Boolean getComments)
    • recordingToJson

      public static com.google.gson.JsonObject recordingToJson(org.opencastproject.scheduler.api.Recording recording)
    • workflowAction

      @PUT @Path("{eventId}/workflows/{workflowId}/action/{action}") public javax.ws.rs.core.Response workflowAction(@PathParam("eventId") String id, @PathParam("workflowId") long wfId, @PathParam("action") String action)
    • deleteWorkflow

      @DELETE @Path("{eventId}/workflows/{workflowId}") public javax.ws.rs.core.Response deleteWorkflow(@PathParam("eventId") String id, @PathParam("workflowId") long wfId) throws org.opencastproject.elasticsearch.api.SearchIndexException
      Throws:
      org.opencastproject.elasticsearch.api.SearchIndexException