Betty v1.1.0

christophedelory.betty.servlet
Class PublicHttpServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
              extended by christophedelory.betty.servlet.PublicHttpServlet
All Implemented Interfaces:
BettyRemoteService, com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, Servlet, ServletConfig

public class PublicHttpServlet
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements BettyRemoteService

The public service implementation.

Since:
1.0.0
Version:
$Revision: 100 $
Author:
Christophe Delory
See Also:
Serialized Form

Field Summary
(package private) static PublicHttpServlet SINGLETON
          A package-private instance of this class.
 
Constructor Summary
PublicHttpServlet()
           
 
Method Summary
static LocalChampionship findChampionshipById(String championshipId)
          Retrieves the championship EJB object corresponding to the specified identifier.
 ChampionshipDetails getChampionship(String championshipId, String[] localeNames)
           
 ChampionshipsDetails getChampionships(boolean all, String[] localeNames)
           
 LocationsDetails getLocations(String[] localeNames)
           
 PlayersDetails getPlayers(String[] localeNames)
           
 ResourcesDetails getResources(String[] localeNames)
           
 String getServletInfo()
           
 UsersDetails getUsers(String[] localeNames)
           
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
doGetSerializationPolicy, doPost, doUnexpectedFailure, getSerializationPolicy, getThreadLocalRequest, getThreadLocalResponse, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, readContent, shouldCompressResponse
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SINGLETON

static final PublicHttpServlet SINGLETON
A package-private instance of this class.

Constructor Detail

PublicHttpServlet

public PublicHttpServlet()
Method Detail

findChampionshipById

public static LocalChampionship findChampionshipById(String championshipId)
                                              throws HttpServletException,
                                                     NamingException,
                                                     FinderException
Retrieves the championship EJB object corresponding to the specified identifier.

Parameters:
championshipId - the championship identifier. Shall not be null.
Returns:
the associated EJB object. Shall not be null.
Throws:
HttpServletException - if any applicative error occurs during the operation.
NamingException - if a naming exception is encountered.
FinderException - in case of failure to find any requested EJB object(s).
EJBException - if any exception occured during the execution of this method.

getServletInfo

public String getServletInfo()
Specified by:
getServletInfo in interface Servlet
Overrides:
getServletInfo in class GenericServlet

getChampionship

public ChampionshipDetails getChampionship(String championshipId,
                                           String[] localeNames)
                                    throws Exception
Specified by:
getChampionship in interface BettyRemoteService
Parameters:
championshipId - the championship identifier. Shall not be null.
localeNames - a list of the preferred locales for the output. Shall not be null nor empty.
Returns:
the championship description. Shall not be null.
Throws:
HttpServletException - if any applicative error occurs during the operation.
NamingException - if a naming exception is encountered.
FinderException - in case of failure to find any requested EJB object(s).
EJBException - if any exception occured during the execution of this method.
Exception

getChampionships

public ChampionshipsDetails getChampionships(boolean all,
                                             String[] localeNames)
                                      throws Exception
Specified by:
getChampionships in interface BettyRemoteService
Parameters:
all - true if each individual championship shall also be detailed, false if you just want to enumerate the list of available championships.
localeNames - a list of the preferred locales for the output. Shall not be null nor empty.
Returns:
the list of championship descriptions. Shall not be null.
Throws:
HttpServletException - if any applicative error occurs during the operation.
NamingException - if a naming exception is encountered.
FinderException - in case of failure to find any requested EJB object(s).
EJBException - if any exception occured during the execution of this method.
Exception

getLocations

public LocationsDetails getLocations(String[] localeNames)
                              throws Exception
Specified by:
getLocations in interface BettyRemoteService
Parameters:
localeNames - a list of the preferred locales for the output. Shall not be null nor empty.
Returns:
the list of location descriptions. Shall not be null.
Throws:
HttpServletException - if any applicative error occurs during the operation.
NamingException - if a naming exception is encountered.
FinderException - in case of failure to find any requested EJB object(s).
EJBException - if any exception occured during the execution of this method.
Exception

getPlayers

public PlayersDetails getPlayers(String[] localeNames)
                          throws Exception
Specified by:
getPlayers in interface BettyRemoteService
Parameters:
localeNames - a list of the preferred locales for the output. Shall not be null nor empty.
Returns:
the list of player descriptions. Shall not be null.
Throws:
HttpServletException - if any applicative error occurs during the operation.
NamingException - if a naming exception is encountered.
FinderException - in case of failure to find any requested EJB object(s).
EJBException - if any exception occured during the execution of this method.
Exception

getResources

public ResourcesDetails getResources(String[] localeNames)
                              throws Exception
Specified by:
getResources in interface BettyRemoteService
Parameters:
localeNames - a list of the preferred locales for the output. Shall not be null nor empty.
Returns:
the list of resource descriptions. Shall not be null.
Throws:
HttpServletException - if any applicative error occurs during the operation.
NamingException - if a naming exception is encountered.
FinderException - in case of failure to find any requested EJB object(s).
EJBException - if any exception occured during the execution of this method.
Exception

getUsers

public UsersDetails getUsers(String[] localeNames)
                      throws Exception
Specified by:
getUsers in interface BettyRemoteService
Parameters:
localeNames - a list of the preferred locales for the output. Shall not be null nor empty.
Returns:
the list of user descriptions. Shall not be null.
Throws:
HttpServletException - if any applicative error occurs during the operation.
NamingException - if a naming exception is encountered.
FinderException - in case of failure to find any requested EJB object(s).
EJBException - if any exception occured during the execution of this method.
Exception

© 2008-2009 Christophe Delory

Copyright © 2008-2009 Christophe Delory. All Rights Reserved.