Package org.apache.hivemind.definition

Examples of org.apache.hivemind.definition.UnresolvedExtension


    private void resolveImplementations(ModuleDefinition module)
    {
        for (Iterator iter = module.getImplementations().iterator(); iter.hasNext();)
        {
            UnresolvedExtension unresolved = (UnresolvedExtension) iter.next();
            String servicePointId = unresolved.getExtensionPointId();
            if (LOG.isDebugEnabled()) {
                LOG.debug("Trying to resolve service point " + servicePointId + " referenced by" +
                        " implementation" + logLocation(unresolved.getExtension().getLocation()));
            }
            ServicePointDefinition servicePoint = _definition.getServicePoint(servicePointId);
            if (servicePoint == null)
            {
                _errorHandler.error(
                        LOG,
                        DefinitionMessages.unknownServicePoint(
                                IdUtils.extractModule(servicePointId),
                                IdUtils.stripModule(servicePointId)),
                        unresolved.getExtension().getLocation(),
                        null);
            } else {
                servicePoint.addImplementation((ImplementationDefinition) unresolved.getExtension());
            }
            iter.remove();
        }
    }
View Full Code Here


   
    private void resolveInterceptors(ModuleDefinition module)
    {
        for (Iterator iter = module.getInterceptors().iterator(); iter.hasNext();)
        {
            UnresolvedExtension unresolved = (UnresolvedExtension) iter.next();
            String servicePointId = unresolved.getExtensionPointId();
            if (LOG.isDebugEnabled()) {
                LOG.debug("Trying to resolve service point " + servicePointId + " referenced by" +
                        " interceptor" + logLocation(unresolved.getExtension().getLocation()));
            }
            ServicePointDefinition servicePoint = _definition.getServicePoint(servicePointId);
            if (servicePoint == null)
            {
                _errorHandler.error(
                        LOG,
                        DefinitionMessages.unknownServicePoint(
                                IdUtils.extractModule(servicePointId),
                                IdUtils.stripModule(servicePointId)),
                        unresolved.getExtension().getLocation(),
                        null);
            } else {
                servicePoint.addInterceptor((InterceptorDefinition) unresolved.getExtension());
            }
            iter.remove();
        }
    }
View Full Code Here

   
    private void resolveContributions(ModuleDefinition module)
    {
        for (Iterator iter = module.getContributions().iterator(); iter.hasNext();)
        {
            UnresolvedExtension unresolved = (UnresolvedExtension) iter.next();
            String configurationPointId = unresolved.getExtensionPointId();
            if (LOG.isDebugEnabled()) {
                LOG.debug("Trying to resolve configuration point " + configurationPointId + " referenced by" +
                        " contribution " + logLocation(unresolved.getExtension().getLocation()));
            }
            ConfigurationPointDefinition configurationPoint = _definition.getConfigurationPoint(configurationPointId);
            if (configurationPoint == null)
            {
                _errorHandler.error(
                        LOG,
                        DefinitionMessages.unknownConfigurationPoint(
                                IdUtils.extractModule(configurationPointId),
                                IdUtils.stripModule(configurationPointId)),
                        unresolved.getExtension().getLocation(),
                        null);
            } else {
                configurationPoint.addContribution((ContributionDefinition) unresolved.getExtension());
            }
            iter.remove();
        }
    }
View Full Code Here

   
    private void resolveConfigurationParsers(ModuleDefinition module)
    {
        for (Iterator iter = module.getConfigurationParsers().iterator(); iter.hasNext();)
        {
            UnresolvedExtension unresolved = (UnresolvedExtension) iter.next();
            String configurationPointId = unresolved.getExtensionPointId();
            if (LOG.isDebugEnabled()) {
                LOG.debug("Trying to resolve configuration point " + configurationPointId + " referenced by" +
                        " ConfigurationParser " + logLocation(unresolved.getExtension().getLocation()));
            }
            ConfigurationPointDefinition configurationPoint = _definition.getConfigurationPoint(configurationPointId);
            if (configurationPoint == null)
            {
                _errorHandler.error(
                        LOG,
                        DefinitionMessages.unknownConfigurationPoint(
                                IdUtils.extractModule(configurationPointId),
                                IdUtils.stripModule(configurationPointId)),
                        unresolved.getExtension().getLocation(),
                        null);
            } else {
                if (Visibility.PRIVATE.equals(configurationPoint.getVisibility())
                   && !module.getId().equals(IdUtils.extractModule(configurationPointId))) {
                    _errorHandler.error(
                            LOG,
                            DefinitionMessages.configurationPointNotVisible(
                                    configurationPoint,
                                    module),
                            unresolved.getExtension().getLocation(),
                            null);
                   
                }
               
                configurationPoint.addParser((ConfigurationParserDefinition) unresolved.getExtension());
            }
            iter.remove();
        }
    }
View Full Code Here

     * @param implementation  the implementation definition
     */
    public void addImplementation(String qualifiedServicePointId,
            ImplementationDefinition implementation)
    {
        UnresolvedExtension unresolvedExtension = new UnresolvedExtension(implementation,
                qualifiedServicePointId);
        _unresolvedImplementations.add(unresolvedExtension);
    }
View Full Code Here

     * @param interceptor  the interceptor definition
     */
    public void addInterceptor(String qualifiedServicePointId,
            InterceptorDefinition interceptor)
    {
        UnresolvedExtension unresolvedExtension = new UnresolvedExtension(interceptor,
                qualifiedServicePointId);
        _unresolvedInterceptors.add(unresolvedExtension);
    }
View Full Code Here

     * @param contribution  the contribution definition
     */
    public void addContribution(String qualifiedConfigurationPointId,
            ContributionDefinition contribution)
    {
        UnresolvedExtension unresolvedExtension = new UnresolvedExtension(contribution,
                qualifiedConfigurationPointId);
        _unresolvedContributions.add(unresolvedExtension);
    }
View Full Code Here

     * @param qualifiedConfigurationPointId  the fully qualified configuration point id
     * @param parser  the parser definition
     */
    public void addConfigurationParser(String qualifiedConfigurationPointId, ConfigurationParserDefinition parser)
    {
        UnresolvedExtension unresolvedExtension = new UnresolvedExtension(parser,
                qualifiedConfigurationPointId);
        _unresolvedConfigurationParsers.add(unresolvedExtension);
   
View Full Code Here

TOP

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

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.