<commit_before>package org.jboss.seam.faces.environment;

import javax.enterprise.inject.Produces;
import javax.faces.context.FacesContext;
import javax.inject.Named;

/**
 * <p>
 * A producer which retrieves the Project Stage for the current
 * request of the JavaServer Faces application, storing the result as a
 * dependent-scoped bean instance.
 * </p>
 * 
 * <p>
 * This producer is named, allowing the Project Stage to be accessed via EL:
 * </p>
 * 
 * <pre>
 * #{projectStage}
 * </pre>
 * 
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 */
public class ProjectStageProducer
{
   @Named
   @Produces
   public String getProjectStage(final FacesContext context)
   {
      return context.getExternalContext().getInitParameter("javax.faces.PROJECT_STAGE");
   }
}<commit_msg>SEAMFACES-95: Make ProjectStage available from EL - using Enum<commit_after>package org.jboss.seam.faces.environment;

import javax.enterprise.inject.Produces;
import javax.faces.application.ProjectStage;
import javax.faces.context.FacesContext;
import javax.inject.Named;

/**
 * <p>
 * A producer which retrieves the ProjectStage for the current request
 * of the JavaServer Faces application, storing the result as a
 * ApplicationScoped bean instance.
 * </p>
 * 
 * <p>
 * This producer is named, allowing the Project Stage to be accessed via EL:
 * </p>
 * 
 * <pre>
 * #{projectStage}
 * </pre>
 * 
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 */
public class ProjectStageProducer
{
   @Named
   @Produces
   public ProjectStage getProjectStage(final FacesContext context)
   {
      return context.getApplication().getProjectStage();
   }
}
{'fraction_non_alphanumeric': 0.1175030599755202, 'fraction_numerical': 0.0012239902080783353, 'mean_word_length': 4.1415094339622645, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2656386', 'n_tokens_mistral': 506, 'n_tokens_neox': 498, 'n_words': 142}