1 18 package org.apache.beehive.netui.pageflow.config; 19 20 import org.apache.struts.action.ActionForward; 21 22 import java.util.ArrayList ; 23 import java.io.Serializable ; 24 25 26 29 public class PageFlowActionForward extends ActionForward 30 { 31 private boolean _isNestedReturn; 32 private boolean _isReturnToPage; 33 private boolean _isReturnToAction; 34 private String _returnFormType; 35 private String _returnFormMember; 36 private boolean _hasExplicitRedirectValue; 37 private ArrayList _actionOutputs; 38 private boolean _restoreQueryString; 39 private boolean _externalRedirect = false; 40 41 42 public boolean isNestedReturn() 43 { 44 return _isNestedReturn; 45 } 46 47 public void setNestedReturn( boolean nestedReturn ) 48 { 49 _isNestedReturn = nestedReturn; 50 } 51 52 public boolean isReturnToPage() 53 { 54 return _isReturnToPage; 55 } 56 57 public void setReturnToPage( boolean returnToPage ) 58 { 59 _isReturnToPage = returnToPage; 60 } 61 62 public boolean isReturnToAction() 63 { 64 return _isReturnToAction; 65 } 66 67 public void setReturnToAction( boolean returnToAction ) 68 { 69 _isReturnToAction = returnToAction; 70 } 71 72 public String getReturnFormType() 73 { 74 return _returnFormType; 75 } 76 77 public void setReturnFormType( String returnFormType ) 78 { 79 _returnFormType = returnFormType; 80 } 81 82 public String getReturnFormMember() 83 { 84 return _returnFormMember; 85 } 86 87 public void setReturnFormMember( String returnFormMember ) 88 { 89 _returnFormMember = returnFormMember; 90 } 91 92 public boolean hasExplicitRedirectValue() 93 { 94 return _hasExplicitRedirectValue; 95 } 96 97 public void setHasExplicitRedirectValue( boolean hasExplicitRedirectValue ) 98 { 99 _hasExplicitRedirectValue = hasExplicitRedirectValue; 100 } 101 102 public boolean isRestoreQueryString() 103 { 104 return _restoreQueryString; 105 } 106 107 public void setRestoreQueryString( boolean restoreQueryString ) 108 { 109 _restoreQueryString = restoreQueryString; 110 } 111 112 public boolean isExternalRedirect() 113 { 114 return _externalRedirect; 115 } 116 117 public void setExternalRedirect(boolean externalRedirect) 118 { 119 _externalRedirect = externalRedirect; 120 } 121 122 public static class ActionOutput implements Serializable 123 { 124 private String _name; 125 private String _type; 126 private boolean _isNullable; 127 128 public ActionOutput( String name, String type, boolean isNullable ) 129 { 130 _name = name; 131 _type = type; 132 _isNullable = isNullable; 133 } 134 135 public String getName() 136 { 137 return _name; 138 } 139 140 public String getType() 141 { 142 return _type; 143 } 144 145 public boolean getNullable() 146 { 147 return _isNullable; 148 } 149 } 150 151 public void setActionOutputCount( String count ) 152 { 153 setActionOutputCount( Integer.parseInt( count ) ); 154 } 155 156 public String getActionOutputCount() 157 { 158 return new Integer ( _actionOutputs != null ? _actionOutputs.size() : 0 ).toString(); 159 } 160 161 public void setActionOutputCount( int count ) 162 { 163 if ( _actionOutputs == null ) 164 { 165 _actionOutputs = new ArrayList ( count ); 166 } 167 else 168 { 169 _actionOutputs.ensureCapacity( count ); 170 } 171 172 while ( _actionOutputs.size() < count ) 173 { 174 _actionOutputs.add( null ); 175 } 176 } 177 178 protected void setActionOutput( int n, String concatenatedVals ) 179 { 180 setActionOutputCount( n + 1 ); 181 String [] vals = concatenatedVals.split( "\\|" ); 182 assert vals.length == 3 : vals.length; 183 _actionOutputs.set( n, new ActionOutput( vals[2], vals[0], Boolean.valueOf( vals[1] ).booleanValue() ) ); 184 } 185 186 public ActionOutput[] getActionOutputs() 187 { 188 if ( _actionOutputs == null ) 189 { 190 return new ActionOutput[0]; 191 } 192 193 return ( ActionOutput[] ) _actionOutputs.toArray( new ActionOutput[ _actionOutputs.size() ] ); 194 } 195 196 public void setActionOutput0( String str ) 197 { 198 setActionOutput( 0, str ); 199 } 200 201 public void setActionOutput1( String str ) 202 { 203 setActionOutput( 1, str ); 204 } 205 206 public void setActionOutput2( String str ) 207 { 208 setActionOutput( 2, str ); 209 } 210 211 public void setActionOutput3( String str ) 212 { 213 setActionOutput( 3, str ); 214 } 215 216 public void setActionOutput4( String str ) 217 { 218 setActionOutput( 4, str ); 219 } 220 221 public void setActionOutput5( String str ) 222 { 223 setActionOutput( 5, str ); 224 } 225 226 public void setActionOutput6( String str ) 227 { 228 setActionOutput( 6, str ); 229 } 230 231 public void setActionOutput7( String str ) 232 { 233 setActionOutput( 7, str ); 234 } 235 236 public void setActionOutput8( String str ) 237 { 238 setActionOutput( 8, str ); 239 } 240 241 public void setActionOutput9( String str ) 242 { 243 setActionOutput( 9, str ); 244 } 245 246 public void setActionOutput10( String str ) 247 { 248 setActionOutput( 10, str ); 249 } 250 251 public void setActionOutput11( String str ) 252 { 253 setActionOutput( 11, str ); 254 } 255 256 public void setActionOutput12( String str ) 257 { 258 setActionOutput( 12, str ); 259 } 260 261 public void setActionOutput13( String str ) 262 { 263 setActionOutput( 13, str ); 264 } 265 266 public void setActionOutput14( String str ) 267 { 268 setActionOutput( 14, str ); 269 } 270 271 public void setActionOutput15( String str ) 272 { 273 setActionOutput( 15, str ); 274 } 275 276 public void setActionOutput16( String str ) 277 { 278 setActionOutput( 16, str ); 279 } 280 281 public void setActionOutput17( String str ) 282 { 283 setActionOutput( 17, str ); 284 } 285 286 public void setActionOutput18( String str ) 287 { 288 setActionOutput( 18, str ); 289 } 290 291 public void setActionOutput19( String str ) 292 { 293 setActionOutput( 19, str ); 294 } 295 } 296 | Popular Tags |