package com.github.cstroe.sqs.www;

import com.github.cstroe.sqs.dao.NotebookDao;
import com.github.cstroe.sqs.repository.NotebookRepository;
import com.github.cstroe.sqs.repository.RepositoryFactory;
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.HandlesEvent;
import net.sourceforge.stripes.action.RedirectResolution;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.action.UrlBinding;

@UrlBinding("/app/notebook/{$event}")
public class NotebookActionBean extends BaseActionBean {
    private NotebookDao notebook = new NotebookDao();

    @DefaultHandler
    @HandlesEvent("new")
    public Resolution newNotebook() {
        return new ForwardResolution("/notes/addNotebook.jsp");
    }

    public Resolution create() {
        RepositoryFactory.notebook().save(notebook);
        return new RedirectResolution(NoteActionBean.class, "viewAll");
    }

    public NotebookDao getNotebook() {
        return notebook;
    }

    public void setNotebook(NotebookDao notebook) {
        this.notebook = notebook;
    }
}

@@ -620,14 +620,13 @@
    p
-rivate
+ublic
  Not
@@ -986,171 +986,7 @@
    %7D
-%0A%0A    public NotebookDao getNotebook() %7B%0A        return notebook;%0A    %7D%0A%0A    public void setNotebook(NotebookDao notebook) %7B%0A        this.notebook = notebook;%0A    %7D
 %0A%7D%0A

Remove useless getter/setter.