Examples of ConfigurationPoint


Examples of org.apache.hivemind.internal.ConfigurationPoint

    public boolean containsConfiguration(String configurationId, Module module)
    {
        checkShutdown();

        ConfigurationPoint result = (ConfigurationPoint) _configurationPoints.get(configurationId);

        return result != null && result.visibleToModule(module);
    }
View Full Code Here

Examples of org.apache.hivemind.internal.ConfigurationPoint

        RegistryInfrastructure registryInfrastructure = ric.constructRegistryInfrastructure(definition);

        ServicePoint sp = registryInfrastructure.getServicePoint("foo.bar.sp1", null);
        assertNotNull(sp);

        ConfigurationPoint cp = registryInfrastructure.getConfigurationPoint("zip.zoop.cp1", null);
        assertNotNull(cp);
    }
View Full Code Here

Examples of org.apache.hivemind.internal.ConfigurationPoint

    }

    public void testUnknownServiceModelFactory()
    {
        MockControl cpc = newControl( ConfigurationPoint.class );
        ConfigurationPoint cp = ( ConfigurationPoint ) cpc.getMock();

        // Training
        cp.getExtensionPointId();
        cpc.setReturnValue( "hivemind.ServiceModels" );
        cp.getConfigurationType();
        cpc.setReturnValue(List.class);
        cp.visibleToModule( null );
        cpc.setReturnValue( true );
        cp.getConfiguration();
        cpc.setReturnValue( Collections.EMPTY_MAP );
        replayControls();
        RegistryInfrastructureImpl r = new RegistryInfrastructureImpl( null, null );
        r.addConfigurationPoint( cp );
        try
View Full Code Here

Examples of org.apache.hivemind.internal.ConfigurationPoint

    public void testGetConfigurationNotVisibleToModule()
    {
        RegistryInfrastructureImpl rf = new RegistryInfrastructureImpl(null, null);

        MockControl control = newControl(ConfigurationPoint.class);
        ConfigurationPoint point = (ConfigurationPoint) control.getMock();

        ModuleImpl m = new ModuleImpl();
        m.setModuleId("zip.zap.Zoom");

        // Training

        point.getExtensionPointId();
        control.setReturnValue("foo.bar.Baz");

        point.getConfigurationType();
        control.setReturnValue(List.class);
       
        point.visibleToModule(m);
        control.setReturnValue(false);

        replayControls();

        rf.addConfigurationPoint(point);
View Full Code Here

Examples of org.apache.hivemind.internal.ConfigurationPoint

    }

    public void testUnknownServiceModelFactory()
    {
        MockControl cpc = newControl(ConfigurationPoint.class);
        ConfigurationPoint cp = (ConfigurationPoint) cpc.getMock();

        // Training

        cp.getExtensionPointId();
        cpc.setReturnValue("hivemind.ServiceModels");

        cp.visibleToModule(null);
        cpc.setReturnValue(true);

        cp.getElements();
        cpc.setReturnValue(Collections.EMPTY_LIST);

        replayControls();

        RegistryInfrastructureImpl r = new RegistryInfrastructureImpl(null, null);
View Full Code Here

Examples of org.apache.hivemind.internal.ConfigurationPoint

        {
            ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) points.get(i);

            String pointId = moduleId + "." + cpd.getId();

            ConfigurationPoint existingPoint = (ConfigurationPoint) _configurationPoints
                    .get(pointId);

            if (existingPoint != null)
            {
                _errorHandler.error(_log, ImplMessages.duplicateExtensionPointId(
View Full Code Here

Examples of org.apache.hivemind.internal.ConfigurationPoint

    public ConfigurationPoint getConfigurationPoint(String configurationId, Module module)
    {
        checkShutdown();

        ConfigurationPoint result = (ConfigurationPoint) _configurationPoints.get(configurationId);

        if (result == null)
            throw new ApplicationRuntimeException(ImplMessages.noSuchConfiguration(configurationId));

        if (!result.visibleToModule(module))
            throw new ApplicationRuntimeException(ImplMessages.configurationNotVisible(
                    configurationId,
                    module));

        return result;
View Full Code Here

Examples of org.apache.hivemind.internal.ConfigurationPoint

        return result;
    }

    public List getConfiguration(String configurationId, Module module)
    {
        ConfigurationPoint point = getConfigurationPoint(configurationId, module);

        return point.getElements();
    }
View Full Code Here

Examples of org.apache.hivemind.internal.ConfigurationPoint

        return point.getElements();
    }

    public boolean isConfigurationMappable(String configurationId, Module module)
    {
        ConfigurationPoint point = getConfigurationPoint(configurationId, module);

        return point.areElementsMappable();
    }
View Full Code Here

Examples of org.apache.hivemind.internal.ConfigurationPoint

        return point.areElementsMappable();
    }

    public Map getConfigurationAsMap(String configurationId, Module module)
    {
        ConfigurationPoint point = getConfigurationPoint(configurationId, module);

        return point.getElementsAsMap();
    }
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.