// Path: rest-server/src/main/java/com/readlearncode/dukesbookshop/restserver/infrastructure/AuthorRepository.java
// public interface AuthorRepository {
// 
//     Author saveAuthor(final Author author);
// 
//     Author deleteAuthor(final String id);
// 
//     List<Author> getAll();
// 
//     Optional<Author> getById(String id);
// 
//     List<Author> saveAuthors(List<Author> authors);
// }


import com.readlearncode.dukesbookshop.restserver.infrastructure.AuthorRepository;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
package com.readlearncode.dukesbookshop.restserver.rest;



/**
 * Source code github.com/readlearncode
 *
 * @author Alex Theedom www.readlearncode.com
 * @version 1.0
 */
@Stateless
@Path("/authors")
public class AuthorResource {

    @EJB
// Path: rest-server/src/main/java/com/readlearncode/dukesbookshop/restserver/infrastructure/AuthorRepository.java
// public interface AuthorRepository {
// 
//     Author saveAuthor(final Author author);
// 
//     Author deleteAuthor(final String id);
// 
//     List<Author> getAll();
// 
//     Optional<Author> getById(String id);
// 
//     List<Author> saveAuthors(List<Author> authors);
// }


// Path: rest-server/src/main/java/com/readlearncode/dukesbookshop/restserver/rest/AuthorResource.java
import com.readlearncode.dukesbookshop.restserver.infrastructure.AuthorRepository;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

package com.readlearncode.dukesbookshop.restserver.rest;



/**
 * Source code github.com/readlearncode
 *
 * @author Alex Theedom www.readlearncode.com
 * @version 1.0
 */
@Stateless
@Path("/authors")
public class AuthorResource {

    @EJB
    private AuthorRepository authorRepository;