Examples of ProjectStage


Examples of org.apache.myfaces.extensions.cdi.core.api.projectstage.ProjectStage

        return null;
    }

    private void logConvertedBean(AnnotatedType annotatedType, Class<? extends Annotation> jsf2ScopeAnnotation)
    {
        ProjectStage projectStage = ProjectStageProducer.getInstance().getProjectStage();

        if (projectStage == ProjectStage.Development)
        {
            logger.info("JSF2 bean was converted to a CDI bean. type: " + annotatedType.getJavaClass().getName() +
                    " original scope: " + jsf2ScopeAnnotation.getName());
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.core.api.projectstage.ProjectStage

        ManagedBean managedBeanAnnotation = beanClass.getAnnotation(ManagedBean.class);

        if(managedBeanAnnotation.eager())
        {
            ProjectStage projectStage = ProjectStageProducer.getInstance().getProjectStage();

            if (projectStage == ProjectStage.Development)
            {
                logger.warning("Bean of type " + beanClass.getName() + " uses @" + ManagedBean.class.getName() +
                        " in combination with #eager = true. That's not supported with CDI. " +
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.core.api.projectstage.ProjectStage

        return null;
    }

    private void logConvertedBean(AnnotatedType annotatedType, Class<? extends Annotation> jsf2ScopeAnnotation)
    {
        ProjectStage projectStage = ProjectStageProducer.getInstance().getProjectStage();

        if (projectStage == ProjectStage.Development)
        {
            logger.info("JSF2 bean was converted to a CDI bean. type: " + annotatedType.getJavaClass().getName() +
                    " original scope: " + jsf2ScopeAnnotation.getName());
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.core.api.projectstage.ProjectStage

        ManagedBean managedBeanAnnotation = beanClass.getAnnotation(ManagedBean.class);

        if(managedBeanAnnotation.eager())
        {
            ProjectStage projectStage = ProjectStageProducer.getInstance().getProjectStage();

            if (projectStage == ProjectStage.Development)
            {
                logger.warning("Bean of type " + beanClass.getName() + " uses @" + ManagedBean.class.getName() +
                        " in combination with #eager = true. That's not supported with CDI. " +
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.core.api.projectstage.ProjectStage

            ProjectStageProducer psp = JsfProjectStageProducer.getInstance();
            Assert.assertNotNull(psp);

            ProjectStageProducer.setProjectStage(null);

            ProjectStage ps = psp.getProjectStage();
            Assert.assertNotNull(ps);
            Assert.assertEquals(ps, ProjectStage.Production);
            Assert.assertTrue(ps == ProjectStage.Production);
        }
        finally
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.core.api.projectstage.ProjectStage

public class ProjectStageTest {

    @Test
    public void testProjectStages() throws Exception
    {
        ProjectStage ps = ProjectStage.Development;
        Assert.assertNotNull(ps);

        ProjectStage psOther = ProjectStage.valueOf("CustomProjectStage");
        Assert.assertNotNull(psOther);

        psOther = TestProjectStages.CustomProjectStage;
        Assert.assertNotNull(psOther);

        ProjectStage psProd = ProjectStage.valueOf("Production");
        Assert.assertNotNull(psProd);

        ProjectStage[] values = ProjectStage.values();
        Assert.assertNotNull(values);
        Assert.assertTrue(values.length == 7);
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.core.api.projectstage.ProjectStage

       
        // we need to do this manually because there is no dependency injection in place
        // at this time
        ProjectStageProducer psp = ProjectStageProducer.getInstance();

        ProjectStage projectStage = psp.getProjectStage();

        if (projectStage == ProjectStage.UnitTest)
        {
            // for unit tests, we use the mock context
            afterBeanDiscovery.addContext(new MockViewScopedContext());
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.core.api.projectstage.ProjectStage

            ProjectStageProducer psp = JsfProjectStageProducer.getInstance();
            Assert.assertNotNull(psp);

            ProjectStageProducer.setProjectStage(null);

            ProjectStage ps = psp.getProjectStage();
            Assert.assertNotNull(ps);
            Assert.assertEquals(ps, ProjectStage.SystemTest);
            Assert.assertTrue(ps == ProjectStage.SystemTest);
        }
        finally
View Full Code Here

Examples of org.apache.myfaces.tobago.application.ProjectStage

    formAction = facesContext.getExternalContext().encodeActionURL(formAction);
    String contentType = writer.getContentTypeWithCharSet();
    ResponseUtils.ensureContentTypeHeader(facesContext, contentType);
    String clientId = page.getClientId(facesContext);
    final ClientProperties client = VariableResolverUtils.resolveClientProperties(facesContext);
    final ProjectStage projectStage = TobagoConfig.getInstance(facesContext).getProjectStage();
    final boolean developmentMode =  projectStage == ProjectStage.Development;
    final boolean debugMode = client.isDebugMode() || developmentMode;
    final boolean productionMode = !debugMode && projectStage == ProjectStage.Production;
    boolean calculateScrollbarWeight = false;
    int clientLogSeverity = 2;
View Full Code Here

Examples of org.apache.myfaces.tobago.application.ProjectStage

    formAction = facesContext.getExternalContext().encodeActionURL(formAction);
    String contentType = writer.getContentTypeWithCharSet();
    ResponseUtils.ensureContentTypeHeader(facesContext, contentType);
    String clientId = page.getClientId(facesContext);
    final ClientProperties client = VariableResolverUtils.resolveClientProperties(facesContext);
    final ProjectStage projectStage = TobagoConfig.getInstance(facesContext).getProjectStage();
    final boolean developmentMode =  projectStage == ProjectStage.Development;
    final boolean debugMode = client.isDebugMode() || developmentMode;
    final boolean productionMode = !debugMode && projectStage == ProjectStage.Production;
    boolean calculateScrollbarWeight = false;
    int clientLogSeverity = 2;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.