Author: tschneider
Date: Mon Nov 12 16:55:46 2007
New Revision: 594373
URL: http://svn.apache.org/viewvc?rev=594373&view=rev
Log:
adding additional legacy support classes
Added:
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/WebWorkStatics.java
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/interceptor/
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/interceptor/ServletRequestAware.java
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/interceptor/ServletResponseAware.java
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/interceptor/SessionAware.java
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/ActionInvocation.java
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/WrappedActionInvocation.java
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/interceptor/AroundInterceptor.java
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/interceptor/Interceptor.java
Modified:
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/ActionContext.java
Added:
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/WebWorkStatics.java
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/WebWorkStatics.java?rev=594373&view=auto
==============================================================================
---
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/WebWorkStatics.java
(added)
+++
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/WebWorkStatics.java
Mon Nov 12 16:55:46 2007
@@ -0,0 +1,6 @@
+package com.opensymphony.webwork;
+
+import org.apache.struts2.StrutsStatics;
+
+public interface WebWorkStatics extends StrutsStatics {
+}
Added:
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/interceptor/ServletRequestAware.java
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/interceptor/ServletRequestAware.java?rev=594373&view=auto
==============================================================================
---
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/interceptor/ServletRequestAware.java
(added)
+++
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/interceptor/ServletRequestAware.java
Mon Nov 12 16:55:46 2007
@@ -0,0 +1,5 @@
+package com.opensymphony.webwork.interceptor;
+
+public interface ServletRequestAware extends
org.apache.struts2.interceptor.ServletRequestAware {
+
+}
Added:
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/interceptor/ServletResponseAware.java
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/interceptor/ServletResponseAware.java?rev=594373&view=auto
==============================================================================
---
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/interceptor/ServletResponseAware.java
(added)
+++
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/interceptor/ServletResponseAware.java
Mon Nov 12 16:55:46 2007
@@ -0,0 +1,5 @@
+package com.opensymphony.webwork.interceptor;
+
+public interface ServletResponseAware extends
org.apache.struts2.interceptor.ServletResponseAware {
+
+}
Added:
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/interceptor/SessionAware.java
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/interceptor/SessionAware.java?rev=594373&view=auto
==============================================================================
---
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/interceptor/SessionAware.java
(added)
+++
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/webwork/interceptor/SessionAware.java
Mon Nov 12 16:55:46 2007
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.opensymphony.webwork.interceptor;
+
+public interface SessionAware extends
org.apache.struts2.interceptor.SessionAware {
+}
Modified:
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/ActionContext.java
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/ActionContext.java?rev=594373&r1=594372&r2=594373&view=diff
==============================================================================
---
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/ActionContext.java
(original)
+++
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/ActionContext.java
Mon Nov 12 16:55:46 2007
@@ -20,10 +20,6 @@
*/
package com.opensymphony.xwork;
-import java.util.Map;
-
-import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.ValueStackFactory;
public class ActionContext extends com.opensymphony.xwork2.ActionContext {
Added:
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/ActionInvocation.java
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/ActionInvocation.java?rev=594373&view=auto
==============================================================================
---
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/ActionInvocation.java
(added)
+++
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/ActionInvocation.java
Mon Nov 12 16:55:46 2007
@@ -0,0 +1,24 @@
+/*
+ * $Id: StrutsModels.java 549177 2007-06-20 18:17:22Z musachy $
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package com.opensymphony.xwork;
+
+public interface ActionInvocation extends
com.opensymphony.xwork2.ActionInvocation {
+}
Added:
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/WrappedActionInvocation.java
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/WrappedActionInvocation.java?rev=594373&view=auto
==============================================================================
---
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/WrappedActionInvocation.java
(added)
+++
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/WrappedActionInvocation.java
Mon Nov 12 16:55:46 2007
@@ -0,0 +1,71 @@
+package com.opensymphony.xwork;
+
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ActionEventListener;
+import com.opensymphony.xwork2.ActionProxy;
+import com.opensymphony.xwork2.Result;
+import com.opensymphony.xwork2.interceptor.PreResultListener;
+import com.opensymphony.xwork2.util.ValueStack;
+
+public class WrappedActionInvocation implements ActionInvocation {
+ private com.opensymphony.xwork2.ActionInvocation strutsActionInvocation;
+
+ public WrappedActionInvocation(
+ com.opensymphony.xwork2.ActionInvocation
strutsActionInvocation) {
+ this.strutsActionInvocation = strutsActionInvocation;
+ }
+
+ public void addPreResultListener(PreResultListener listener) {
+ strutsActionInvocation.addPreResultListener(listener);
+ }
+
+ public Object getAction() {
+ return strutsActionInvocation.getAction();
+ }
+
+ public ActionContext getInvocationContext() {
+ return strutsActionInvocation.getInvocationContext();
+ }
+
+ public ActionProxy getProxy() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Result getResult() throws Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getResultCode() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public ValueStack getStack() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String invoke() throws Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String invokeActionOnly() throws Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean isExecuted() {
+ return strutsActionInvocation.isExecuted();
+ }
+
+ public void setActionEventListener(ActionEventListener listener) {
+ strutsActionInvocation.setActionEventListener(listener);
+ }
+
+ public void setResultCode(String code) {
+ strutsActionInvocation.setResultCode(code);
+ }
+}
Added:
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/interceptor/AroundInterceptor.java
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/interceptor/AroundInterceptor.java?rev=594373&view=auto
==============================================================================
---
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/interceptor/AroundInterceptor.java
(added)
+++
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/interceptor/AroundInterceptor.java
Mon Nov 12 16:55:46 2007
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2002-2006 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.xwork.interceptor;
+
+import com.opensymphony.xwork.ActionInvocation;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+
+/**
+ * An abstract interceptor that provides simple access to before/after
callouts.
+ *
+ * @author Jason Carreira
+ */
+public abstract class AroundInterceptor implements Interceptor {
+
+ protected transient Log log = LogFactory.getLog(getClass());
+
+ public void destroy() {
+ }
+
+ public void init() {
+ }
+
+ public String intercept(ActionInvocation invocation) throws Exception {
+ String result = null;
+
+ before(invocation);
+ result = invocation.invoke();
+ after(invocation, result);
+
+ return result;
+ }
+
+ /**
+ * Called after the invocation has been executed.
+ *
+ * @param result the result value returned by the invocation
+ */
+ protected abstract void after(ActionInvocation dispatcher, String result)
throws Exception;
+
+ /**
+ * Called before the invocation has been executed.
+ */
+ protected abstract void before(ActionInvocation invocation) throws
Exception;
+}
Added:
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/interceptor/Interceptor.java
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/interceptor/Interceptor.java?rev=594373&view=auto
==============================================================================
---
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/interceptor/Interceptor.java
(added)
+++
struts/sandbox/trunk/struts2-webwork2-plugin/src/main/java/com/opensymphony/xwork/interceptor/Interceptor.java
Mon Nov 12 16:55:46 2007
@@ -0,0 +1,4 @@
+package com.opensymphony.xwork.interceptor;
+
+public interface Interceptor extends
com.opensymphony.xwork2.interceptor.Interceptor {
+}