org.apache.myfaces.extensions.cdi.core.api.projectstage
Annotation Type ProjectStageActivated


@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface ProjectStageActivated

Use this annotation, e.g. in conjunction with Alternative to 'disable' the @Alternative based on the current ProjectStage.

Please note that you still have to add all alternative beans to the respective beans.xml <alternatives> section.

@ProjectStageActivated can also be used to veto other kind of beans.

Example Usage:

 @Alternative
 @ProjectStageActivated({ProjectStage.Development.class, ProjectStage.UnitTest.class})
 @ApplicationScoped
 public class MockMailServiceImpl implements MailService {...}
 


Required Element Summary
 Class<? extends ProjectStage>[] value
          The ProjectStages the which lead to activating this alternative bean.
 

Element Detail

value

public abstract Class<? extends ProjectStage>[] value
The ProjectStages the which lead to activating this alternative bean. If the current ProjectStage is not in this list, the bean will get vetoed.



Copyright © 2010 The Apache Software Foundation. All Rights Reserved.