Package org.impalaframework.module

Examples of org.impalaframework.module.RootModuleDefinition


        Assert.notNull(moduleToReload,
                "moduleName is required as it specifies the name used to match the module to reload in "
                        + this.getClass().getName());
       
        ModuleStateHolder moduleStateHolder = getModuleStateHolder();
        RootModuleDefinition newDefinition = moduleStateHolder.cloneRootModuleDefinition();

        ModuleDefinition found = newDefinition.findChildDefinition(moduleToReload, false);

        if (found != null) {

            String foundModuleName = found.getName();
           
View Full Code Here


       
        //note that the module definition source is externally supplied
        ModuleDefinitionSource newModuleDefinitionSource = moduleOperationInput.getModuleDefinitionSource();
        Assert.notNull(newModuleDefinitionSource, "moduleDefinitionSource is required as it specifies the new module definition to apply in " + this.getClass().getName());
       
        RootModuleDefinition newModuleDefinition = newModuleDefinitionSource.getModuleDefinition();
        RootModuleDefinition oldModuleDefinition = getExistingModuleDefinitionSource();
       
        ModificationExtractorType modificationExtractorType = getModificationExtractorType();
       
        // figure out the modules to reload
        ModificationExtractor calculator = getModificationExtractorRegistry().getModificationExtractor(modificationExtractorType);
View Full Code Here

    private GraphClassLoader newGraphClassLoader() {
        TypeReaderRegistry typeReaderRegistry = TypeReaderRegistryFactory.getTypeReaderRegistry();
        ModuleLocationResolver resolver = new StandaloneModuleLocationResolver();
        InternalModuleDefinitionSource source = new InternalModuleDefinitionSource(typeReaderRegistry, resolver, new String[]{"impala-core", "sample-module4", "sample-module6"});

        RootModuleDefinition rootDefinition = source.getModuleDefinition();
       
        DependencyManager dependencyManager = new DependencyManager(rootDefinition);
        GraphClassLoaderFactory factory = new GraphClassLoaderFactory();
        factory.setModuleLocationResolver(resolver);
       
View Full Code Here

* @author Phil Zoio
*/
public class ShowModulesCommand implements Command {

    public boolean execute(CommandState commandState) {
        final RootModuleDefinition rootModuleDefinition = Impala.getRootModuleDefinition();
       
        printModuleInfo(rootModuleDefinition);
        return false;
    }
View Full Code Here

  }
 
  protected void postProcessBundleContext(BundleContext context) throws Exception {
   
    Impala.init();
    RootModuleDefinition definition = getModuleDefinition();
   
    ServiceReference serviceReference = context.getServiceReference(ModuleDefinitionSource.class.getName());
   
    Object service = context.getService(serviceReference);
   
View Full Code Here

        return directoryName.equals(rootProject);
    }

    static String getRootProject() {
       
        RootModuleDefinition md;
        try {
            md = Impala.getRootModuleDefinition();
            return (md != null ? md.getName() : null);
        } catch (NoServiceException e) {
            CommandPropertyValue property = GlobalCommandState.getInstance().getProperty(CommandStateConstants.DEBUG_MODE);
            if (property != null && "true".equalsIgnoreCase(property.getValue())) {
                e.printStackTrace();
            }
View Full Code Here

public class RepairCommand implements TextParsingCommand {
   
    public boolean execute(CommandState commandState) {
       
        final RootModuleDefinition rootModuleDefinition = Impala.getRootModuleDefinition();
        if (rootModuleDefinition == null) {
            System.out.println("Cannot reload, as no module definition has been loaded.");
            return false;
        }
        return reload(commandState);
View Full Code Here

        StopWatch watch = new StopWatch();
        watch.start();
        Impala.repairModules();
        watch.stop();
        InteractiveCommandUtils.printExecutionInfo(watch);
        final RootModuleDefinition rootModuleDefinition = Impala.getRootModuleDefinition();
       
        System.out.println("Current module state:");
        System.out.println(rootModuleDefinition.toString());
       
        return true;
    }
View Full Code Here

* @author Phil Zoio
*/
public class ShowModulesCommand implements Command {

    public boolean execute(CommandState commandState) {
        final RootModuleDefinition rootModuleDefinition = Impala.getRootModuleDefinition();
       
        printModuleInfo(rootModuleDefinition);
        return false;
    }
View Full Code Here

        return directoryName.equals(rootProject);
    }

    static String getRootProject() {
       
        RootModuleDefinition md;
        try {
            md = Impala.getRootModuleDefinition();
            return (md != null ? md.getName() : null);
        } catch (NoServiceException e) {
            CommandPropertyValue property = GlobalCommandState.getInstance().getProperty(CommandStateConstants.DEBUG_MODE);
            if (property != null && "true".equalsIgnoreCase(property.getValue())) {
                e.printStackTrace();
            }
View Full Code Here

TOP

Related Classes of org.impalaframework.module.RootModuleDefinition

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.