geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1499682 - in /geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise: context/spi/ inject/spi/
Date Thu, 04 Jul 2013 08:46:30 GMT
Author: struberg
Date: Thu Jul  4 08:46:30 2013
New Revision: 1499682

URL: http://svn.apache.org/r1499682
Log:
GERONIMO-6458 add more CDI-1.1 classes

Added:
    geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/spi/AlterableContext.java
  (with props)
    geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/AfterTypeDiscovery.java
  (with props)
    geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessBeanAttributes.java
  (with props)
    geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessInjectionPoint.java
  (with props)
    geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessSynthethicAnnotatedType.java
  (with props)
Modified:
    geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessObserverMethod.java

Added: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/spi/AlterableContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/spi/AlterableContext.java?rev=1499682&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/spi/AlterableContext.java
(added)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/spi/AlterableContext.java
Thu Jul  4 08:46:30 2013
@@ -0,0 +1,30 @@
+/*
+ * 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 javax.enterprise.context.spi;
+
+/**
+ * Allows to manually destroy the Contextual Cnstance
+ * of the given Bean.
+ * Contexts for NormalScoped beans should implement this
+ * interface from CDI-1.1 on.
+ */
+public interface AlterableContext
+{
+    public void destroy(Contextual<?> contextual);
+}

Propchange: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/context/spi/AlterableContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/AfterTypeDiscovery.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/AfterTypeDiscovery.java?rev=1499682&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/AfterTypeDiscovery.java
(added)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/AfterTypeDiscovery.java
Thu Jul  4 08:46:30 2013
@@ -0,0 +1,58 @@
+package javax.enterprise.inject.spi;
+
+import java.util.List;
+
+/**
+ * This event will get fired after the container has completed the
+ * class scanning process and all AnnotatedTypes got discovered
+ * from the classpath.
+ */
+public interface AfterTypeDiscovery
+{
+    /**
+     * This method can be used to remove and add {@link javax.enterprise.inject.Alternative}s,
+     * but also to change the sorting order
+     * {@link javax.enterprise.inject.Alternative}s which are only enabled in a certain
+     * BeanArchive are not included in this list.
+     * @return the ordered, mutable List of enabled {@link javax.enterprise.inject.Alternative}s
+     */
+    public List<Class<?>> getAlternatives();
+
+    /**
+     * This method can be used to remove and add enabled CDI Interceptors,
+     * but also to change the sorting order.
+     * Interceptors which are only enabled in a certain BeanArchive are not included in this
list.
+     * @return the ordered, mutable List of Classes which are annotated with {@link Interceptor}
+     *      and globally enabled.
+     */
+    public List<Class<?>> getInterceptors();
+
+    /**
+     * This method can be used to remove and add enabled Decorators,
+     * but also to change the sorting order.
+     * Decorators which are only enabled in a certain BeanArchive are not included in this
list.
+     * @return the ordered, mutable List of Classes which are annotated with {@link Decorator}
+     *      and globally enabled.
+     */
+    public List<Class<?>> getDecorators();
+
+    /**
+     * Allows to a synthetic annotated type.
+     * This method shall get used if you like to add a new
+     * AnnotatedType for a class which already gets scanned by the container.
+     * You should provide an unique id if there is already another AnnotatedType
+     * for the same class.
+     *
+     * The AnnotatedTypes added via this method will not get passed
+     * to Extensions via {@link ProcessAnnotatedType} but only via
+     * {@link ProcessSynthethicAnnotatedType}
+     *
+     * @param type
+     * @param id the unique id or <code>null</code>
+     *
+     * @see AfterBeanDiscovery#getAnnotatedType(Class, String)
+     * @see AfterBeanDiscovery#getAnnotatedTypes(Class)
+     *
+     */
+    public void addAnnotatedType(AnnotatedType<?> type, String id);
+}

Propchange: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/AfterTypeDiscovery.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessBeanAttributes.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessBeanAttributes.java?rev=1499682&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessBeanAttributes.java
(added)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessBeanAttributes.java
Thu Jul  4 08:46:30 2013
@@ -0,0 +1,59 @@
+/*
+ * 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 javax.enterprise.inject.spi;
+
+/**
+ * Each {@link AnnotatedType} gets scanned by the CDI container and turned
+ * into initial {@link BeanAttributes}. Those BeanAttributes can be modified
+ * by observing this very ProcessBeanAttributes system event.
+ * The modified BeanAttributes will get used to construct the final {@link Bean}.
+ *
+ */
+public interface ProcessBeanAttributes<T>
+{
+    /**
+     * @return the {@link AnnotatedType} for bean classes, {@link AnnotatedMethod} for producer
methods and
+     *          {@link AnnotatedField} for producer fields.
+     */
+    public Annotated getAnnotated();
+
+    /**
+     * @return the BeanAttributes parsed from the {@link Annotated}
+     */
+    public BeanAttributes<T> getBeanAttributes();
+
+    /**
+     * Use the given BeanAttributes to later create the {@link Bean} from it.
+     * @param beanAttributes
+     */
+    public void setBeanAttributes(BeanAttributes<T> beanAttributes);
+
+    /**
+     * Tell the container it should ignore this Bean.
+     */
+    public void veto();
+
+    /**
+     * Adding definition error. Container aborts
+     * processing after calling all observers.
+     *
+     * @param t throwable
+     */
+    public void addDefinitionError(Throwable t);
+}

Propchange: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessBeanAttributes.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessInjectionPoint.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessInjectionPoint.java?rev=1499682&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessInjectionPoint.java
(added)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessInjectionPoint.java
Thu Jul  4 08:46:30 2013
@@ -0,0 +1,47 @@
+/*
+ * 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 javax.enterprise.inject.spi;
+
+/**
+ * Gets fired for each InjectionPoint.
+ *
+ * @param <T> observed event type
+ * @param <X> bean class
+ */
+public interface ProcessInjectionPoint<T, X>
+{
+    /**
+     * @return the InjectionPoint created from originally parsing the AnnotatedType.
+     */
+    public InjectionPoint getInjectionPoint();
+
+    /**
+     * Replace the original InjectionPoint point with the given one.
+     * @param injectionPoint
+     */
+    public void setInjectionPoint(InjectionPoint injectionPoint);
+
+    /**
+     * Adding definition error. Container aborts
+     * processing after calling all observers.
+     *
+     * @param t throwable
+     */
+    public void addDefinitionError(Throwable t);
+}

Propchange: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessInjectionPoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessObserverMethod.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessObserverMethod.java?rev=1499682&r1=1499681&r2=1499682&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessObserverMethod.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessObserverMethod.java
Thu Jul  4 08:46:30 2013
@@ -23,8 +23,8 @@ package javax.enterprise.inject.spi;
  * 
  * @version $Rev$ $Date$
  *
- * @param <X> bean class
  * @param <T> observed event type
+ * @param <X> bean class
  */
 public interface ProcessObserverMethod<T, X>
 {
@@ -50,4 +50,4 @@ public interface ProcessObserverMethod<T
      */
     public void addDefinitionError(Throwable t);
     
-}
\ No newline at end of file
+}

Added: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessSynthethicAnnotatedType.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessSynthethicAnnotatedType.java?rev=1499682&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessSynthethicAnnotatedType.java
(added)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessSynthethicAnnotatedType.java
Thu Jul  4 08:46:30 2013
@@ -0,0 +1,13 @@
+package javax.enterprise.inject.spi;
+
+/**
+ * This event gets fired for AnnotatedTypes which are not a result
+ * of the scanning process but got manually added.
+ */
+public interface ProcessSynthethicAnnotatedType<X> extends ProcessAnnotatedType<X>
+{
+    /**
+     * @return the Extension which added this AnnotatedType
+     */
+    public Extension getSource();
+}

Propchange: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/ProcessSynthethicAnnotatedType.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message