Package org.apache.tapestry.ioc

Examples of org.apache.tapestry.ioc.ServiceLocator


        Log log = logForService(serviceId);

        boolean debug = log.isDebugEnabled();

        ServiceLocator locator = new ServiceResourcesImpl(this, module, serviceDef, log);

        for (ContributionDef def : contributions)
        {
            MappedConfiguration<K, V> validating = new ValidatingMappedConfigurationWrapper<K, V>(
                    serviceId, def, log, keyClass, valueType, keyToContribution, configuration);
View Full Code Here


        Log log = logForService(serviceId);

        boolean debug = log.isDebugEnabled();

        ServiceLocator locator = new ServiceResourcesImpl(this, module, serviceDef, log);

        for (ContributionDef def : contributions)
        {
            Configuration<T> validating = new ValidatingConfigurationWrapper<T>(serviceId, log,
                    valueType, def, configuration);
View Full Code Here

        if (contributions.isEmpty()) return;

        Log log = logForService(serviceId);
        boolean debug = log.isDebugEnabled();

        ServiceLocator locator = new ServiceResourcesImpl(this, module, serviceDef, log);

        for (ContributionDef def : contributions)
        {
            OrderedConfiguration<T> validating = new ValidatingOrderedConfigurationWrapper<T>(
                    serviceId, def, log, valueType, configuration);
View Full Code Here

        if (_insideConstructor)
            throw new RuntimeException(IOCMessages.recursiveModuleConstructor(
                    builderClass,
                    constructor));

        ServiceLocator locator = new ServiceLocatorImpl(_registry, this);
        Map<Class, Object> parameterDefaults = newMap();

        parameterDefaults.put(Log.class, _log);
        parameterDefaults.put(ServiceLocator.class, locator);
View Full Code Here

{
    @Test
    public void mode_not_set_when_resolution_requested()
    {
        InfrastructureManager manager = newInfrastructureManager();
        ServiceLocator locator = newServiceLocator();

        replay();

        Infrastructure infra = new InfrastructureImpl(manager);
View Full Code Here

    @Test
    public void resolve_object_within_mode()
    {
        InfrastructureManager manager = newInfrastructureManager();
        ServiceLocator locator = newServiceLocator();
        Runnable r = newRunnable();

        Map<String, Object> configuration = newMap();
        configuration.put("myrunnable", r);
View Full Code Here

    /** Check that the manager is only consulted once. */
    @Test
    public void configuration_is_cached()
    {
        InfrastructureManager manager = newInfrastructureManager();
        ServiceLocator locator = newServiceLocator();
        Runnable r = newRunnable();

        Map<String, Object> configuration = newMap();
        configuration.put("myrunnable", r);

View Full Code Here

    @Test
    public void expression_not_found_in_configuration()
    {
        InfrastructureManager manager = newInfrastructureManager();
        ServiceLocator locator = newServiceLocator();

        Map<String, Object> configuration = newMap();

        configuration.put("fred", this);
        configuration.put("barney", this);
View Full Code Here

    @Test
    public void requested_type_not_compatible_with_object()
    {
        InfrastructureManager manager = newInfrastructureManager();
        ServiceLocator locator = newServiceLocator();
        Runnable r = newRunnable();

        Map<String, Object> configuration = newMap();
        configuration.put("myrunnable", r);
View Full Code Here

    @Test
    public void annotation_has_value()
    {
        ObjectProvider provider = newObjectProvider();
        ServiceLocator locator = newServiceLocator();
        Inject annotation = newMock(Inject.class);
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        Request injected = newRequest();
View Full Code Here

TOP

Related Classes of org.apache.tapestry.ioc.ServiceLocator

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.