deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject git commit: DELTASPIKE-534 Replace @Web with @DeltaSpike
Date Thu, 06 Mar 2014 18:50:10 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 6c9524b56 -> c2aa4fb56


DELTASPIKE-534 Replace @Web with @DeltaSpike

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

Branch: refs/heads/master
Commit: c2aa4fb56551eb11cba582f195b462b13e1fdd0f
Parents: 6c9524b
Author: tandraschko <tandraschko@apache.org>
Authored: Thu Mar 6 19:49:52 2014 +0100
Committer: tandraschko <tandraschko@apache.org>
Committed: Thu Mar 6 19:49:52 2014 +0100

----------------------------------------------------------------------
 .../org/apache/deltaspike/servlet/api/Web.java  | 43 --------------------
 .../servlet/api/literal/WebLiteral.java         | 35 ----------------
 .../api/resourceloader/WebResourceProvider.java |  4 +-
 .../impl/produce/ServletObjectProducer.java     | 16 ++++----
 .../producer/ServletContextInjectionTest.java   |  4 +-
 .../producer/ServletObjectInjectionBean.java    | 14 +++----
 6 files changed, 19 insertions(+), 97 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/c2aa4fb5/deltaspike/modules/servlet/api/src/main/java/org/apache/deltaspike/servlet/api/Web.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/servlet/api/src/main/java/org/apache/deltaspike/servlet/api/Web.java
b/deltaspike/modules/servlet/api/src/main/java/org/apache/deltaspike/servlet/api/Web.java
deleted file mode 100644
index 667caf0..0000000
--- a/deltaspike/modules/servlet/api/src/main/java/org/apache/deltaspike/servlet/api/Web.java
+++ /dev/null
@@ -1,43 +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.servlet.api;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * Common qualifier used for injection of servlet objects.
- */
-@Qualifier
-@Target({ TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-public @interface Web
-{
-
-}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/c2aa4fb5/deltaspike/modules/servlet/api/src/main/java/org/apache/deltaspike/servlet/api/literal/WebLiteral.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/servlet/api/src/main/java/org/apache/deltaspike/servlet/api/literal/WebLiteral.java
b/deltaspike/modules/servlet/api/src/main/java/org/apache/deltaspike/servlet/api/literal/WebLiteral.java
deleted file mode 100644
index 612a8ac..0000000
--- a/deltaspike/modules/servlet/api/src/main/java/org/apache/deltaspike/servlet/api/literal/WebLiteral.java
+++ /dev/null
@@ -1,35 +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.servlet.api.literal;
-
-import javax.enterprise.util.AnnotationLiteral;
-
-import org.apache.deltaspike.servlet.api.Web;
-
-/**
- * Annotation literal for {@link Web}.
- */
-public class WebLiteral extends AnnotationLiteral<Web> implements Web
-{
-
-    public static final Web INSTANCE = new WebLiteral();
-
-    private static final long serialVersionUID = -3432965578489930193L;
-
-}

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/c2aa4fb5/deltaspike/modules/servlet/api/src/main/java/org/apache/deltaspike/servlet/api/resourceloader/WebResourceProvider.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/servlet/api/src/main/java/org/apache/deltaspike/servlet/api/resourceloader/WebResourceProvider.java
b/deltaspike/modules/servlet/api/src/main/java/org/apache/deltaspike/servlet/api/resourceloader/WebResourceProvider.java
index 8d16676..e7beb48 100644
--- a/deltaspike/modules/servlet/api/src/main/java/org/apache/deltaspike/servlet/api/resourceloader/WebResourceProvider.java
+++ b/deltaspike/modules/servlet/api/src/main/java/org/apache/deltaspike/servlet/api/resourceloader/WebResourceProvider.java
@@ -24,9 +24,9 @@ import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
 import javax.servlet.ServletContext;
 
+import org.apache.deltaspike.core.api.common.DeltaSpike;
 import org.apache.deltaspike.core.api.resourceloader.AbstractResourceProvider;
 import org.apache.deltaspike.core.api.resourceloader.InjectableResource;
-import org.apache.deltaspike.servlet.api.Web;
 
 /**
  * Loads resources using {@link ServletContext#getResource(String)}.
@@ -35,7 +35,7 @@ import org.apache.deltaspike.servlet.api.Web;
 public class WebResourceProvider extends AbstractResourceProvider
 {
     @Inject
-    @Web
+    @DeltaSpike
     private ServletContext servletContext;
 
     @Override

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/c2aa4fb5/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/produce/ServletObjectProducer.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/produce/ServletObjectProducer.java
b/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/produce/ServletObjectProducer.java
index bd3304e..f74f3f3 100644
--- a/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/produce/ServletObjectProducer.java
+++ b/deltaspike/modules/servlet/impl/src/main/java/org/apache/deltaspike/servlet/impl/produce/ServletObjectProducer.java
@@ -31,7 +31,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 
-import org.apache.deltaspike.servlet.api.Web;
+import org.apache.deltaspike.core.api.common.DeltaSpike;
 
 /**
  * Producer for standard servlet objects. All objects are produced with the {@link Web} qualifier.
Currently the
@@ -51,14 +51,14 @@ public class ServletObjectProducer
 {
 
     @Produces
-    @Web
+    @DeltaSpike
     public ServletContext getServletContext()
     {
         return ServletContextHolder.get();
     }
 
     @Produces
-    @Web
+    @DeltaSpike
     @RequestScoped
     public ServletRequest getServletRequest()
     {
@@ -67,7 +67,7 @@ public class ServletObjectProducer
 
     @Produces
     @Typed(HttpServletRequest.class)
-    @Web
+    @DeltaSpike
     @RequestScoped
     public HttpServletRequest getHttpServletRequest()
     {
@@ -80,7 +80,7 @@ public class ServletObjectProducer
     }
 
     @Produces
-    @Web
+    @DeltaSpike
     @RequestScoped
     public ServletResponse getServletResponse()
     {
@@ -89,7 +89,7 @@ public class ServletObjectProducer
 
     @Produces
     @Typed(HttpServletResponse.class)
-    @Web
+    @DeltaSpike
     @RequestScoped
     public HttpServletResponse getHttpServletResponse()
     {
@@ -102,7 +102,7 @@ public class ServletObjectProducer
     }
 
     @Produces
-    @Web
+    @DeltaSpike
     @SessionScoped
     public HttpSession getHttpSession()
     {
@@ -116,7 +116,7 @@ public class ServletObjectProducer
     }
 
     @Produces
-    @Web
+    @DeltaSpike
     @RequestScoped
     public Principal getPrincipal()
     {

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/c2aa4fb5/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/producer/ServletContextInjectionTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/producer/ServletContextInjectionTest.java
b/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/producer/ServletContextInjectionTest.java
index b71d1fe..beec47c 100644
--- a/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/producer/ServletContextInjectionTest.java
+++ b/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/producer/ServletContextInjectionTest.java
@@ -24,7 +24,7 @@ import static org.junit.Assert.assertThat;
 import javax.inject.Inject;
 import javax.servlet.ServletContext;
 
-import org.apache.deltaspike.servlet.api.Web;
+import org.apache.deltaspike.core.api.common.DeltaSpike;
 import org.apache.deltaspike.test.category.WebProfileCategory;
 import org.apache.deltaspike.test.servlet.impl.Deployments;
 import org.hamcrest.Matchers;
@@ -63,7 +63,7 @@ public class ServletContextInjectionTest
     }
 
     @Inject
-    @Web
+    @DeltaSpike
     private ServletContext servletContext;
 
     @Test

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/c2aa4fb5/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/producer/ServletObjectInjectionBean.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/producer/ServletObjectInjectionBean.java
b/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/producer/ServletObjectInjectionBean.java
index 4a058a4..29ca8a0 100644
--- a/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/producer/ServletObjectInjectionBean.java
+++ b/deltaspike/modules/servlet/impl/src/test/java/org/apache/deltaspike/test/servlet/impl/producer/ServletObjectInjectionBean.java
@@ -27,7 +27,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 
-import org.apache.deltaspike.servlet.api.Web;
+import org.apache.deltaspike.core.api.common.DeltaSpike;
 
 /**
  * Simple CDI beans with various injection points for servlet ojbects.
@@ -35,27 +35,27 @@ import org.apache.deltaspike.servlet.api.Web;
 public class ServletObjectInjectionBean
 {
 
-    @Web
+    @DeltaSpike
     @Inject
     private ServletRequest servletRequest;
 
-    @Web
+    @DeltaSpike
     @Inject
     private HttpServletRequest httpServletRequest;
 
-    @Web
+    @DeltaSpike
     @Inject
     private ServletResponse servletResponse;
 
-    @Web
+    @DeltaSpike
     @Inject
     private HttpServletResponse httpServletResponse;
 
-    @Web
+    @DeltaSpike
     @Inject
     private HttpSession httpSession;
 
-    @Web
+    @DeltaSpike
     @Inject
     private Principal principal;
 


Mime
View raw message