Package org.apache.hivemind.definition

Examples of org.apache.hivemind.definition.ModuleDefinition


     * Tests the string representation of the location of a module and an extension point
     */
    public void testLocation()
    {
        RegistryDefinition registry = constructRegistryDefinition(SimpleAnnotatedModule.class);
        ModuleDefinition module = registry.getModule("org.apache.hivemind.annotations.SimpleAnnotatedModule");
        assertEquals("Class org.apache.hivemind.annotations.SimpleAnnotatedModule", module.getLocation().toString());
        ServicePointDefinition service = registry.getServicePoint("org.apache.hivemind.annotations.SimpleAnnotatedModule.Test");
        assertEquals("Class org.apache.hivemind.annotations.SimpleAnnotatedModule, method getRunnable", service.getLocation().toString());
    }
View Full Code Here


        _document.appendChild(registry);

        for (Iterator i = _registryDefinition.getModules().iterator(); i.hasNext();)
        {
            ModuleDefinition module = (ModuleDefinition) i.next();

            Element moduleElement = getModuleElement(module);
            registry.appendChild(moduleElement);
           
        }
View Full Code Here

    public void testDependency() throws Exception
    {
        ModuleDefinitionImpl dependingModule = createModuleDefinition(
                "dependency.declaring.module");

        ModuleDefinition requiredModule = createModuleDefinition("required.module");
       
        dependingModule.addDependency(requiredModule.getId());

        buildFrameworkRegistry(new ModuleDefinition[] {dependingModule, requiredModule});
    }
View Full Code Here

    {
        String moduleId = IdUtils.extractModule(qualifiedServicePointId);
        String servicePointId = IdUtils.stripModule(qualifiedServicePointId);

        ServicePointDefinition servicePoint = null;
        ModuleDefinition module = getModule(moduleId);
        if (module != null)
        {
            servicePoint = module.getServicePoint(servicePointId);
        }
        return servicePoint;
    }
View Full Code Here

    {
        String moduleId = IdUtils.extractModule(qualifiedConfigurationPointId);
        String configurationPointId = IdUtils.stripModule(qualifiedConfigurationPointId);

        ConfigurationPointDefinition configurationPoint = null;
        ModuleDefinition module = getModule(moduleId);
        if (module != null)
        {
            configurationPoint = module.getConfigurationPoint(configurationPointId);
        }
        return configurationPoint;
    }
View Full Code Here

     */
    public void resolveExtensions()
    {
        for (Iterator iterModules = _definition.getModules().iterator(); iterModules.hasNext();)
        {
            ModuleDefinition module = (ModuleDefinition) iterModules.next();
       
            resolveImplementations(module);
            resolveInterceptors(module);
            resolveContributions(module);
            resolveConfigurationParsers(module);
View Full Code Here

        Location l = newLocation();
        Module module = newModule();

        replayControls();

        ModuleDefinition moduleDefinition = createModuleDefinition("module");
        ServicePointDefinitionImpl definition = new ServicePointDefinitionImpl(moduleDefinition, "zip.zap", l, Visibility.PUBLIC, "foo.bar.Baz");
        ServicePointImpl sp = new ServicePointImpl(module, definition);

        try
        {
View Full Code Here

        Location l = newLocation();

        MockControl modulec = newControl(Module.class);
        Module module = (Module) modulec.getMock();

        ModuleDefinition moduleDef = createModuleDefinition("foo");
        ServicePointDefinitionImpl definition = new ServicePointDefinitionImpl(moduleDef, "bar", l, Visibility.PUBLIC, "java.util.List");
        definition.addImplementation(new ImplementationDefinitionImpl(moduleDef, l, null, "fred", true));
        ServicePointImpl sp = new ServicePointImpl(module, definition);

        Object service = new ArrayList();
View Full Code Here

    {
        Collection modules = _definition.getModules();
       
        for (Iterator iterModules = modules.iterator(); iterModules.hasNext();)
        {
            ModuleDefinition module = (ModuleDefinition) iterModules.next();
            if (module instanceof XmlModuleDefinitionImpl) {
                XmlModuleDefinitionImpl xmlModule = (XmlModuleDefinitionImpl) module;
                resolveServicePointSchemas(xmlModule);
                resolveSchemaAssignments(xmlModule);
            }
View Full Code Here

    public void buildGlobalSchemaMap()
    {
        Collection modules = _definition.getModules();
        for (Iterator iterModules = modules.iterator(); iterModules.hasNext();)
        {
            ModuleDefinition module = (ModuleDefinition) iterModules.next();
            if (module instanceof XmlModuleDefinitionImpl) {
                XmlModuleDefinitionImpl xmlModule = (XmlModuleDefinitionImpl) module;
                Collection schemas = xmlModule.getSchemas();
                for (Iterator iterSchemas = schemas.iterator(); iterSchemas.hasNext();)
                {
                    Schema schema = (Schema) iterSchemas.next();
                    String schemaId = IdUtils.qualify(module.getId(), schema.getId());
                    _schemas.put(schemaId, schema);
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.definition.ModuleDefinition

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.