001package org.nuxeo.project.sample; 002 003import java.io.Serializable; 004import java.util.ArrayList; 005import java.util.Collections; 006import java.util.List; 007 008public class BookWorkflowTask implements Serializable { 009 010 private static final long serialVersionUID = 1L; 011 012 protected List<String> actors; 013 014 protected String newTitle; 015 016 public BookWorkflowTask() { 017 } 018 019 public BookWorkflowTask(List<String> actors) { 020 this.actors = actors; 021 } 022 023 public BookWorkflowTask(String actor) { 024 actors = Collections.singletonList(actor); 025 } 026 027 public BookWorkflowTask(List<String> actors, String newTitle) { 028 this.actors = actors; 029 this.newTitle = newTitle; 030 } 031 032 public BookWorkflowTask(String actor, String newTitle) { 033 this.actors = Collections.singletonList(actor); 034 this.newTitle = newTitle; 035 } 036 037 public List<String> getActors() { 038 if (actors == null) { 039 actors = new ArrayList<String>(); 040 } 041 return actors; 042 } 043 044 public void setActors(List<String> actors) { 045 this.actors = actors; 046 } 047 048 public String getDirective() { 049 return newTitle; 050 } 051 052 public void setDirective(String directive) { 053 this.newTitle = directive; 054 } 055 056}