Refine search
/** * @author Arun Gupta */ @Vetoed public class SimpleGreeting implements Greeting { @Override public String greet(String name) { return "Hello " + name; } }
@Vetoed public class BookStoreResponseFilter implements ContainerResponseFilter { @Inject private BookStoreAuthenticator authenticator; @Override public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException { if (authenticator != null) { // This filter should not be created using CDI runtime (it is vetoed) as // such the injection should not be performed. responseContext.setStatus(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()); } } }
/** Uses CDI API binding - @javax.enterprise.context.control.ActivateRequestContext. * * @author <a href="mailto:manovotn@redhat.com">Matej Novotny</a> */ @Vetoed @Interceptor @ActivateRequestContext @SuppressWarnings("checkstyle:magicnumber") @Priority(Interceptor.Priority.PLATFORM_BEFORE + 100) public class CdiRequestContextActivatorInterceptor extends AbstractActivateRequestContextInterceptor { @Inject public CdiRequestContextActivatorInterceptor(@Unbound RequestContext requestContext, BeanManagerImpl beanManager) { super(requestContext, beanManager); } }
@Vetoed public class BookStoreResponseFilter implements ContainerResponseFilter { @Inject private BookStoreAuthenticator authenticator; @Override public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException { if (authenticator != null) { // This filter should not be created using CDI runtime (it is vetoed) as // such the injection should not be performed. responseContext.setStatus(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()); } } }
/** Uses CDI API binding - @javax.enterprise.context.control.ActivateRequestContext. * * @author <a href="mailto:manovotn@redhat.com">Matej Novotny</a> */ @Vetoed @Interceptor @ActivateRequestContext @SuppressWarnings("checkstyle:magicnumber") @Priority(Interceptor.Priority.PLATFORM_BEFORE + 100) public class CdiRequestContextActivatorInterceptor extends AbstractActivateRequestContextInterceptor { @Inject public CdiRequestContextActivatorInterceptor(@Unbound RequestContext requestContext, BeanManagerImpl beanManager) { super(requestContext, beanManager); } }
/** * @author <a href="mailto:struberg@apache.org">Mark Struberg</a> */ @Priority(1) @Vetoed public class FloatConverter implements Converter<Float> { public static final FloatConverter INSTANCE = new FloatConverter(); @Override public Float convert(String value) { return value != null ? Float.valueOf(value) : null; } }
/** Uses CDI API binding - @javax.enterprise.context.control.ActivateRequestContext. * * @author <a href="mailto:manovotn@redhat.com">Matej Novotny</a> */ @Vetoed @Interceptor @ActivateRequestContext @SuppressWarnings("checkstyle:magicnumber") @Priority(Interceptor.Priority.PLATFORM_BEFORE + 100) public class CdiRequestContextActivatorInterceptor extends AbstractActivateRequestContextInterceptor { @Inject public CdiRequestContextActivatorInterceptor(@Unbound RequestContext requestContext, BeanManagerImpl beanManager) { super(requestContext, beanManager); } }
/** * @author <a href="mailto:struberg@apache.org">Mark Struberg</a> */ @Priority(1) @Vetoed public class IntegerConverter implements Converter<Integer> { public static final IntegerConverter INSTANCE = new IntegerConverter(); @Override public Integer convert(String value) { return value != null ? Integer.valueOf(value) : null; } }
/** * Supplier to provide CDI managed components where * there is no clear mapping between the CDI and scopes. * * @author Jakub Podlesak (jakub.podlesak at oracle.com) */ @Vetoed public final class GenericCdiBeanSupplier extends AbstractCdiBeanSupplier { public GenericCdiBeanSupplier(Class rawType, InjectionManager injectionManager, BeanManager beanManager, boolean cdiManaged) { super(rawType, injectionManager, beanManager, cdiManaged); } @Override public Object get() { return _provide(); } }
/** @Vetoed ensures this bean will not get picked up by CDI automatically * * @author <a href="mailto:manovotn@redhat.com">Matej Novotny</a> */ @Vetoed public class Skeleton { private int healthPoints; @Inject private DesireToHurtHumans evilDesire; public Skeleton (int healthPoints) { this.healthPoints = healthPoints; } public Skeleton() { } }
/** Uses CDI API binding - @javax.enterprise.context.control.ActivateRequestContext. * * @author <a href="mailto:manovotn@redhat.com">Matej Novotny</a> */ @Vetoed @Interceptor @ActivateRequestContext @SuppressWarnings("checkstyle:magicnumber") @Priority(Interceptor.Priority.PLATFORM_BEFORE + 100) public class CdiRequestContextActivatorInterceptor extends AbstractActivateRequestContextInterceptor { @Inject public CdiRequestContextActivatorInterceptor(@Unbound RequestContext requestContext, BeanManagerImpl beanManager) { super(requestContext, beanManager); } }
/** * @author <a href="mailto:struberg@apache.org">Mark Struberg</a> */ @Priority(1) @Vetoed public class LongConverter implements Converter<Long> { public static final LongConverter INSTANCE = new LongConverter(); @Override public Long convert(String value) { return value != null ? Long.valueOf(value) : null; } }
/** * Supplier to provide CDI managed components * that should be mapped into Jersey request scope. * For these components, Jersey will avoid * injecting dynamic proxies for JAX-RS request scoped injectees. * * @author Jakub Podlesak (jakub.podlesak at oracle.com) */ @Vetoed public final class RequestScopedCdiBeanSupplier extends AbstractCdiBeanSupplier { public RequestScopedCdiBeanSupplier(Class rawType, InjectionManager locator, BeanManager beanManager, boolean cdiManaged) { super(rawType, locator, beanManager, cdiManaged); } @Override @RequestScoped public Object get() { return _provide(); } }
@Vetoed public class Factory { public static final Toy WOODY = new Toy("Woody"); public static final SpaceSuit<?> INVALID_FIELD1 = new SpaceSuit<Object>(); @Inject public static final Toy INVALID_FIELD2 = null; public final Object INVALID_FIELD3 = null; public static Toy getBuzz(BeanManager manager, SpaceSuit<Toy> suit) { assertNotNull(manager); assertNotNull(suit); return new Toy("Buzz Lightyear"); } public static <T> T invalidProducerMethod1(T t) { return null; } public Toy invalidProducerMethod2() { return new Toy("nonStaticNonBean"); } }
/** Uses CDI API binding - @javax.enterprise.context.control.ActivateRequestContext. * * @author <a href="mailto:manovotn@redhat.com">Matej Novotny</a> */ @Vetoed @Interceptor @ActivateRequestContext @SuppressWarnings("checkstyle:magicnumber") @Priority(Interceptor.Priority.PLATFORM_BEFORE + 100) public class CdiRequestContextActivatorInterceptor extends AbstractActivateRequestContextInterceptor { @Inject public CdiRequestContextActivatorInterceptor(@Unbound RequestContext requestContext, BeanManagerImpl beanManager) { super(requestContext, beanManager); } }
/** * @author <a href="mailto:struberg@apache.org">Mark Struberg</a> */ @Priority(1) @Vetoed public class DoubleConverter implements Converter<Double> { public static final DoubleConverter INSTANCE = new DoubleConverter(); @Override public Double convert(String value) { return value != null ? Double.valueOf(value) : null; } }
@Vetoed public class CdiRequestDispatcher extends RequestDispatcher { private final Instance<Object> instance;
@Vetoed public class TestTagHandler extends SimpleTagSupport { @Inject private Sheep sheep; private static boolean isWrappedInjectionSuccessfull = false; @Inject public void initialize(Sheep sheep) { } @Override public void doTag() throws IOException { getJspContext().getOut().write(String.valueOf(isWrappedInjectionSuccessfull)); } public static boolean isIsWrappedInjectionSuccessfull() { return isWrappedInjectionSuccessfull; } public static void setIsWrappedInjectionSuccessfull(boolean isWrappedInjectionSuccessfull) { TestTagHandler.isWrappedInjectionSuccessfull = isWrappedInjectionSuccessfull; } }