Save This Page
Home » apache-openwebbeans-1.0.0-incubating-M3-sources » org.apache.webbeans.jsf.plugin » [javadoc | source]
    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements. See the NOTICE file distributed with this
    4    * work for additional information regarding copyright ownership. The ASF
    5    * licenses this file to You under the Apache License, Version 2.0 (the
    6    * "License"); you may not use this file except in compliance with the License.
    7    * You may obtain a copy of the License at
    8    * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
    9    * or agreed to in writing, software distributed under the License is
   10    * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   11    * KIND, either express or implied. See the License for the specific language
   12    * governing permissions and limitations under the License.
   13    */
   14   package org.apache.webbeans.jsf.plugin;
   15   
   16   import java.lang.annotation.Annotation;
   17   import java.lang.reflect.Type;
   18   
   19   import javax.faces.component.UIComponent;
   20   
   21   import org.apache.webbeans.exception.WebBeansConfigurationException;
   22   import org.apache.webbeans.plugins.AbstractOpenWebBeansPlugin;
   23   import org.apache.webbeans.util.ClassUtil;
   24   
   25   public class OpenWebBeansJsfPlugin extends AbstractOpenWebBeansPlugin 
   26   {
   27   
   28       /** {@inheritDoc} */
   29       public void startUp() throws WebBeansConfigurationException 
   30       {
   31           // nothing to do 
   32       }
   33   
   34       /** {@inheritDoc} */
   35       public void shutDown() throws WebBeansConfigurationException 
   36       {
   37           // nothing to do
   38       }
   39   
   40       /** {@inheritDoc} */
   41       public void isManagedBean( Class<?> clazz ) throws WebBeansConfigurationException 
   42       {
   43           if (ClassUtil.isAssignable(UIComponent.class, clazz))
   44           {
   45               throw new WebBeansConfigurationException("Web Beans component implementation class : " + clazz.getName() 
   46                                                        + " can not implement JSF UIComponent");
   47           }
   48       }
   49   
   50       /** {@inheritDoc} */
   51       public void checkForValidResources(Type type, Class<?> clazz, String name, Annotation[] annotations)
   52       {
   53           // nothing to do
   54       }
   55   
   56       /** {@inheritDoc} */
   57       public Object injectResource(Type type, Annotation[] annotations)
   58       {
   59           return null;
   60       }
   61   
   62       /** {@inheritDoc} */
   63       public boolean isResourceAnnotation(Class<? extends Annotation> annotationClass)
   64       {
   65           return false;
   66       }
   67   
   68   }

Save This Page
Home » apache-openwebbeans-1.0.0-incubating-M3-sources » org.apache.webbeans.jsf.plugin » [javadoc | source]