Package org.opencastproject.lti.endpoint
Class LtiServiceRemoteImpl
java.lang.Object
org.opencastproject.serviceregistry.api.RemoteBase
org.opencastproject.lti.endpoint.LtiServiceRemoteImpl
- All Implemented Interfaces:
LtiService
The service calling the LTI REST endpoint (for multi-node setups with LTI)
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opencastproject.serviceregistry.api.RemoteBase
RemoteBase.HttpClientClosingInputStream -
Field Summary
Fields inherited from class org.opencastproject.serviceregistry.api.RemoteBase
client, elementsFromHttpResponse, remoteServiceManager, serviceTypeFields inherited from interface org.opencastproject.lti.service.api.LtiService
JOB_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyEventToSeries(String eventId, String seriesId) Copy an event to a different seriesvoidDeletes the specified eventgetEventMetadata(String eventId) Returns the event metadata for a specific eventReturns the event metadata for a new eventList currently running jobs for the seriesvoidsetEventMetadataJson(String eventId, String metadataJson) Set the event metadatavoidsetRemoteServiceManager(ServiceRegistry serviceRegistry) Sets the remote service manager.voidsetTrustedHttpClient(TrustedHttpClient trustedHttpClient) Sets the trusted http clientvoidupsertEvent(LtiFileUpload file, String captions, String captionFormat, String captionLanguage, String eventId, String seriesId, String metadataJson) Upload a new event or update existing event's metadataMethods inherited from class org.opencastproject.serviceregistry.api.RemoteBase
closeConnection, getResponse, getResponse, runRequest
-
Constructor Details
-
LtiServiceRemoteImpl
public LtiServiceRemoteImpl()
-
-
Method Details
-
listJobs
Description copied from interface:LtiServiceList currently running jobs for the series- Specified by:
listJobsin interfaceLtiService- Parameters:
seriesId- ID of the series- Returns:
- A list of jobs
-
upsertEvent
public void upsertEvent(LtiFileUpload file, String captions, String captionFormat, String captionLanguage, String eventId, String seriesId, String metadataJson) Description copied from interface:LtiServiceUpload a new event or update existing event's metadata- Specified by:
upsertEventin interfaceLtiService- Parameters:
file- File to uploadcaptions- Subtitles fileeventId- ID of the event (can benullfor new events)seriesId- ID of the seriesmetadataJson- Metadata for the event as JSON string
-
copyEventToSeries
Description copied from interface:LtiServiceCopy an event to a different series- Specified by:
copyEventToSeriesin interfaceLtiService- Parameters:
eventId- Event ID to copyseriesId- Series ID to copy into
-
getEventMetadata
Description copied from interface:LtiServiceReturns the event metadata for a specific event- Specified by:
getEventMetadatain interfaceLtiService- Parameters:
eventId- ID of the event- Returns:
- The event metadata list
- Throws:
NotFoundException- If the event doesn't existUnauthorizedException- If the user cannot access the event
-
getNewEventMetadata
Description copied from interface:LtiServiceReturns the event metadata for a new event- Specified by:
getNewEventMetadatain interfaceLtiService- Returns:
- The event metadata list
-
setEventMetadataJson
public void setEventMetadataJson(String eventId, String metadataJson) throws NotFoundException, UnauthorizedException Description copied from interface:LtiServiceSet the event metadata- Specified by:
setEventMetadataJsonin interfaceLtiService- Parameters:
eventId- ID of the eventmetadataJson- New metadata of the event as JSON- Throws:
NotFoundException- If the event doesn't existUnauthorizedException- If the user cannot access the event
-
delete
Description copied from interface:LtiServiceDeletes the specified event- Specified by:
deletein interfaceLtiService- Parameters:
eventId- ID of the event
-
setTrustedHttpClient
Description copied from class:RemoteBaseSets the trusted http client- Overrides:
setTrustedHttpClientin classRemoteBase- Parameters:
trustedHttpClient-
-
setRemoteServiceManager
Description copied from class:RemoteBaseSets the remote service manager.- Overrides:
setRemoteServiceManagerin classRemoteBase- Parameters:
serviceRegistry-
-