Package com.foreach.across.core.context.configurer

Examples of com.foreach.across.core.context.configurer.AnnotatedClassConfigurer


    assertNull( conditionalBean( moduleTwo ) );
  }

  @Test
  public void notCreatedIfOneConditionFails() {
    context.addApplicationContextConfigurer( new AnnotatedClassConfigurer( MultipleConditionConfig.class ),
                                             ConfigurerScope.MODULES_ONLY );
    moduleOne.setProperty( "propertyOne", 123 );
    moduleOne.setProperty( "propertyTwo", 123 );
    context.addModule( moduleOne );
View Full Code Here


    assertNull( conditionalBean( moduleThree ) );
  }

  @Test
  public void notCreatedIfConditionsSucceedButDependencyFails() {
    context.addApplicationContextConfigurer( new AnnotatedClassConfigurer( ConditionAndDependsConfig.class ),
                                             ConfigurerScope.MODULES_ONLY );

    context.addModule( moduleOne );

    context.bootstrap();
View Full Code Here

    assertNull( conditionalBean( moduleOne ) );
  }

  @Test
  public void notCreatedIfDependencyMatchesButConditionsFail() {
    context.addApplicationContextConfigurer( new AnnotatedClassConfigurer( ConditionAndDependsConfig.class ),
                                             ConfigurerScope.MODULES_ONLY );

    context.addModule( moduleFour );

    context.bootstrap();
View Full Code Here

    assertNull( conditionalBean( moduleFour ) );
  }

  @Test
  public void createdIfBothDependencyMatchesAndConditionsSucceed() {
    context.addApplicationContextConfigurer( new AnnotatedClassConfigurer( ConditionAndDependsConfig.class ),
                                             ConfigurerScope.MODULES_ONLY );

    context.addModule( moduleOne );
    context.addModule( moduleFour );
View Full Code Here

   * @param context AcrossContext instance.
   * @return Merges set of ApplicationContextConfigurers.
   */
  public static Collection<ApplicationContextConfigurer> getConfigurersToApply( AcrossContext context ) {
    Set<ApplicationContextConfigurer> configurers = new LinkedHashSet<>();
    configurers.add( new AnnotatedClassConfigurer( AcrossConfig.class ) );

    configurers.add( new AnnotatedClassConfigurer( AcrossInstallerConfig.class ) );

    for ( Map.Entry<ApplicationContextConfigurer, ConfigurerScope> configurerEntry : context
        .getApplicationContextConfigurers().entrySet() ) {
      if ( configurerEntry.getValue() != ConfigurerScope.MODULES_ONLY ) {
        configurers.add( configurerEntry.getKey() );
View Full Code Here

{
  private final String name;

  protected AbstractInlineModule( String name, Class... annotatedClasses ) {
    this.name = name;
    addApplicationContextConfigurer( new AnnotatedClassConfigurer( annotatedClasses ) );
  }
View Full Code Here

   * <p>Add one or more annotated classes to the module ApplicationContext.</p>
   *
   * @param annotatedClasses Configuration classes.
   */
  public void addApplicationContextConfigurer( Class... annotatedClasses ) {
    addApplicationContextConfigurer( new AnnotatedClassConfigurer( annotatedClasses ) );
  }
View Full Code Here

TOP

Related Classes of com.foreach.across.core.context.configurer.AnnotatedClassConfigurer

Copyright © 2018 www.massapicom. 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.