org.mythtv.services.api.v026.impl
Class MythTemplate

java.lang.Object
  extended by org.mythtv.services.api.AbstractOperations
      extended by org.mythtv.services.api.v026.impl.MythTemplate
All Implemented Interfaces:
MythOperations

public class MythTemplate
extends AbstractOperations
implements MythOperations


Nested Class Summary
static class MythTemplate.Endpoint
           
 
Field Summary
 
Fields inherited from class org.mythtv.services.api.AbstractOperations
formatter
 
Constructor Summary
MythTemplate(org.springframework.web.client.RestOperations restOperations, java.lang.String apiUrlBase)
           
 
Method Summary
 org.springframework.http.ResponseEntity<Bool> addStorageGroupDir(java.lang.String groupName, java.lang.String directoryName, java.lang.String hostName)
          - POST
 org.springframework.http.ResponseEntity<Bool> backupDatabase()
          - POST
 org.springframework.http.ResponseEntity<Bool> changePassword(java.lang.String username, java.lang.String oldPassword, java.lang.String newPassword)
          - POST
 org.springframework.http.ResponseEntity<Bool> checkDatabase(boolean repair)
          - POST
protected  java.lang.String getApiUrlBase()
           
 org.springframework.http.ResponseEntity<ConnectionInfo> getConnectionInfo(java.lang.String pin, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<StringWrapper> getHostName()
          - GET
 org.springframework.http.ResponseEntity<StringList> getHosts(ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<StringList> getKeys(ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<LogMessageList> getLogs(java.lang.String hostname, java.lang.String application, int pid, int tid, java.lang.String thread, java.lang.String filename, int line, java.lang.String function, org.joda.time.DateTime from, org.joda.time.DateTime to, java.lang.String level, java.lang.String messageContains, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<SettingList> getSetting(java.lang.String hostname, java.lang.String key, java.lang.String defaultValue, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<StorageGroupDirectoryList> getStorageGroupDirectories(java.lang.String groupName, java.lang.String hostname, ETagInfo etag)
          - GET
 org.springframework.http.ResponseEntity<TimeZoneInfo> getTimeZoneInfo()
          - GET
 org.springframework.http.ResponseEntity<Bool> profileDelete()
          - POST
 org.springframework.http.ResponseEntity<Bool> profileSubmit()
          - POST
 org.springframework.http.ResponseEntity<StringWrapper> profileText()
          - GET
 org.springframework.http.ResponseEntity<StringWrapper> profileUpdated()
          - GET
 org.springframework.http.ResponseEntity<StringWrapper> profileUrl()
          - GET
 org.springframework.http.ResponseEntity<Bool> putSetting(java.lang.String hostname, java.lang.String key, java.lang.String value)
          - POST
 org.springframework.http.ResponseEntity<Bool> removeStorageGroupDir(java.lang.String groupName, java.lang.String directoryName, java.lang.String hostName)
          - POST
 org.springframework.http.ResponseEntity<Bool> sendMessage(java.lang.String message, java.lang.String address, int udpPort, int timeout)
          - GET
 org.springframework.http.ResponseEntity<Bool> testDatabaseSettings(java.lang.String hostname, java.lang.String username, java.lang.String password, java.lang.String databaseName, int databasePort)
          - POST
 
Methods inherited from class org.mythtv.services.api.AbstractOperations
buildUri, buildUri, buildUri, convertUtcAndFormat, getRequestEntity, handleResponseEtag, setLogLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MythTemplate

public MythTemplate(org.springframework.web.client.RestOperations restOperations,
                    java.lang.String apiUrlBase)
Method Detail

addStorageGroupDir

public org.springframework.http.ResponseEntity<Bool> addStorageGroupDir(java.lang.String groupName,
                                                                        java.lang.String directoryName,
                                                                        java.lang.String hostName)
                                                                 throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- POST

Specified by:
addStorageGroupDir in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

backupDatabase

public org.springframework.http.ResponseEntity<Bool> backupDatabase()
                                                             throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- POST

Specified by:
backupDatabase in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

changePassword

public org.springframework.http.ResponseEntity<Bool> changePassword(java.lang.String username,
                                                                    java.lang.String oldPassword,
                                                                    java.lang.String newPassword)
                                                             throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- POST

Specified by:
changePassword in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

checkDatabase

public org.springframework.http.ResponseEntity<Bool> checkDatabase(boolean repair)
                                                            throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- POST

Specified by:
checkDatabase in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

getConnectionInfo

public org.springframework.http.ResponseEntity<ConnectionInfo> getConnectionInfo(java.lang.String pin,
                                                                                 ETagInfo etag)
                                                                          throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- GET

Specified by:
getConnectionInfo in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

getHostName

public org.springframework.http.ResponseEntity<StringWrapper> getHostName()
                                                                   throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- GET

Specified by:
getHostName in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

getHosts

public org.springframework.http.ResponseEntity<StringList> getHosts(ETagInfo etag)
                                                             throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- GET

Specified by:
getHosts in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

getKeys

public org.springframework.http.ResponseEntity<StringList> getKeys(ETagInfo etag)
                                                            throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- GET

Specified by:
getKeys in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

getLogs

public org.springframework.http.ResponseEntity<LogMessageList> getLogs(java.lang.String hostname,
                                                                       java.lang.String application,
                                                                       int pid,
                                                                       int tid,
                                                                       java.lang.String thread,
                                                                       java.lang.String filename,
                                                                       int line,
                                                                       java.lang.String function,
                                                                       org.joda.time.DateTime from,
                                                                       org.joda.time.DateTime to,
                                                                       java.lang.String level,
                                                                       java.lang.String messageContains,
                                                                       ETagInfo etag)
                                                                throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- GET

Specified by:
getLogs in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

getSetting

public org.springframework.http.ResponseEntity<SettingList> getSetting(java.lang.String hostname,
                                                                       java.lang.String key,
                                                                       java.lang.String defaultValue,
                                                                       ETagInfo etag)
                                                                throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- GET

Specified by:
getSetting in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

getStorageGroupDirectories

public org.springframework.http.ResponseEntity<StorageGroupDirectoryList> getStorageGroupDirectories(java.lang.String groupName,
                                                                                                     java.lang.String hostname,
                                                                                                     ETagInfo etag)
                                                                                              throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- GET

Specified by:
getStorageGroupDirectories in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

getTimeZoneInfo

public org.springframework.http.ResponseEntity<TimeZoneInfo> getTimeZoneInfo()
                                                                      throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- GET

Specified by:
getTimeZoneInfo in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

profileDelete

public org.springframework.http.ResponseEntity<Bool> profileDelete()
                                                            throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- POST

Specified by:
profileDelete in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

profileSubmit

public org.springframework.http.ResponseEntity<Bool> profileSubmit()
                                                            throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- POST

Specified by:
profileSubmit in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

profileText

public org.springframework.http.ResponseEntity<StringWrapper> profileText()
                                                                   throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- GET

Specified by:
profileText in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

profileUrl

public org.springframework.http.ResponseEntity<StringWrapper> profileUrl()
                                                                  throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- GET

Specified by:
profileUrl in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

profileUpdated

public org.springframework.http.ResponseEntity<StringWrapper> profileUpdated()
                                                                      throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- GET

Specified by:
profileUpdated in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

putSetting

public org.springframework.http.ResponseEntity<Bool> putSetting(java.lang.String hostname,
                                                                java.lang.String key,
                                                                java.lang.String value)
                                                         throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- POST

Specified by:
putSetting in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

removeStorageGroupDir

public org.springframework.http.ResponseEntity<Bool> removeStorageGroupDir(java.lang.String groupName,
                                                                           java.lang.String directoryName,
                                                                           java.lang.String hostName)
                                                                    throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- POST

Specified by:
removeStorageGroupDir in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

sendMessage

public org.springframework.http.ResponseEntity<Bool> sendMessage(java.lang.String message,
                                                                 java.lang.String address,
                                                                 int udpPort,
                                                                 int timeout)
                                                          throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- GET

Specified by:
sendMessage in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

testDatabaseSettings

public org.springframework.http.ResponseEntity<Bool> testDatabaseSettings(java.lang.String hostname,
                                                                          java.lang.String username,
                                                                          java.lang.String password,
                                                                          java.lang.String databaseName,
                                                                          int databasePort)
                                                                   throws MythServiceApiRuntimeException
Description copied from interface: MythOperations
- POST

Specified by:
testDatabaseSettings in interface MythOperations
Returns:
Throws:
MythServiceApiRuntimeException

getApiUrlBase

protected java.lang.String getApiUrlBase()
Overrides:
getApiUrlBase in class AbstractOperations
Returns: