// Path: airomem-chatsample/airomem-chatsample-view/src/main/java/pl/setblack/airomem/chatsample/execute/ChatController.java
// @Local
// public interface ChatController {
// 
//     void addMessage(String nick, String message);
// 
//     List<MessageView> getRecentMessages();
// 
// }
// 
// Path: airomem-chatsample/airomem-chatsample-view/src/main/java/pl/setblack/airomem/chatsample/view/MessageView.java
// @XmlRootElement
// public interface MessageView {
// 
//     @XmlElement
//     String getContent();
//     
//     @XmlElement
//     AuthorView getAuthorView();
//     
//     @XmlAttribute
//     LocalDateTime getTime();
//     
//     String getAuthorNick();
// }


import java.util.List;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.UriInfo;
import pl.setblack.airomem.chatsample.execute.ChatController;
import pl.setblack.airomem.chatsample.view.MessageView;
/*
 *  Created by Jarek Ratajski
 */
package pl.setblack.chatsample.web;


/**
 * REST Web Service
 *
 * @author jarek ratajski
 */
@Path("chat")
@RequestScoped
public class ChatService {

    @Context
    private UriInfo context;

    @Inject
    private ChatController chatBean;

    /**
     * Creates a new instance of ChatService
     */
    public ChatService() {
    }

    /**
     * Retrieves representation of an instance of
     * pl.setblack.chatsample.web.ChatService
     *
     * @return an instance of java.lang.String
     */
    @GET
    @Produces("application/json")
// Path: airomem-chatsample/airomem-chatsample-view/src/main/java/pl/setblack/airomem/chatsample/execute/ChatController.java
// @Local
// public interface ChatController {
// 
//     void addMessage(String nick, String message);
// 
//     List<MessageView> getRecentMessages();
// 
// }
// 
// Path: airomem-chatsample/airomem-chatsample-view/src/main/java/pl/setblack/airomem/chatsample/view/MessageView.java
// @XmlRootElement
// public interface MessageView {
// 
//     @XmlElement
//     String getContent();
//     
//     @XmlElement
//     AuthorView getAuthorView();
//     
//     @XmlAttribute
//     LocalDateTime getTime();
//     
//     String getAuthorNick();
// }


// Path: airomem-chatsample/airomem-chatsample-web/src/main/java/pl/setblack/chatsample/web/ChatService.java
import java.util.List;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.UriInfo;
import pl.setblack.airomem.chatsample.execute.ChatController;
import pl.setblack.airomem.chatsample.view.MessageView;

/*
 *  Created by Jarek Ratajski
 */
package pl.setblack.chatsample.web;


/**
 * REST Web Service
 *
 * @author jarek ratajski
 */
@Path("chat")
@RequestScoped
public class ChatService {

    @Context
    private UriInfo context;

    @Inject
    private ChatController chatBean;

    /**
     * Creates a new instance of ChatService
     */
    public ChatService() {
    }

    /**
     * Retrieves representation of an instance of
     * pl.setblack.chatsample.web.ChatService
     *
     * @return an instance of java.lang.String
     */
    @GET
    @Produces("application/json")
    public List<MessageView> getMessages() {