Examples of AcrossContextInfo


Examples of com.foreach.across.core.context.info.AcrossContextInfo

      return null;
    }
  }

  private void destroy( AcrossContext context, String moduleName ) {
    AcrossContextInfo contextInfo = AcrossContextUtils.getContextInfo( context );
    ( (AbstractApplicationContext) contextInfo.getModuleInfo( moduleName ).getApplicationContext() ).destroy();
  }
View Full Code Here

Examples of com.foreach.across.core.context.info.AcrossContextInfo

  public boolean matches( ConditionContext context, AnnotatedTypeMetadata metadata ) {
    Map<String, Object> attributes = metadata.getAnnotationAttributes( AcrossDepends.class.getName() );
    String[] required = (String[]) attributes.get( "required" );
    String[] optional = (String[]) attributes.get( "optional" );

    AcrossContextInfo acrossContext = context.getBeanFactory().getBean( AcrossContextInfo.class );

    return applies( acrossContext.getBootstrapConfiguration(), required, optional );
  }
View Full Code Here

Examples of com.foreach.across.core.context.info.AcrossContextInfo

  @Module("ModuleTwo")
  private ModuleConfig.BeanWithCurrentModules beanFromTwo;

  @Test
  public void verifyCurrentModuleWiredCorrectly() {
    AcrossContextInfo contextInfo = AcrossContextUtils.getContextInfo( acrossContext );
    assertNotNull( contextInfo );

    AcrossModuleInfo moduleOne = contextInfo.getModuleInfo( "ModuleOne" );
    assertNotNull( moduleOne );
    ModuleConfig.BeanWithCurrentModules beanWithCurrentModules = beanRegistry.getBeanFromModule( "ModuleOne",
                                                                                                 "beanWithCurrentModules" );
    assertNull( beanWithCurrentModules.getParent() );
    beanWithCurrentModules.assertCurrentModule( moduleOne.getModule() );

    AcrossModuleInfo moduleTwo = contextInfo.getModuleInfo( "ModuleTwo" );
    assertNotNull( moduleTwo );
    beanWithCurrentModules = beanRegistry.getBeanFromModule( "ModuleTwo", "beanWithCurrentModules" );
    beanWithCurrentModules.assertCurrentModule( moduleTwo.getModule() );

    assertNotNull( beanWithCurrentModules.getParent() );
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.