openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r790728 - in /incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi: AfterBeanDiscovery.java BeforeBeanDiscovery.java Extension.java ObserverMethod.java
Date Thu, 02 Jul 2009 20:05:04 GMT
Author: gerdogdu
Date: Thu Jul  2 20:05:03 2009
New Revision: 790728

URL: http://svn.apache.org/viewvc?rev=790728&view=rev
Log:
Adding Extension service API. Adding AfterBeanDiscovery and BeforeBeanDiscovery.

Added:
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/Extension.java
  (with props)
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/ObserverMethod.java
  (with props)
Modified:
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java
  (contents, props changed)
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java
  (contents, props changed)

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java?rev=790728&r1=790727&r2=790728&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java
Thu Jul  2 20:05:03 2009
@@ -13,17 +13,42 @@
  */
 package javax.enterprise.inject.spi;
 
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
+import javax.enterprise.context.spi.Context;
 
-import javax.enterprise.inject.BindingType;
-
-@BindingType
-@Retention(RetentionPolicy.RUNTIME)
-@Target( { ElementType.FIELD, ElementType.PARAMETER })
-public @interface AfterBeanDiscovery
+/**
+ * Events that are fired after discovery bean process.
+ * 
+ * @version $Rev$ $Date$
+ *
+ */
+public interface AfterBeanDiscovery 
 {
+    /**
+     * Adds definition error. Container aborts deployment after
+     * all observer methods are called.
+     * 
+     * @param t throwable
+     */
+    public void addDefinitionError(Throwable t);
 
-}
+    /**
+     * Registering the bean with container.
+     * 
+     * @param bean new bean
+     */
+    public void addBean(Bean<?> bean);
+    
+    /**
+     * Registers the given observer method with container.
+     * 
+     * @param observerMethod observer method
+     */
+    public void addObserverMethod(ObserverMethod<?, ?> observerMethod);
+    
+    /**
+     * Adds given context to the container.
+     * 
+     * @param context new context
+     */
+    public void addContext(Context context);
+}
\ No newline at end of file

Propchange: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java?rev=790728&r1=790727&r2=790728&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java
Thu Jul  2 20:05:03 2009
@@ -13,19 +13,55 @@
  */
 package javax.enterprise.inject.spi;
 
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Annotation;
 
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.enterprise.inject.BindingType;
-
-@BindingType
-@Retention(RUNTIME)
-@Target( { FIELD, PARAMETER })
-public @interface BeforeBeanDiscovery
+/**
+ * Container fires this event before discovery
+ * of the beans process.
+ * 
+ * @version $Rev$ $Date$
+ *
+ */
+public interface BeforeBeanDiscovery
 {
+    /**
+     * Declares a new binding type.
+     * 
+     * @param bindingType binding type
+     */
+    public void addBindingType(Class<? extends Annotation> bindingType);
+    
+    /**
+     * Declares a new scope type.
+     * 
+     * @param scopeType scope type
+     * @param normal is normal or not
+     * @param passivating passivated or not
+     */
+    public void addScopeType(Class<? extends Annotation> scopeType, boolean normal,
boolean passivating);
+    
+    /**
+     * Declares a new stereotype.
+     * 
+     * @param stereotype stereotype class
+     * @param stereotypeDef meta annotations
+     */
+    public void addStereotype(Class<? extends Annotation> stereotype, Annotation...
stereotypeDef);
+    
+    /**
+     * Declares a new binding type.
+     * 
+     * @param bindingType binding type class
+     * @param bindingTypeDef meta annotations
+     */
+    public void addInterceptorBindingType(Class<? extends Annotation> bindingType,
Annotation... bindingTypeDef);
+    
+    /**
+     * Adds new annotated type.
+     * 
+     * @param type annotated type
+     */
+    public void addAnnotatedType(AnnotatedType<?> type);
+
 
-}
+}
\ No newline at end of file

Propchange: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/Extension.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/Extension.java?rev=790728&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/Extension.java
(added)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/Extension.java
Thu Jul  2 20:05:03 2009
@@ -0,0 +1,26 @@
+/*
+ * 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;
+
+/**
+ * Marker interface that is implemented by the classes
+ * that listen for the container events.
+ * 
+ * @version $Rev$ $Date$
+ *
+ */
+public interface Extension
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/Extension.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/Extension.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/ObserverMethod.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/ObserverMethod.java?rev=790728&view=auto
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/ObserverMethod.java
(added)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/ObserverMethod.java
Thu Jul  2 20:05:03 2009
@@ -0,0 +1,19 @@
+/*
+ * 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;
+
+public class ObserverMethod<T,K>
+{
+
+}

Propchange: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/enterprise/inject/spi/ObserverMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message