1 18 package org.apache.beehive.netui.pageflow.config; 19 20 import org.apache.struts.action.ActionMapping; 21 22 import java.util.Map ; 23 import java.util.LinkedHashMap ; 24 25 26 29 public class PageFlowActionMapping extends ActionMapping 30 { 31 private String _unqualifiedActionPath; 32 private boolean _loginRequired = false; 33 private boolean _preventDoubleSubmit = false; 34 private boolean _simpleAction = false; 35 private boolean _isOverloaded = false; 36 private String _formMember; 37 private String _formClass; private boolean _readonly = false; 39 private Map _conditionalForwards = new LinkedHashMap (); 40 private String _formBeanMessageResourcesKey; 41 private String _defaultForward; 42 43 44 public String getUnqualifiedActionPath() 45 { 46 return _unqualifiedActionPath; 47 } 48 49 public final void setUnqualifiedActionPath( String unqualifiedActionPath ) 50 { 51 _unqualifiedActionPath = unqualifiedActionPath; 52 } 53 54 public final String getUnqualifiedActionName() 55 { 56 if ( _unqualifiedActionPath != null && _unqualifiedActionPath.startsWith( "/" ) ) 57 { 58 return _unqualifiedActionPath.substring( 1 ); 59 } 60 else 61 { 62 return _unqualifiedActionPath; 63 } 64 } 65 66 public final boolean isLoginRequired() 67 { 68 return _loginRequired; 69 } 70 71 public void setLoginRequired( boolean loginRequired ) 72 { 73 _loginRequired = loginRequired; 74 } 75 76 public boolean isPreventDoubleSubmit() 77 { 78 return _preventDoubleSubmit; 79 } 80 81 public void setPreventDoubleSubmit( boolean preventDoubleSubmit ) 82 { 83 _preventDoubleSubmit = preventDoubleSubmit; 84 } 85 86 public boolean isSimpleAction() 87 { 88 return _simpleAction; 89 } 90 91 public void setSimpleAction( boolean simpleAction ) 92 { 93 _simpleAction = simpleAction; 94 } 95 96 public boolean isOverloaded() 97 { 98 return _isOverloaded; 99 } 100 101 public void setOverloaded( boolean overloaded ) 102 { 103 _isOverloaded = overloaded; 104 } 105 106 public String getFormMember() 107 { 108 return _formMember; 109 } 110 111 public void setFormMember( String formMember ) 112 { 113 _formMember = formMember; 114 } 115 116 public String getFormClass() 117 { 118 return _formClass; 119 } 120 121 public void setFormClass( String formClass ) 122 { 123 _formClass = formClass; 124 } 125 126 public boolean isReadonly() 127 { 128 return _readonly; 129 } 130 131 public void setReadonly( boolean readonly ) 132 { 133 _readonly = readonly; 134 } 135 136 public void setConditionalForwards( String conditionalForwards ) 137 { 138 String [] pairs = conditionalForwards.split( ";" ); 139 140 for ( int i = 0; i < pairs.length; i++ ) 141 { 142 String pair = pairs[i]; 143 int delim = pair.indexOf( ':' ); 144 assert delim != -1 : pair; 145 String forwardName = pair.substring( 0, delim ); 146 String expression = pair.substring( delim + 1 ); 147 _conditionalForwards.put( expression, forwardName ); 148 } 149 } 150 151 154 public Map getConditionalForwardsMap() 155 { 156 return _conditionalForwards; 157 } 158 159 public String getFormBeanMessageResourcesKey() 160 { 161 return _formBeanMessageResourcesKey; 162 } 163 164 public void setFormBeanMessageResourcesKey( String formBeanMessageResourcesKey ) 165 { 166 _formBeanMessageResourcesKey = formBeanMessageResourcesKey; 167 } 168 169 public String getDefaultForward() 170 { 171 return _defaultForward; 172 } 173 174 public void setDefaultForward( String defaultForward ) 175 { 176 _defaultForward = defaultForward; 177 } 178 } 179 | Popular Tags |