Examples of ModuleDefinition


Examples of org.apache.hivemind.definition.ModuleDefinition

        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

Examples of org.apache.hivemind.definition.ModuleDefinition

        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

Examples of org.apache.hivemind.definition.ModuleDefinition

    {
        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

Examples of org.apache.hivemind.definition.ModuleDefinition

    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

Examples of org.apache.hivemind.definition.ModuleDefinition

    // is failing inside Eclipse.  It appears the be a Log4J
    // configuration problem ... but I have no idea why.

    public void testInterceptorSort() throws Exception
    {
        ModuleDefinition module = new SimpleModule();
        ServicePointDefinition servicePoint = module.getServicePoint("Simple");
       
        InterceptorDefinition interceptor1 = new OrderedInterceptorDefinitionImpl(module, "Fred", newLocation(), new TrackerServiceInterceptorConstructor("Fred"), "Barney", null);
        servicePoint.addInterceptor(interceptor1);
        InterceptorDefinition interceptor2 = new OrderedInterceptorDefinitionImpl(module, "Barney", newLocation(), new TrackerServiceInterceptorConstructor("Barney"), null, null);
        servicePoint.addInterceptor(interceptor2);
View Full Code Here

Examples of org.apache.hivemind.definition.ModuleDefinition

        module.setModuleId("module");
        module.toString();
        new RegistryInfrastructureImpl(null, Locale.ENGLISH).toString();
        new InterceptorStackImpl(null, mockServicePoint, null).toString();

        ModuleDefinition md = new ModuleDefinitionImpl("module", null, null, null);
        ServicePointDefinitionImpl spd = new ServicePointDefinitionImpl(md, "service", null,
                Visibility.PUBLIC, Runnable.class.getName());
        ImplementationDefinition sid = new ImplementationDefinitionImpl(md,
                null, null, ServiceModel.PRIMITIVE, true);
        spd.addImplementation(sid);
View Full Code Here

Examples of org.apache.hivemind.definition.ModuleDefinition

        // For the sake of backward compatibility add the core
        // to an existing module that may have been created by the XmlRegistryProvider
        // This way the core services and the hivemodule.xml from the xml package share
        // the same module name "hivemind"

        ModuleDefinition md = registryDefinition.getModule("hivemind");
        if (md == null)
        {
            md = new ModuleDefinitionImpl("hivemind", HiveMind.getClassLocation(getClass(), resolver),
                    resolver, null);
            registryDefinition.addModule(md);
View Full Code Here

Examples of org.apache.hivemind.definition.ModuleDefinition

        ServicePoint point = (ServicePoint) pointControl.getMock();
       
        SchemaImpl schema = new SchemaImpl("module");
        schema.setRootElementClassName(ArrayList.class.getName());
       
        ModuleDefinition md = createModuleDefinition("test");
        XmlServicePointDefinitionImpl xmlSpd = new XmlServicePointDefinitionImpl(md);
        xmlSpd.setParametersCount(Occurances.REQUIRED);
        xmlSpd.setParametersSchema(schema);
       
        Location location = newLocation();
View Full Code Here

Examples of org.apache.hivemind.definition.ModuleDefinition

    protected Registry buildFrameworkRegistry(ModuleDefinition[] customModules)
    {
        RegistryDefinition registryDefinition = new RegistryDefinitionImpl();
        for (int i = 0; i < customModules.length; i++)
        {
            ModuleDefinition module = customModules[i];
            registryDefinition.addModule(module);
        }

        RegistryBuilder builder = new RegistryBuilder(registryDefinition);
        return builder.constructRegistry(Locale.getDefault());
View Full Code Here

Examples of org.apache.hivemind.definition.ModuleDefinition

    }

    public void testGetUnqualifiedServicePoint()
    {
        RegistryInfrastructureImpl r = new RegistryInfrastructureImpl( null, null );
        ModuleDefinition moduleDefinition = createModuleDefinition("module1");
        final ModuleImpl module1 = new ModuleImpl();
        module1.setModuleId( "module1" );
        r.addServicePoint( createServicePoint(moduleDefinition, module1, "foo", ResultSet.class, Visibility.PUBLIC ) );
        try
        {
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.