Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
java
java
titleResolving and using the Project-Stage
@Inject
private ProjectStage projectStage;

//...

boolean isDevProjectStage = ProjectStage.Development.equals(this.projectStage);

Creating a custom type-safe project-stage

To configure the project-stage via the Service-Loader mechanism, it's required to implement the ProjectStageHolder interface. In this class you nest the custom project-stage implementations which have to be public static final class and it's required to extend ProjectStage.

...


public class CustomProjectStage implements ProjectStageHolder
{
    public static final class Debugging extends ProjectStage
    {
        private static final long serialVersionUID = -8626602281649294170L;
    }

    public static final Debugging Debugging = new Debugging();
}

It's required to provide a {{public static final}} instance even though, you won't use it directly.

Furthermore, you have to add the *fully qualified* class to /META-INF/services/org.apache.myfaces.extensions.cdi.core.api.projectstage.ProjectStageHolder


{code:java|title=Using a custom project-stage implementation}
@ProjectStageActivated({CustomProjectStage.Debugging.class})
public class DebuggingAspect
{
  //...
}

Provider

BeanManagerProvider

...

Security/Event

InvalidBeanCreationEvent

Usage for Developers

Config

ConfiguredValueResolver

ConfiguredValueDescriptor

AttributeAware

AbstractAttributeAware

Config/View

ManualView

Interpreter

ExpressionInterpreter

Resolver

GenericResolver

BeanValidation

Security

AccessDecisionVoterContext

AccessDecisionState

Startup

CodiStartupBroadcaster

StartupEvent

StartupEventBroadcaster

Register a custom StartupEventBroadcaster for integrating a broadcaster which gets invoked before the StartupEvent gets fired.
Attention: There is no guarantee that CDI has been bootstrapped.
However, a StartupEventBroadcaster allows to do it (see the controlled bootstrapping add-on).

Note
titleHint

The usage of @InvocationOrder is supported.

Tools

InvocationOrderComparator

Util

ClassUtils

Misc

Aggregatable

CodiInformation

...