// Path: rest-client/src/main/java/com/readlearncode/dukesbookshop/restclient/AuthorService.java
// public interface AuthorService {
// 
//      List<Author> getAuthors();
// 
//      Author getAuthor(String id);
// 
// }
// 
// Path: rest-client/src/main/java/com/readlearncode/dukesbookshop/domain/Author.java
// public class Author implements Serializable {
// 
//     private String id;
//     private String firstName;
//     private String lastName;
//     private String blogURL;
// 
//     public Author(){}
// 
//     public Author(String firstName, String lastName){
//         this.id = UUID.randomUUID().toString();
//         this.firstName = firstName;
//         this.lastName = lastName;
//     }
// 
//     public Author(String firstName, String lastName, String blogURL){
//         this(firstName, lastName);
//         this.blogURL = blogURL;
//     }
// 
//     public Author(String id, String firstName, String lastName, String blogURL){
//         this(firstName, lastName, blogURL);
//         this.id = id;
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public void setId(String id) {
//         this.id = id;
//     }
// 
//     public String getFirstName() {
//         return firstName;
//     }
// 
//     public void setFirstName(String firstName) {
//         this.firstName = firstName;
//     }
// 
//     public String getLastName() {
//         return lastName;
//     }
// 
//     public void setLastName(String lastName) {
//         this.lastName = lastName;
//     }
// 
//     public String getBlogURL() {
//         return blogURL;
//     }
// 
//     public void setBlogURL(String blogURL) {
//         this.blogURL = blogURL;
//     }
// 
//     @Override
//     public String toString() {
//         return "Author{" +
//                 "id='" + id + '\'' +
//                 ", firstName='" + firstName + '\'' +
//                 ", lastName='" + lastName + '\'' +
//                 ", blogURL='" + blogURL + '\'' +
//                 '}';
//     }
// }


import com.readlearncode.dukesbookshop.restclient.AuthorService;
import com.readlearncode.dukesbookshop.domain.Author;
import javax.faces.view.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;
import java.io.Serializable;
package com.readlearncode.dukesbookshop.beans;



/**
 * Source code github.com/readlearncode
 *
 * @author Alex Theedom www.readlearncode.com
 * @version 1.0
 */
@Named
@ViewScoped
public class AuthorManager implements Serializable {

    private static final long serialVersionUID = 1;

    @Inject
    private AuthorService authorService;

    private String id;

// Path: rest-client/src/main/java/com/readlearncode/dukesbookshop/restclient/AuthorService.java
// public interface AuthorService {
// 
//      List<Author> getAuthors();
// 
//      Author getAuthor(String id);
// 
// }
// 
// Path: rest-client/src/main/java/com/readlearncode/dukesbookshop/domain/Author.java
// public class Author implements Serializable {
// 
//     private String id;
//     private String firstName;
//     private String lastName;
//     private String blogURL;
// 
//     public Author(){}
// 
//     public Author(String firstName, String lastName){
//         this.id = UUID.randomUUID().toString();
//         this.firstName = firstName;
//         this.lastName = lastName;
//     }
// 
//     public Author(String firstName, String lastName, String blogURL){
//         this(firstName, lastName);
//         this.blogURL = blogURL;
//     }
// 
//     public Author(String id, String firstName, String lastName, String blogURL){
//         this(firstName, lastName, blogURL);
//         this.id = id;
//     }
// 
//     public String getId() {
//         return id;
//     }
// 
//     public void setId(String id) {
//         this.id = id;
//     }
// 
//     public String getFirstName() {
//         return firstName;
//     }
// 
//     public void setFirstName(String firstName) {
//         this.firstName = firstName;
//     }
// 
//     public String getLastName() {
//         return lastName;
//     }
// 
//     public void setLastName(String lastName) {
//         this.lastName = lastName;
//     }
// 
//     public String getBlogURL() {
//         return blogURL;
//     }
// 
//     public void setBlogURL(String blogURL) {
//         this.blogURL = blogURL;
//     }
// 
//     @Override
//     public String toString() {
//         return "Author{" +
//                 "id='" + id + '\'' +
//                 ", firstName='" + firstName + '\'' +
//                 ", lastName='" + lastName + '\'' +
//                 ", blogURL='" + blogURL + '\'' +
//                 '}';
//     }
// }


// Path: rest-client/src/main/java/com/readlearncode/dukesbookshop/beans/AuthorManager.java
import com.readlearncode.dukesbookshop.restclient.AuthorService;
import com.readlearncode.dukesbookshop.domain.Author;
import javax.faces.view.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;
import java.io.Serializable;

package com.readlearncode.dukesbookshop.beans;



/**
 * Source code github.com/readlearncode
 *
 * @author Alex Theedom www.readlearncode.com
 * @version 1.0
 */
@Named
@ViewScoped
public class AuthorManager implements Serializable {

    private static final long serialVersionUID = 1;

    @Inject
    private AuthorService authorService;

    private String id;

    private Author author;