Class AbstractEventEndpoint
java.lang.Object
org.opencastproject.adminui.endpoint.AbstractEventEndpoint
- Direct Known Subclasses:
OsgiEventEndpoint
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 Summary
FieldsModifier and TypeFieldDescriptionprotected static final longThe default time before a piece of signed content expires. 2 Hours.protected StringThe default workflow identifier, if one is configuredstatic final StringScheduling JSON keysstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected StringDefault server URLprotected StringService urlprotected static final StringThe configuration key that defines the default workflow definition -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) Activates REST service.javax.ws.rs.core.ResponseapplyAclToEvent(String eventId, String acl) javax.ws.rs.core.ResponsebulkUpdate(String updateJson) javax.ws.rs.core.ResponsecreateEventComment(String eventId, String text, String reason, Boolean resolved) javax.ws.rs.core.ResponsecreateEventCommentReply(String eventId, long commentId, String text, Boolean resolved) javax.ws.rs.core.ResponsecreateNewEvent(javax.servlet.http.HttpServletRequest request) javax.ws.rs.core.ResponsedeleteEvent(String id) javax.ws.rs.core.ResponsedeleteEventComment(String eventId, long commentId) javax.ws.rs.core.ResponsedeleteEventCommentReply(String eventId, long commentId, long replyId) javax.ws.rs.core.ResponsedeleteEvents(String eventIdsContent) javax.ws.rs.core.ResponsedeleteWorkflow(String id, long wfId) abstract AclServiceabstract AdminUIConfigurationjavax.ws.rs.core.ResponsegetAssetList(String id) abstract AssetManagerjavax.ws.rs.core.ResponsegetAttachment(String eventId, String id) javax.ws.rs.core.Responseabstract AuthorizationServicejavax.ws.rs.core.ResponsegetBulkConflicts(String updateJson) abstract CaptureAgentStateServicejavax.ws.rs.core.ResponsegetCatalog(String eventId, String id) javax.ws.rs.core.Responsejavax.ws.rs.core.ResponsegetCatalogList(String id) javax.ws.rs.core.ResponsegetEventAccessInformation(String eventId) javax.ws.rs.core.ResponsegetEventComment(String eventId, long commentId) javax.ws.rs.core.ResponsegetEventComments(String eventId) abstract EventCommentServicejavax.ws.rs.core.ResponsegetEventError(String eventId, String workflowId, String errorId, javax.servlet.http.HttpServletRequest req) javax.ws.rs.core.ResponsegetEventErrors(String eventId, String workflowId, javax.servlet.http.HttpServletRequest req) javax.ws.rs.core.ResponsegetEventHostPages(String eventId) javax.ws.rs.core.ResponsegetEventMetadata(String eventId) javax.ws.rs.core.ResponsegetEventOperation(String eventId, String workflowId, Integer operationPosition) javax.ws.rs.core.ResponsegetEventOperations(String eventId, String workflowId) javax.ws.rs.core.Responsejavax.ws.rs.core.Responsejavax.ws.rs.core.ResponsegetEvents(String id, String reasonFilter, String resolutionFilter, String filter, String sort, Integer offset, Integer limit, Boolean getComments) javax.ws.rs.core.ResponsegetEventScheduling(String eventId) javax.ws.rs.core.ResponsegetEventsMetadata(String eventIds) javax.ws.rs.core.ResponsegetEventsScheduling(List<String> eventIds, boolean ignoreNonScheduled) javax.ws.rs.core.ResponsegetEventWorkflow(String eventId, String workflowId) javax.ws.rs.core.ResponsegetEventWorkflowProperties(String eventIds) javax.ws.rs.core.Responseabstract ElasticsearchIndexgetIndex()abstract IndexServiceabstract JobEndpointjavax.ws.rs.core.Responsejavax.ws.rs.core.ResponsegetMediaList(String id) javax.ws.rs.core.ResponsegetNewConflicts(String metadata) javax.ws.rs.core.Responsejavax.ws.rs.core.ResponsegetNewProcessing(String tagsString) abstract Booleanabstract Booleanjavax.ws.rs.core.ResponsegetPublication(String eventId, String id) javax.ws.rs.core.Responseabstract SchedulerServiceabstract SecurityServiceabstract SeriesEndpointabstract longabstract UrlSigningServiceabstract UserDirectoryServiceabstract WorkflowServicejavax.ws.rs.core.ResponsehasActiveTransaction(String eventId) static com.google.gson.JsonObjectrecordingToJson(Recording recording) javax.ws.rs.core.ResponseresolveEventComment(String eventId, long commentId) abstract Booleanjavax.ws.rs.core.ResponseupdateAssets(String eventId, javax.servlet.http.HttpServletRequest request) javax.ws.rs.core.ResponseupdateEventComment(String eventId, long commentId, String text, String reason, Boolean resolved) javax.ws.rs.core.ResponseupdateEventCommentReply(String eventId, long commentId, long replyId, String text) javax.ws.rs.core.ResponseupdateEventMetadata(String id, String metadataJSON) javax.ws.rs.core.ResponseupdateEventScheduling(String eventId, String scheduling) javax.ws.rs.core.ResponseupdateEventsMetadata(String eventIds, String metadata) javax.ws.rs.core.ResponseupdateEventWorkflow(String id, String configuration) javax.ws.rs.core.ResponseworkflowAction(String id, long wfId, String action)
-
Field Details
-
SCHEDULING_AGENT_ID_KEY
Scheduling JSON keys- See Also:
-
SCHEDULING_START_KEY
- See Also:
-
SCHEDULING_END_KEY
- See Also:
-
SCHEDULING_PREVIOUS_AGENTID
- See Also:
-
SCHEDULING_PREVIOUS_PREVIOUSENTRIES
- See Also:
-
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_DURATIONThe default time before a piece of signed content expires. 2 Hours.- See Also:
-
serverUrl
Default server URL -
serviceUrl
Service url -
defaultWorkflowDefinionId
The default workflow identifier, if one is configured
-
-
Constructor Details
-
AbstractEventEndpoint
public AbstractEventEndpoint()
-
-
Method Details
-
getAssetManager
-
getWorkflowService
-
getIndex
-
getJobService
-
getSeriesEndpoint
-
getAclService
-
getEventCommentService
-
getSecurityService
-
getIndexService
-
getAuthorizationService
-
getSchedulerService
-
getCaptureAgentStateService
-
getAdminUIConfiguration
-
getUrlSigningExpireDuration
public abstract long getUrlSigningExpireDuration() -
getUrlSigningService
-
signWithClientIP
-
getOnlySeriesWithWriteAccessEventModal
-
getOnlyEventsWithWriteAccessEventsTab
-
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 UnauthorizedException - Throws:
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 UnauthorizedException, SearchIndexException -
deleteEvents
@POST @Path("deleteEvents") @Produces("application/json") public javax.ws.rs.core.Response deleteEvents(String eventIdsContent) throws UnauthorizedException, 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 NotFoundException, UnauthorizedException, SearchIndexException -
getEventsScheduling
-
updateEventScheduling
@PUT @Path("{eventId}/scheduling") public javax.ws.rs.core.Response updateEventScheduling(@PathParam("eventId") String eventId, @FormParam("scheduling") String scheduling) throws NotFoundException, UnauthorizedException, SearchIndexException, 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 NotFoundException, Exception - Throws:
NotFoundExceptionException
-
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 NotFoundException, UnauthorizedException, SearchIndexException, 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 NotFoundException - Throws:
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 NotFoundException, SearchIndexException, 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 NotFoundException, SearchIndexException, 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 NotFoundException, SearchIndexException, 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 NotFoundException, SearchIndexException, 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 UnauthorizedException, SearchIndexException, JobEndpointException -
updateEventWorkflow
@PUT @Path("{eventId}/workflows") public javax.ws.rs.core.Response updateEventWorkflow(@PathParam("eventId") String id, @FormParam("configuration") String configuration) throws SearchIndexException, 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 SearchIndexException - Throws:
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 SearchIndexException - Throws:
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 SearchIndexException - Throws:
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, 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, 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 NotFoundException - Throws:
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
-
workflowAction
-
deleteWorkflow
@DELETE @Path("{eventId}/workflows/{workflowId}") public javax.ws.rs.core.Response deleteWorkflow(@PathParam("eventId") String id, @PathParam("workflowId") long wfId) throws SearchIndexException - Throws:
SearchIndexException
-