Class PublicRestService

Object
PublicRestService

@Path("/public") public class PublicRestService extends Object
Contains all rest calls that are available to the world, without authentication or authorization. You can find them at /karchangame/resources/public.
Author:
maartenl
  • Constructor Details

    • PublicRestService

      public PublicRestService()
  • Method Details

    • getEntityManager

      protected EntityManager getEntityManager()
      Returns the entity manager of JPA. This is defined in build/web/WEB-INF/classes/META-INF/persistence.xml.
      Returns:
      EntityManager
    • fortunes

      @GET @Path("fortunes") @Produces("application/json") public List<Fortune> fortunes()
      Returns a Fortune 100 of players on karchan. The URL: /karchangame/resources/public/fortunes.
      Returns:
      a list of fortunes
    • who

      @GET @Path("who") @Produces("application/json") public String who()
      Returns a List of people currently online. The URL: /karchangame/resources/public/who.
      Returns:
      List of PublicPersons.
    • setIdleUsersService

      public void setIdleUsersService(IdleUsersService idleUsersService)
    • news

      @GET @Path("news") @Produces("application/json") public List<News> news()
      Returns a List of news, recent first. The URL: /karchangame/resources/public/news.
      Returns:
      a list of news items.
    • status

      @GET @Path("status") @Produces("application/json") public String status()
      Returns a List of current active and paid up deputies. The URL: /karchangame/resources/public/status. Can produce application/json.
      Returns:
      a List of public deputies.
    • guilds

      @GET @Path("guilds") @Produces("application/json") public List<PublicGuild> guilds()
      Returns a list of Guilds. The URL: /karchangame/resources/public/guilds.
      Returns:
      List of Guilds
    • charactersheet

      @GET @Path("charactersheets/{name}") @Produces("application/json") public PublicPerson charactersheet(@PathParam("name") String name)
      Returns all the info of a character. The URL: /karchangame/resources/public/charactersheets/<name>.
      Parameters:
      name - the name of the character/player
      Returns:
      all person data that should be visible to the public.
    • setPersonBean

      public void setPersonBean(PersonService personService)
    • setBoardBean

      public void setBoardBean(BoardService boardService)
    • setPublicService

      public void setPublicService(PublicService publicService)