org.mythtv.services.api.content.impl
Class ContentTemplate

java.lang.Object
  extended by org.mythtv.services.api.AbstractOperations
      extended by org.mythtv.services.api.content.impl.ContentTemplate
All Implemented Interfaces:
ContentOperations

public class ContentTemplate
extends AbstractOperations
implements ContentOperations

Author:
Daniel Frey, John Baab

Nested Class Summary
static class ContentTemplate.Endpoint
           
 
Field Summary
 
Fields inherited from class org.mythtv.services.api.AbstractOperations
formatter
 
Constructor Summary
ContentTemplate(org.springframework.web.client.RestOperations restOperations, String apiUrlBase)
           
 
Method Summary
 org.springframework.http.ResponseEntity<LiveStreamInfoWrapper> addLiveStream(String storageGroup, String filename, String hostname, int maxSegments, int width, int height, int bitrate, int audioBitrate, int sampleRate)
          - GET
 org.springframework.http.ResponseEntity<LiveStreamInfoWrapper> addRecordingLiveStream(int channelId, org.joda.time.DateTime startTime, int maxSegments, int width, int height, int bitrate, int audioBitrate, int sampleRate)
          - GET
 org.springframework.http.ResponseEntity<LiveStreamInfoWrapper> addVideoLiveStream(int id, int maxSegments, int width, int height, int bitrate, int audioBitrate, int sampleRate)
          - GET
 org.springframework.http.ResponseEntity<Bool> downloadFile(String url, String storageGroup, ETagInfo etag)
          - POST
 org.springframework.http.ResponseEntity<byte[]> getAlbumArt(int id, int width, int height, ETagInfo etag)
          - GET
protected  String getApiUrlBase()
           
 org.springframework.http.ResponseEntity<byte[]> getFile(String storageGroup, String filename, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<StringList> getFileList(String storageGroup, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<LiveStreamInfos> getFilteredLiveStreamList(String filename, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<String> getHash(String storageGroup, String filename, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<byte[]> getImageFile(String storageGroup, String filename, int width, int height, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<LiveStreamInfoWrapper> getLiveStream(int id, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<LiveStreamInfos> getLiveStreamList(ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<byte[]> getMusic(int id, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<byte[]> getPreviewImage(int channelId, org.joda.time.DateTime startTime, int width, int height, int secondsIn, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<ArtworkInfos> getProgramArtworkList(String inetRef, int season, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<byte[]> getRecording(int channelId, org.joda.time.DateTime startTime, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<byte[]> getRecordingArtwork(String type, String inetRef, int season, int width, int height, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<ArtworkInfoList> getRecordingArtworkList(int channelId, org.joda.time.DateTime startTime, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<byte[]> getVideo(int id, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<byte[]> getVideoArtwork(String type, int id, int width, int height, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<Bool> removeLiveStream(int id)
          - GET
 org.springframework.http.ResponseEntity<LiveStreamInfo> stopLiveStream(int id)
          - GET
 
Methods inherited from class org.mythtv.services.api.AbstractOperations
buildUri, buildUri, buildUri, convertUtcAndFormat, getRequestEntity, handleResponseEtag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentTemplate

public ContentTemplate(org.springframework.web.client.RestOperations restOperations,
                       String apiUrlBase)
Method Detail

addLiveStream

public org.springframework.http.ResponseEntity<LiveStreamInfoWrapper> addLiveStream(String storageGroup,
                                                                                    String filename,
                                                                                    String hostname,
                                                                                    int maxSegments,
                                                                                    int width,
                                                                                    int height,
                                                                                    int bitrate,
                                                                                    int audioBitrate,
                                                                                    int sampleRate)
                                                                             throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
addLiveStream in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

addRecordingLiveStream

public org.springframework.http.ResponseEntity<LiveStreamInfoWrapper> addRecordingLiveStream(int channelId,
                                                                                             org.joda.time.DateTime startTime,
                                                                                             int maxSegments,
                                                                                             int width,
                                                                                             int height,
                                                                                             int bitrate,
                                                                                             int audioBitrate,
                                                                                             int sampleRate)
                                                                                      throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
addRecordingLiveStream in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

addVideoLiveStream

public org.springframework.http.ResponseEntity<LiveStreamInfoWrapper> addVideoLiveStream(int id,
                                                                                         int maxSegments,
                                                                                         int width,
                                                                                         int height,
                                                                                         int bitrate,
                                                                                         int audioBitrate,
                                                                                         int sampleRate)
                                                                                  throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
addVideoLiveStream in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

downloadFile

public org.springframework.http.ResponseEntity<Bool> downloadFile(String url,
                                                                  String storageGroup,
                                                                  ETagInfo etag)
                                                           throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- POST

Specified by:
downloadFile in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getAlbumArt

public org.springframework.http.ResponseEntity<byte[]> getAlbumArt(int id,
                                                                   int width,
                                                                   int height,
                                                                   ETagInfo etag)
                                                            throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
getAlbumArt in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getFile

public org.springframework.http.ResponseEntity<byte[]> getFile(String storageGroup,
                                                               String filename,
                                                               ETagInfo etag)
                                                        throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
getFile in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getFileList

public org.springframework.http.ResponseEntity<StringList> getFileList(String storageGroup,
                                                                       ETagInfo etag)
                                                                throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
getFileList in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getFilteredLiveStreamList

public org.springframework.http.ResponseEntity<LiveStreamInfos> getFilteredLiveStreamList(String filename,
                                                                                          ETagInfo etag)
                                                                                   throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
getFilteredLiveStreamList in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getHash

public org.springframework.http.ResponseEntity<String> getHash(String storageGroup,
                                                               String filename,
                                                               ETagInfo etag)
                                                        throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
getHash in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getImageFile

public org.springframework.http.ResponseEntity<byte[]> getImageFile(String storageGroup,
                                                                    String filename,
                                                                    int width,
                                                                    int height,
                                                                    ETagInfo etag)
                                                             throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
getImageFile in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getLiveStream

public org.springframework.http.ResponseEntity<LiveStreamInfoWrapper> getLiveStream(int id,
                                                                                    ETagInfo etag)
                                                                             throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
getLiveStream in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getLiveStreamList

public org.springframework.http.ResponseEntity<LiveStreamInfos> getLiveStreamList(ETagInfo etag)
                                                                           throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
getLiveStreamList in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getMusic

public org.springframework.http.ResponseEntity<byte[]> getMusic(int id,
                                                                ETagInfo etag)
                                                         throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
getMusic in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getPreviewImage

public org.springframework.http.ResponseEntity<byte[]> getPreviewImage(int channelId,
                                                                       org.joda.time.DateTime startTime,
                                                                       int width,
                                                                       int height,
                                                                       int secondsIn,
                                                                       ETagInfo etag)
                                                                throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
getPreviewImage in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getProgramArtworkList

public org.springframework.http.ResponseEntity<ArtworkInfos> getProgramArtworkList(String inetRef,
                                                                                   int season,
                                                                                   ETagInfo etag)
                                                                            throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
getProgramArtworkList in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getRecording

public org.springframework.http.ResponseEntity<byte[]> getRecording(int channelId,
                                                                    org.joda.time.DateTime startTime,
                                                                    ETagInfo etag)
                                                             throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
getRecording in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getRecordingArtwork

public org.springframework.http.ResponseEntity<byte[]> getRecordingArtwork(String type,
                                                                           String inetRef,
                                                                           int season,
                                                                           int width,
                                                                           int height,
                                                                           ETagInfo etag)
                                                                    throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
getRecordingArtwork in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getRecordingArtworkList

public org.springframework.http.ResponseEntity<ArtworkInfoList> getRecordingArtworkList(int channelId,
                                                                                        org.joda.time.DateTime startTime,
                                                                                        ETagInfo etag)
                                                                                 throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
getRecordingArtworkList in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getVideo

public org.springframework.http.ResponseEntity<byte[]> getVideo(int id,
                                                                ETagInfo etag)
                                                         throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
getVideo in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getVideoArtwork

public org.springframework.http.ResponseEntity<byte[]> getVideoArtwork(String type,
                                                                       int id,
                                                                       int width,
                                                                       int height,
                                                                       ETagInfo etag)
                                                                throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
getVideoArtwork in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

removeLiveStream

public org.springframework.http.ResponseEntity<Bool> removeLiveStream(int id)
                                                               throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
removeLiveStream in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

stopLiveStream

public org.springframework.http.ResponseEntity<LiveStreamInfo> stopLiveStream(int id)
                                                                       throws MythServiceApiRuntimeException
Description copied from interface: ContentOperations
- GET

Specified by:
stopLiveStream in interface ContentOperations
Returns:
Throws:
MythServiceApiRuntimeException

getApiUrlBase

protected String getApiUrlBase()
Overrides:
getApiUrlBase in class AbstractOperations
Returns:


Copyright © 2012. All Rights Reserved.