deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject deltaspike git commit: DELTASPIKE-1004 unified base-implementation for InvocationContext
Date Sun, 18 Oct 2015 22:38:39 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 05876253e -> 25b5098fc


DELTASPIKE-1004 unified base-implementation for InvocationContext


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/25b5098f
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/25b5098f
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/25b5098f

Branch: refs/heads/master
Commit: 25b5098fc0184c89471f15211711ccbe4e5982fb
Parents: 0587625
Author: gpetracek <gpetracek@apache.org>
Authored: Mon Oct 19 00:37:06 2015 +0200
Committer: gpetracek <gpetracek@apache.org>
Committed: Mon Oct 19 00:37:06 2015 +0200

----------------------------------------------------------------------
 .../core/util/AbstractInvocationContext.java    | 92 --------------------
 .../interceptor/AbstractInvocationContext.java  | 92 ++++++++++++++++++++
 .../data/impl/handler/QueryHandler.java         |  2 +-
 .../data/impl/tx/InvocationContextWrapper.java  |  2 +-
 .../invocation/ManualInvocationContext.java     |  2 +-
 5 files changed, 95 insertions(+), 95 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/25b5098f/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/AbstractInvocationContext.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/AbstractInvocationContext.java
b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/AbstractInvocationContext.java
deleted file mode 100644
index 8c8f691..0000000
--- a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/AbstractInvocationContext.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * 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 org.apache.deltaspike.core.util;
-
-import javax.enterprise.inject.Typed;
-import javax.interceptor.InvocationContext;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-import java.util.Map;
-
-@Typed()
-public abstract class AbstractInvocationContext<T> implements InvocationContext
-{
-    protected final T target;
-    protected final Method method;
-    protected final Object timer;
-
-    protected Object[] parameters;
-    protected Map<String, Object> contextData;
-
-    protected AbstractInvocationContext(T target, Method method, Object[] parameters, Object
timer)
-    {
-        this.target = target;
-        this.method = method;
-        this.parameters = parameters;
-        this.timer = timer;
-    }
-
-
-    @Override
-    public Object getTarget()
-    {
-        return target;
-    }
-
-    @Override
-    public Method getMethod()
-    {
-        return method;
-    }
-
-    @Override
-    public Object getTimer()
-    {
-        return timer;
-    }
-
-    @Override
-    public Object[] getParameters()
-    {
-        return parameters;
-    }
-
-    @Override
-    public void setParameters(Object[] parameters)
-    {
-        this.parameters = parameters;
-    }
-
-    @Override
-    public Map<String, Object> getContextData()
-    {
-        if (contextData == null)
-        {
-            contextData = new HashMap<String, Object>();
-        }
-        return contextData;
-    }
-
-    // @Override - forward compatibility to interceptors API 1.2
-    public Constructor<?> getConstructor()
-    {
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/25b5098f/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/interceptor/AbstractInvocationContext.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/interceptor/AbstractInvocationContext.java
b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/interceptor/AbstractInvocationContext.java
new file mode 100644
index 0000000..3bb0a9b
--- /dev/null
+++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/interceptor/AbstractInvocationContext.java
@@ -0,0 +1,92 @@
+/*
+ * 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 org.apache.deltaspike.core.util.interceptor;
+
+import javax.enterprise.inject.Typed;
+import javax.interceptor.InvocationContext;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+
+@Typed()
+public abstract class AbstractInvocationContext<T> implements InvocationContext
+{
+    protected final T target;
+    protected final Method method;
+    protected final Object timer;
+
+    protected Object[] parameters;
+    protected Map<String, Object> contextData;
+
+    protected AbstractInvocationContext(T target, Method method, Object[] parameters, Object
timer)
+    {
+        this.target = target;
+        this.method = method;
+        this.parameters = parameters;
+        this.timer = timer;
+    }
+
+
+    @Override
+    public Object getTarget()
+    {
+        return target;
+    }
+
+    @Override
+    public Method getMethod()
+    {
+        return method;
+    }
+
+    @Override
+    public Object getTimer()
+    {
+        return timer;
+    }
+
+    @Override
+    public Object[] getParameters()
+    {
+        return parameters;
+    }
+
+    @Override
+    public void setParameters(Object[] parameters)
+    {
+        this.parameters = parameters;
+    }
+
+    @Override
+    public Map<String, Object> getContextData()
+    {
+        if (contextData == null)
+        {
+            contextData = new HashMap<String, Object>();
+        }
+        return contextData;
+    }
+
+    // @Override - forward compatibility to interceptors API 1.2
+    public Constructor<?> getConstructor()
+    {
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/25b5098f/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryHandler.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryHandler.java
b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryHandler.java
index 2f8fcff..86b018e 100755
--- a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryHandler.java
+++ b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryHandler.java
@@ -30,7 +30,7 @@ import javax.inject.Inject;
 import javax.persistence.PersistenceException;
 
 import org.apache.deltaspike.core.api.lifecycle.Initialized;
-import org.apache.deltaspike.core.util.AbstractInvocationContext;
+import org.apache.deltaspike.core.util.interceptor.AbstractInvocationContext;
 import org.apache.deltaspike.core.util.AnnotationUtils;
 import org.apache.deltaspike.core.util.ExceptionUtils;
 import org.apache.deltaspike.core.util.ProxyUtils;

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/25b5098f/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/tx/InvocationContextWrapper.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/tx/InvocationContextWrapper.java
b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/tx/InvocationContextWrapper.java
index 790c57c..f90daa0 100644
--- a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/tx/InvocationContextWrapper.java
+++ b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/tx/InvocationContextWrapper.java
@@ -18,7 +18,7 @@
  */
 package org.apache.deltaspike.data.impl.tx;
 
-import org.apache.deltaspike.core.util.AbstractInvocationContext;
+import org.apache.deltaspike.core.util.interceptor.AbstractInvocationContext;
 import org.apache.deltaspike.data.impl.handler.CdiQueryInvocationContext;
 
 public abstract class InvocationContextWrapper extends AbstractInvocationContext<Object>

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/25b5098f/deltaspike/modules/proxy/impl-asm5/src/main/java/org/apache/deltaspike/proxy/impl/invocation/ManualInvocationContext.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/proxy/impl-asm5/src/main/java/org/apache/deltaspike/proxy/impl/invocation/ManualInvocationContext.java
b/deltaspike/modules/proxy/impl-asm5/src/main/java/org/apache/deltaspike/proxy/impl/invocation/ManualInvocationContext.java
index dd3c2b3..2a4cf3b 100644
--- a/deltaspike/modules/proxy/impl-asm5/src/main/java/org/apache/deltaspike/proxy/impl/invocation/ManualInvocationContext.java
+++ b/deltaspike/modules/proxy/impl-asm5/src/main/java/org/apache/deltaspike/proxy/impl/invocation/ManualInvocationContext.java
@@ -27,7 +27,7 @@ import javax.enterprise.inject.spi.InterceptionType;
 import javax.enterprise.inject.spi.Interceptor;
 
 import org.apache.deltaspike.core.api.provider.BeanManagerProvider;
-import org.apache.deltaspike.core.util.AbstractInvocationContext;
+import org.apache.deltaspike.core.util.interceptor.AbstractInvocationContext;
 
 /**
  * {@link javax.interceptor.InvocationContext}


Mime
View raw message