net.sf.opensmus
Interface ServerObject

All Known Implementing Classes:
MUSServer

public interface ServerObject

Interface representing the OpenSMUS server instance.
ServerSideScript classes can use the serverObject() method to retrieve a pointer to a ServerObject.


Method Summary
 ServerMovie createServerMovie(java.lang.String moviename)
          Creates a new movie on the server and returns a pointer to it.
 void deleteServerMovie(java.lang.String moviename)
          Deletes a movie from the server.
 ServerMovie getServerMovie(int movieidx)
          Retrieves a pointer to a ServerMovie object active on the server.
 ServerMovie getServerMovie(java.lang.String moviename)
          Retrieves a pointer to a ServerMovie object active on the server.
 ServerUserDatabase getServerUserDatabase()
          Returns a pointer to the ServerUserDatabase interface representing the default user authentication table.
 SQLGateway getSQLGateway()
          Returns a pointer to the SQLGateway interface representing the default SQL connection.
 int language()
          This method is reserved.
 java.lang.String path()
          Gets the path of the server executable in the system
 void put(java.lang.String msg)
          Displays a message to the server active output (log file or terminal window)
 int serverMovieCount()
          Gets the number of active movies in the server.
 void setuserLevel(int level)
          Sets the default user levels for users that connect to the server and do not have a user account in the DB.
 int timeStamp()
          Gets the current server time as an int
 java.lang.String timeString()
          Gets the current server time formatted as a String
 int userLevel()
          Gets the default user levels for users that connect to the server and do not have a user account in the DB.
 

Method Detail

put

void put(java.lang.String msg)
Displays a message to the server active output (log file or terminal window)


getServerMovie

ServerMovie getServerMovie(java.lang.String moviename)
                           throws MovieNotFoundException
Retrieves a pointer to a ServerMovie object active on the server.

Parameters:
moviename - String with the name of the movie to be returned
Returns:
ServerMovie pointer, or throws a MovieNotFoundException
Throws:
MovieNotFoundException

getServerMovie

ServerMovie getServerMovie(int movieidx)
                           throws MovieNotFoundException
Retrieves a pointer to a ServerMovie object active on the server.

Parameters:
movieidx - index of the movie to be returned
Returns:
ServerMovie pointer, or throws a MovieNotFoundException
Throws:
MovieNotFoundException

createServerMovie

ServerMovie createServerMovie(java.lang.String moviename)
                              throws MUSErrorCode
Creates a new movie on the server and returns a pointer to it.

Parameters:
moviename - String with the name of the movie to be created
Returns:
ServerMovie pointer, or throws a MUSErrorCode if the creation fails
Throws:
MUSErrorCode

deleteServerMovie

void deleteServerMovie(java.lang.String moviename)
Deletes a movie from the server.

Parameters:
moviename - String with the name of the movie to be deleted

serverMovieCount

int serverMovieCount()
Gets the number of active movies in the server.

Returns:
the number of movies

path

java.lang.String path()
Gets the path of the server executable in the system


timeString

java.lang.String timeString()
Gets the current server time formatted as a String


timeStamp

int timeStamp()
Gets the current server time as an int


language

int language()
This method is reserved. Current implementation returns 0 for the English version of OpenSMUS.


userLevel

int userLevel()
Gets the default user levels for users that connect to the server and do not have a user account in the DB.
This value can be configured by the DefaultUserLevel directive in OpenSMUS.cfg.


setuserLevel

void setuserLevel(int level)
Sets the default user levels for users that connect to the server and do not have a user account in the DB.
When this method is used it overrides the value configured by the DefaultUserLevel directive in OpenSMUS.cfg.


getSQLGateway

SQLGateway getSQLGateway()
Returns a pointer to the SQLGateway interface representing the default SQL connection.
Please consult the documentation of SQLGateway for more information.


getServerUserDatabase

ServerUserDatabase getServerUserDatabase()
Returns a pointer to the ServerUserDatabase interface representing the default user authentication table.
Please consult the documentation of ServerUserDatabase for more information.