1 package com.atlassian.xwork;
2
3 import com.opensymphony.xwork.ActionInvocation;
4 import com.opensymphony.xwork.Action;
5
6 import java.lang.reflect.Method;
7
8 /**
9 * Utility interface for abstracting binary or API-incompatible aspects of different XWork versions.
10 */
11 public interface XWorkVersionSupport
12 {
13 /**
14 * Works around binary incompatibility of ActionInvocation#getAction between XWork 1.0 and 1.2.
15 *
16 * @param invocation the action invocation
17 * @return the associated action
18 */
19 Action extractAction(ActionInvocation invocation);
20
21 /**
22 * Works around missing ActionConfig#getMethod in Xwork 1.2.
23 *
24 * @param invocation the action invocation
25 * @return the associated action
26 * @throws NoSuchMethodException if a method could not be found for the action
27 */
28 Method extractMethod(ActionInvocation invocation) throws NoSuchMethodException;
29 }