Package org.jboss.seam.intercept

Examples of org.jboss.seam.intercept.Interceptor


      for ( Annotation annotation: getBeanClass().getAnnotations() )
      {
         if ( annotation.annotationType().isAnnotationPresent(INTERCEPTORS) )
         {
            Class[] classes = value( annotation.annotationType().getAnnotation(INTERCEPTORS) );
            addInterceptor( new Interceptor(classes, annotation, this) );
         }
         if ( annotation.annotationType().isAnnotationPresent(Interceptors.class) )
         {
            Class[] classes = annotation.annotationType().getAnnotation(Interceptors.class).value();
            addInterceptor( new Interceptor(classes, annotation, this) );
         }
      }

      newSort(interceptors);
View Full Code Here


   public void addInterceptor(Object interceptorInstance)
   {
      try
      {
         addInterceptor(new Interceptor(interceptorInstance, this));
      }
      catch (NoClassDefFoundError e)
      {
         log.debug("Unable to load interceptor " + interceptorInstance.getClass(), e);
      }
View Full Code Here

      for ( Annotation annotation: getBeanClass().getAnnotations() )
      {
         if ( annotation.annotationType().isAnnotationPresent(INTERCEPTORS) )
         {
            Class[] classes = value( annotation.annotationType().getAnnotation(INTERCEPTORS) );
            addInterceptor( new Interceptor(classes, annotation, this) );
         }
         if ( annotation.annotationType().isAnnotationPresent(Interceptors.class) )
         {
            Class[] classes = annotation.annotationType().getAnnotation(Interceptors.class).value();
            addInterceptor( new Interceptor(classes, annotation, this) );
         }
      }

      newSort(interceptors);
View Full Code Here

         }
         catch (Exception e)
         {
            throw new IllegalArgumentException("Unable to load interceptor " + interceptorName, e);
         }
         addInterceptor(new Interceptor(interceptorInstance, this));
      }
   }
View Full Code Here

      for ( Annotation annotation: getBeanClass().getAnnotations() )
      {
         if ( annotation.annotationType().isAnnotationPresent(INTERCEPTORS) )
         {
            Class[] classes = value( annotation.annotationType().getAnnotation(INTERCEPTORS) );
            addInterceptor( new Interceptor(classes, annotation, this) );
         }
         if ( annotation.annotationType().isAnnotationPresent(Interceptors.class) )
         {
            Class[] classes = annotation.annotationType().getAnnotation(Interceptors.class).value();
            addInterceptor( new Interceptor(classes, annotation, this) );
         }
      }

      newSort(interceptors);
      newSort(clientSideInterceptors);
View Full Code Here

   public void addInterceptor(Object interceptorInstance)
   {
      try
      {
         addInterceptor(new Interceptor(interceptorInstance, this));
      }
      catch (NoClassDefFoundError e)
      {
         log.debug("Unable to load interceptor " + interceptorInstance.getClass(), e);
      }
View Full Code Here

      for ( Annotation annotation: getBeanClass().getAnnotations() )
      {
         if ( annotation.annotationType().isAnnotationPresent(INTERCEPTORS) )
         {
            Class[] classes = value( annotation.annotationType().getAnnotation(INTERCEPTORS) );
            addInterceptor( new Interceptor(classes, annotation, this) );
         }
         if ( annotation.annotationType().isAnnotationPresent(Interceptors.class) )
         {
            Class[] classes = annotation.annotationType().getAnnotation(Interceptors.class).value();
            addInterceptor( new Interceptor(classes, annotation, this) );
         }
      }

      newSort(interceptors);
      newSort(clientSideInterceptors);
View Full Code Here

   public void addInterceptor(Object interceptorInstance)
   {
      try
      {
         addInterceptor(new Interceptor(interceptorInstance, this));
      }
      catch (NoClassDefFoundError e)
      {
         log.debug("Unable to load interceptor " + interceptorInstance.getClass(), e);
      }
View Full Code Here

      for ( Annotation annotation: getBeanClass().getAnnotations() )
      {
         if ( annotation.annotationType().isAnnotationPresent(INTERCEPTORS) )
         {
            Class[] classes = value( annotation.annotationType().getAnnotation(INTERCEPTORS) );
            addInterceptor( new Interceptor(classes, annotation, this) );
         }
         if ( annotation.annotationType().isAnnotationPresent(Interceptors.class) )
         {
            Class[] classes = annotation.annotationType().getAnnotation(Interceptors.class).value();
            addInterceptor( new Interceptor(classes, annotation, this) );
         }
      }

      newSort(interceptors);
View Full Code Here

   private void initDefaultInterceptors()
   {
      if (synchronize)
      {
         addInterceptor( new Interceptor( new SynchronizationInterceptor(), this ) );
      }
      if (
            ( getType().isEjb() && businessInterfaceHasAnnotation(Asynchronous.class) ) ||
            ( getType()==JAVA_BEAN && beanClassHasAnnotation(Asynchronous.class) )
         )
      {
         addInterceptor( new Interceptor( new AsynchronousInterceptor(), this ) );
      }
      if ( getType()==STATEFUL_SESSION_BEAN )
      {
         addInterceptor( new Interceptor( new RemoveInterceptor(), this ) );
      }
      if ( getType()==STATEFUL_SESSION_BEAN || getType()==STATELESS_SESSION_BEAN )
      {
         if (Reflections.isClassAvailable("org.hibernate.Session"))
         {
            addInterceptor( new Interceptor ( new HibernateSessionProxyInterceptor(), this ) );
         }
         addInterceptor( new Interceptor ( new EntityManagerProxyInterceptor(), this ) );
      }
      if ( getType()!=ENTITY_BEAN )
      {
         addInterceptor( new Interceptor( new MethodContextInterceptor(), this ) );
      }
      if ( beanClassHasAnnotation(RaiseEvent.class) )
      {
         addInterceptor( new Interceptor( new EventInterceptor(), this ) );
      }
      if ( beanClassHasAnnotation(Conversational.class) )
      {
         addInterceptor( new Interceptor( new ConversationalInterceptor(), this ) );
      }
      if ( Contexts.isApplicationContextActive() ) //ugh, for unit tests
      {
         if ( Init.instance().isJbpmInstalled() )
         {
            addInterceptor( new Interceptor( new BusinessProcessInterceptor(), this ) );
         }
      }
      if ( !conversationManagementMethods.isEmpty() )
      {
         addInterceptor( new Interceptor( new ConversationInterceptor(), this ) );
      }
      if ( needsInjection() || needsOutjection() )
      {
         addInterceptor( new Interceptor( new BijectionInterceptor(), this ) );
      }
      addInterceptor( new Interceptor( new RollbackInterceptor(), this ) );
      if ( getType()==JAVA_BEAN && beanClassHasAnnotation(Transactional.class))
      {
         addInterceptor( new Interceptor( new TransactionInterceptor(), this ) );
      }
      if ( getScope()==CONVERSATION )
      {
         addInterceptor( new Interceptor( new ManagedEntityIdentityInterceptor(), this ) );
      }
      if ( beanClassHasAnnotation(Restrict.class) )
      {
        addInterceptor( new Interceptor( new SecurityInterceptor(), this ) );
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.seam.intercept.Interceptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.