Commits

Anonymous committed a2f8e7d

XW-195: Making static constants for component manager keys

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@314e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits 2499bcb

Comments (0)

Files changed (2)

src/java/com/opensymphony/xwork/interceptor/component/ComponentInterceptor.java

  * @version $Revision$
  */
 public class ComponentInterceptor extends AroundInterceptor {
+    //~ Static fields/initializers /////////////////////////////////////////////
+
+    public static final String COMPONENT_MANAGER = "com.opensymphony.xwork.interceptor.component.ComponentManager";
+
     //~ Methods ////////////////////////////////////////////////////////////////
 
     protected void after(ActionInvocation dispatcher, String result) throws Exception {
     }
 
     protected void before(ActionInvocation dispatcher) throws Exception {
-        ComponentManager container = (ComponentManager) ActionContext.getContext().get("com.opensymphony.xwork.interceptor.component.ComponentManager");
+        ComponentManager container = (ComponentManager) ActionContext.getContext().get(COMPONENT_MANAGER);
 
         if (container != null) {
             container.initializeObject(dispatcher.getAction());

src/java/com/opensymphony/xwork/interceptor/component/ComponentManager.java

  * @version $Revision$
  */
 public interface ComponentManager {
+    //~ Instance fields ////////////////////////////////////////////////////////
+
+    String COMPONENT_MANAGER_KEY = "XWorkComponentManager";
+
     //~ Methods ////////////////////////////////////////////////////////////////
 
     Object getComponent(Class enablerType);