Examples of ContributionDescriptor


Examples of org.apache.hivemind.parse.ContributionDescriptor

    public void testContributionIf() throws Exception
    {
        ModuleDescriptor md = parse("ContributionIf.xml");

        List l = md.getContributions();
        ContributionDescriptor cd = (ContributionDescriptor) l.get(0);

        assertEquals("class foo.bar.Blat", cd.getConditionalExpression());
    }
View Full Code Here

Examples of org.apache.hivemind.parse.ContributionDescriptor

        if (contributions != null)
        {
            for (Iterator i = contributions.iterator(); i.hasNext();)
            {
                ContributionDescriptor cd = (ContributionDescriptor) i.next();

                Element contribution = getContributionElement(cd);

                module.appendChild(contribution);
            }
View Full Code Here

Examples of org.apache.hivemind.parse.ContributionDescriptor

        List contributions = md.getContributions();
        int count = size(contributions);

        for (int i = 0; i < count; i++)
        {
            ContributionDescriptor cd = (ContributionDescriptor) contributions.get(i);

            if (!includeContribution(cd.getConditionalExpression(), sourceModule, cd.getLocation()))
                continue;

            String pointId = cd.getConfigurationId();
            String qualifiedId = IdUtils.qualify(moduleId, pointId);

            ConfigurationPointImpl point = (ConfigurationPointImpl) _configurationPoints
                    .get(qualifiedId);

            if (point == null)
            {
                _errorHandler.error(_log, ImplMessages.unknownConfigurationPoint(moduleId, cd), cd
                        .getLocation(), null);

                continue;
            }

            if (!point.visibleToModule(sourceModule))
            {
                _errorHandler.error(_log, ImplMessages.configurationPointNotVisible(
                        point,
                        sourceModule), cd.getLocation(), null);
                continue;
            }

            addContributionElements(sourceModule, point, cd.getElements());
        }
    }
View Full Code Here

Examples of org.apache.hivemind.parse.ContributionDescriptor

        List contributions = md.getContributions();
        int count = size(contributions);

        for (int i = 0; i < count; i++)
        {
            ContributionDescriptor cd = (ContributionDescriptor) contributions.get(i);

            if (!includeContribution(cd.getConditionalExpression(), sourceModule, cd.getLocation()))
                continue;

            String pointId = cd.getConfigurationId();
            String qualifiedId = IdUtils.qualify(moduleId, pointId);

            ConfigurationPointImpl point = (ConfigurationPointImpl) _configurationPoints
                    .get(qualifiedId);

            if (point == null)
            {
                _errorHandler.error(_log, ImplMessages.unknownConfigurationPoint(moduleId, cd), cd
                        .getLocation(), null);

                continue;
            }

            if (!point.visibleToModule(sourceModule))
            {
                _errorHandler.error(_log, ImplMessages.configurationPointNotVisible(
                        point,
                        sourceModule), cd.getLocation(), null);
                continue;
            }

            addContributionElements(sourceModule, point, cd.getElements());
        }
    }
View Full Code Here

Examples of org.apache.hivemind.parse.ContributionDescriptor

        List contributions = md.getContributions();
        int count = size(contributions);

        for (int i = 0; i < count; i++)
        {
            ContributionDescriptor cd = (ContributionDescriptor) contributions.get(i);

            String pointId = cd.getConfigurationId();
            String qualifiedId = qualify(moduleId, pointId);

            ConfigurationPointImpl point =
                (ConfigurationPointImpl) _configurationPoints.get(qualifiedId);

            if (point == null)
            {
                _errorHandler.error(
                    LOG,
                    ImplMessages.unknownConfigurationPoint(moduleId, cd),
                    cd.getLocation(),
                    null);

                continue;
            }

            addContributionElements(sourceModule, point, cd.getElements());
        }
    }
View Full Code Here

Examples of org.apache.hivemind.parse.ContributionDescriptor

        ModuleDescriptor md = parse("GenericModule.xml");

        List l = md.getContributions();
        assertEquals(1, l.size());

        ContributionDescriptor cd = (ContributionDescriptor) l.get(0);

        assertEquals("MyExtensionPoint", cd.getConfigurationId());
    }
View Full Code Here

Examples of org.apache.hivemind.parse.ContributionDescriptor

        ModuleDescriptor md = parse("GenericModule.xml");

        List l = md.getContributions();
        assertEquals(1, l.size());

        ContributionDescriptor cd = (ContributionDescriptor) l.get(0);

        l = cd.getElements();
        assertEquals(2, l.size());

        Element e = (Element) l.get(0);

        assertEquals("foo1", e.getElementName());
View Full Code Here

Examples of org.apache.hivemind.parse.ContributionDescriptor

    public void testContributionIf() throws Exception
    {
        ModuleDescriptor md = parse("ContributionIf.xml");

        List l = md.getContributions();
        ContributionDescriptor cd = (ContributionDescriptor) l.get(0);

        assertEquals("class foo.bar.Blat", cd.getConditionalExpression());
    }
View Full Code Here

Examples of org.apache.hivemind.parse.ContributionDescriptor

        cpd.setId("Fred");

        md.addConfigurationPoint(cpd);

        ContributionDescriptor cd = new ContributionDescriptor();
        cd.setConfigurationId("Fred");
        cd.setConditionalExpression("class " + Location.class.getName());

        cd.addElement(newElement("foo"));

        md.addContribution(cd);

        RegistryInfrastructureConstructor ric = new RegistryInfrastructureConstructor(eh, log, null);
View Full Code Here

Examples of org.apache.hivemind.parse.ContributionDescriptor

        cpd.setId("Fred");

        md.addConfigurationPoint(cpd);

        ContributionDescriptor cd = new ContributionDescriptor();
        cd.setConfigurationId("Fred");
        cd.setConditionalExpression("class foo.bar.Baz");

        cd.addElement(newElement("bar"));

        md.addContribution(cd);

        RegistryInfrastructureConstructor ric = new RegistryInfrastructureConstructor(eh, log, null);
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.