1 package org.apache.slide.projector; 2 3 import java.util.HashMap ; 4 import java.util.Map ; 5 6 import org.apache.slide.projector.descriptor.StateDescriptor; 7 import org.apache.slide.projector.value.Value; 8 9 public class Result { 10 public final static Result OK = new Result(StateDescriptor.OK); 11 12 protected String state; 13 protected Map resultEntries; 14 15 public Result(String state) { 16 this.state = state; 17 resultEntries = new HashMap (); 18 } 19 20 public Result(String state, String key, Value resource) { 21 this(state); 22 addResultEntry(key, resource); 23 } 24 25 public Result(String state, Map resultEntries) { 26 this.state = state; 27 this.resultEntries = resultEntries; 28 } 29 30 public void setState(String state) { 31 this.state = state; 32 } 33 34 public String getState() { 35 return state; 36 } 37 38 public Map getResultEntries() { 39 return resultEntries; 40 } 41 42 public void addResultEntry(String key, Value resource) { 43 resultEntries.put(key, resource); 44 } 45 } | Popular Tags |