| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.rice.kew.web; |
| 17 | |
|
| 18 | |
import javax.servlet.http.HttpServletRequest; |
| 19 | |
import javax.servlet.http.HttpServletResponse; |
| 20 | |
|
| 21 | |
import org.apache.struts.action.ActionForm; |
| 22 | |
import org.apache.struts.action.ActionForward; |
| 23 | |
import org.apache.struts.action.ActionMapping; |
| 24 | |
import org.kuali.rice.kew.api.KewApiConstants; |
| 25 | |
import org.kuali.rice.kns.web.struts.action.KualiAction; |
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | 0 | public abstract class KewKualiAction extends KualiAction { |
| 34 | |
|
| 35 | |
public static final String DEFAULT_MAPPING = "basic"; |
| 36 | |
|
| 37 | |
@Override |
| 38 | |
protected String getReturnLocation(HttpServletRequest request, ActionMapping mapping) |
| 39 | |
{ |
| 40 | 0 | String mappingPath = mapping.getPath(); |
| 41 | 0 | String basePath = getApplicationBaseUrl(); |
| 42 | 0 | return basePath + KewApiConstants.WEBAPP_DIRECTORY + mappingPath + ".do"; |
| 43 | |
} |
| 44 | |
|
| 45 | |
@Override |
| 46 | |
protected ActionForward defaultDispatch(ActionMapping mapping, |
| 47 | |
ActionForm form, HttpServletRequest request, |
| 48 | |
HttpServletResponse response) throws Exception { |
| 49 | 0 | return start(mapping, form, request, response); |
| 50 | |
} |
| 51 | |
|
| 52 | |
public ActionForward start(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { |
| 53 | 0 | return mapping.findForward(getDefaultMapping()); |
| 54 | |
} |
| 55 | |
|
| 56 | |
protected String getDefaultMapping() { |
| 57 | 0 | return DEFAULT_MAPPING; |
| 58 | |
} |
| 59 | |
|
| 60 | |
} |