PlayerService

com.j0h1.contour.server.rest

## Class PlayerService

- java.lang.Object
- - com.j0h1.contour.server.rest.PlayerService

-     public class PlayerService
      extends java.lang.Object

  The methods of this service class are invoked by requesting the defined URL paths. The response of this service is always a single Player object.
  Author:
    Johannes Riedmann

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PlayerService()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Player` | `findPlayerByPhoneId(java.lang.String phoneId)` This method responds to it's specified path by generating a XML document containing the Player object that is assigned to the given phoneId.
    `Player` | `persist(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> formParam)` This method responds to it's specified path by generating a XML document containing the Player object that was persisted to the database.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PlayerService

          public PlayerService()

  - ### Method Detail

    - #### findPlayerByPhoneId

          public Player findPlayerByPhoneId(java.lang.String phoneId)

      This method responds to it's specified path by generating a XML document containing the Player object that is assigned to the given phoneId.
      Parameters:
        `phoneId` - Unique Android device identifier that identifies a phone.
      Returns:
        Responds with a Player object, mapped to a XML document. If no player was found, the XML document only contains an empty player object.

    - #### persist

          public Player persist(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> formParam)

      This method responds to it's specified path by generating a XML document containing the Player object that was persisted to the database.
      Parameters:
        `formParam` - Parameters that are passed to this request. In this case the player name and the phoneId that have to be persisted.
      Returns:
        Responds with a Player object, mapped to a XML document. If the player could not be persisted, the XML document only contains an empty player object.