Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.AliasContribution


        for (Class serviceInterface : serviceInterfaces)
        {
            String name = serviceInterface.getName();
            String serviceId = InternalUtils.lastTerm(name);

            AliasContribution contribution = AliasContribution.create(serviceInterface, locator
                    .getService(serviceId, serviceInterface));

            configuration.add(contribution);
        }
    }
View Full Code Here


    public static void contributeAlias(Configuration<AliasContribution> configuration,

    @InjectService("Session")
    Session session)
    {
        configuration.add(new AliasContribution("session", session));
    }
View Full Code Here

    public static void contributeAlias(Configuration<AliasContribution> configuration,

    @InjectService("DefaultRequestExceptionHandler")
    RequestExceptionHandler defaultRequestExceptionHandler)
    {
        configuration.add(new AliasContribution("RequestExceptionHandler",
                defaultRequestExceptionHandler));
    }
View Full Code Here

                .warn("Contribution FRED-CONFLICT (as 'fred') duplicates existing contribution FRED and has been ignored.");

        replay();

        Collection<AliasContribution> configuration = buildConfiguration();
        configuration.add(new AliasContribution("fred", "FRED-CONFLICT"));

        AliasManager manager = new AliasManagerImpl(log, configuration);

        Map<String, Object> map = manager.getAliasesForMode("foo");
View Full Code Here

        replay();

        Collection<AliasContribution> configuration = buildConfiguration();

        configuration.add(new AliasContribution("barney", "bar", "BARNEY2"));

        AliasManager manager = new AliasManagerImpl(log, configuration);

        Map<String, Object> map = manager.getAliasesForMode("foo");
View Full Code Here

        replay();

        Collection<AliasContribution> configuration = buildConfiguration();

        configuration.add(new AliasContribution("fred", "foo", "FRED-OVERRIDE"));

        AliasManager manager = new AliasManagerImpl(log, configuration);

        Map<String, Object> map = manager.getAliasesForMode("foo");
View Full Code Here

    private Collection<AliasContribution> buildConfiguration()
    {
        Collection<AliasContribution> configuration = newList();

        configuration.add(new AliasContribution("fred", "FRED"));
        configuration.add(new AliasContribution("barney", "foo", "BARNEY"));

        return configuration;
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.services.AliasContribution

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.