Examples of ProjectStage


Examples of javax.faces.application.ProjectStage

      debug = config.getServletContext().getInitParameter(DEBUG_INIT_PARAM);
    }

    // private call to get the used JSF 2.0 ProjectStage as we don't have
    // access to the FacesContext object here...
    ProjectStage currentStage = _getFacesProjectStage(config.getServletContext());

    if (debug != null)
    {
      _debug = "true".equalsIgnoreCase(debug)
    }
View Full Code Here

Examples of org.apache.deltaspike.core.api.projectstage.ProjectStage

            URL propertyUrl = propertyUrls.nextElement();
            fillProperties(properties, propertyUrl);
        }

        // and also read the ones post-fixed with the projectStage
        ProjectStage ps = ProjectStageProducer.getInstance().getProjectStage();

        propertyUrls = cl.getResources(propertyFileName + "-" + ps + FILE_EXTENSION);
        while (propertyUrls != null && propertyUrls.hasMoreElements())
        {
            URL propertyUrl = propertyUrls.nextElement();
View Full Code Here

Examples of org.apache.deltaspike.core.api.projectstage.ProjectStage

     * @return the configured value or if non found the defaultValue
     *
     */
    public static String getProjectStageAwarePropertyValue(String key)
    {
        ProjectStage ps = getProjectStage();

        String value = getPropertyValue(key + '.' + ps);
        if (value == null)
        {
            value = getPropertyValue(key);
View Full Code Here

Examples of org.apache.deltaspike.core.api.projectstage.ProjectStage

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

                ProjectStageProducer.setProjectStage(null);

                ProjectStage ps = psp.getProjectStage();
                Assert.assertNotNull(ps);
                Assert.assertEquals(ps, ProjectStage.SystemTest);
                Assert.assertTrue(ps == ProjectStage.SystemTest);

                ProjectStageProducer.setProjectStage(null);
View Full Code Here

Examples of org.apache.deltaspike.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.deltaspike.core.api.projectstage.ProjectStage

        }

        //TODO needs further discussions for a different feature CodiStartupBroadcaster.broadcastStartup();

        //also forces deterministic project-stage initialization
        ProjectStage projectStage = ProjectStageProducer.getInstance().getProjectStage();

        Exclude exclude = extractExcludeAnnotation(processAnnotatedType.getAnnotatedType().getJavaClass());

        if (exclude == null)
        {
View Full Code Here

Examples of org.apache.deltaspike.core.api.projectstage.ProjectStage

        return new Jsf2BeanWrapper(annotatedType, this.mappedJsfScopes.get(jsf2ScopeAnnotation), jsf2ScopeAnnotation);
    }

    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

            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.extensions.cdi.core.api.projectstage.ProjectStage

    private boolean isInProjectStage(Class<? extends ProjectStage>[] activatedIn)
    {
        if (activatedIn != null && activatedIn.length > 0)
        {
            ProjectStage ps = ProjectStageProducer.getInstance().getProjectStage();
            for (Class<? extends ProjectStage> activated : activatedIn)
            {
                if (ProjectStage.class.getName().equals(activated.getName()))
                {
                    throw new IllegalStateException(
                            "Using " + ProjectStage.class.getName() + " directly isn't allowed.");
                }

                if (ps.getClass().equals(activated))
                {
                    return true;
                }
            }
        }
View Full Code Here

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

        // first manually reset the ProjectStage
        ProjectStageProducer.setProjectStage(null);

        psp.determineProjectStage();

        ProjectStage ps = psp.getProjectStage();
        Assert.assertNotNull(ps);
        Assert.assertEquals(ps, ProjectStage.Production);
        Assert.assertTrue(ps == ProjectStage.Production);
    }
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.