1 18 package org.alfresco.web.config; 19 20 28 public class NavigationResult 29 { 30 private String result; 31 private boolean isOutcome = true; 32 33 39 public NavigationResult(String viewId, String outcome) 40 { 41 if (viewId != null && outcome != null) 42 { 43 throw new IllegalStateException ("You can not have both a to-view-id and to-outcome"); 44 } 45 46 if (outcome != null) 47 { 48 this.result = outcome; 49 } 50 else if (viewId != null) 51 { 52 this.result = viewId; 53 this.isOutcome = false; 54 } 55 } 56 57 62 public String getResult() 63 { 64 return this.result; 65 } 66 67 73 public boolean isOutcome() 74 { 75 return this.isOutcome; 76 } 77 78 81 public String toString() 82 { 83 StringBuilder buffer = new StringBuilder (super.toString()); 84 buffer.append(" (result=").append(this.result); 85 buffer.append(" isOutcome=").append(this.isOutcome).append(")"); 86 return buffer.toString(); 87 } 88 } 89 | Popular Tags |