Class PublicRestService
Object
PublicRestService
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncharactersheet
(String name) Returns all the info of a character.fortunes()
Returns a Fortune 100 of players on karchan.protected EntityManager
Returns the entity manager of JPA.guilds()
Returns a list of Guilds.news()
Returns a List of news, recent first.void
setBoardBean
(BoardService boardService) void
setIdleUsersService
(IdleUsersService idleUsersService) void
setPersonBean
(PersonService personService) void
setPublicService
(PublicService publicService) status()
Returns a List of current active and paid up deputies.who()
Returns a List of people currently online.
-
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
-
who
Returns a List of people currently online. The URL: /karchangame/resources/public/who.- Returns:
- List of PublicPersons.
-
setIdleUsersService
-
news
-
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
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
-
setBoardBean
-
setPublicService
-