Package org.apache.tapestry5.ioc.def

Examples of org.apache.tapestry5.ioc.def.ContributionDef2


        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator required = mockValidator();
        Validator minLength = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter requiredFormatter = mockMessageFormatter();
        MessageFormatter minLengthFormatter = mockMessageFormatter();
        Object inputValue = "input value";
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        Integer fifteen = 15;
        FormSupport fs = mockFormSupport();

        Map<String, Validator> map = newMap();
View Full Code Here


    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        Integer five = 5;
        FormSupport fs = mockFormSupport();

        Map<String, Validator> map = singletonMap("minLength", validator);
View Full Code Here

        if (type == null)
            throw new RuntimeException(IOCMessages.noContributionParameter(method));

        Set<Class> markers = extractContributionMarkers(method);

        ContributionDef2 def = new ContributionDefImpl(serviceId, method, classFactory, serviceInterface, markers);

        contributionDefs.add(def);
    }
View Full Code Here

    {
        Set<ContributionDef2> result = CollectionFactory.newSet();

        for (ContributionDef next : moduleDef.getContributionDefs())
        {
            ContributionDef2 def = InternalUtils.toContributionDef2(next);

            if (serviceDef.getServiceId().equalsIgnoreCase(def.getServiceId()))
            {
                result.add(def);
            }
            else
            {
                if (!serviceDef.getServiceInterface().equals(def.getServiceInterface()))
                    continue;

                Set<Class> contributionMarkers = CollectionFactory.newSet(def.getMarkers());

                if (contributionMarkers.contains(Local.class))
                {
                    // If @Local is present, filter out services that aren't in the same module.
                    // Don't consider @Local to be a marker annotation
View Full Code Here

    public static ContributionDef2 toContributionDef2(final ContributionDef contribution)
    {
        if (contribution instanceof ContributionDef2)
            return (ContributionDef2) contribution;

        return new ContributionDef2()
        {

            public Set<Class> getMarkers()
            {
                return Collections.emptySet();
View Full Code Here

            for (ContributionDef cd : contributionDefs)
            {
                String serviceId = cd.getServiceId();

                ContributionDef2 cd2 = InternalUtils.toContributionDef2(cd);

                if (cd2.getServiceId() != null)
                {
                    if (!serviceIdToModule.containsKey(serviceId)) { throw new IllegalArgumentException(
                            IOCMessages.contributionForNonexistentService(cd)); }
                }
                else if (!isContributionForExistentService(module, cd2)) { throw new IllegalArgumentException(
View Full Code Here

            for (ContributionDef cd : contributionDefs)
            {
                String serviceId = cd.getServiceId();

                ContributionDef2 cd2 = InternalUtils.toContributionDef2(cd);

                if (cd2.getServiceId() != null)
                {
                    if (!serviceIdToModule.containsKey(serviceId)) { throw new IllegalArgumentException(
                            IOCMessages.contributionForNonexistentService(cd)); }
                }
                else if (!isContributionForExistentService(module, cd2)) { throw new IllegalArgumentException(
View Full Code Here

    {
        Set<ContributionDef2> result = CollectionFactory.newSet();

        for (ContributionDef next : moduleDef.getContributionDefs())
        {
            ContributionDef2 def = InternalUtils.toContributionDef2(next);

            if (serviceDef.getServiceId().equalsIgnoreCase(def.getServiceId()))
            {
                result.add(def);
            }
            else
            {
View Full Code Here

    public static ContributionDef2 toContributionDef2(final ContributionDef contribution)
    {
        if (contribution instanceof ContributionDef2)
            return (ContributionDef2) contribution;

        return new ContributionDef2()
        {

            public Set<Class> getMarkers()
            {
                return Collections.emptySet();
View Full Code Here

    private void addStartupDef(Method method)
    {
        Set<Class> markers = Collections.emptySet();

        ContributionDef2 def = new ContributionDefImpl("RegistryStartup", method, proxyFactory, Runnable.class, markers);

        contributionDefs.add(def);
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ioc.def.ContributionDef2

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.