Package org.apache.tapestry5.ioc.util

Examples of org.apache.tapestry5.ioc.util.AvailableValues


            {
                List<String> names = classAdapter.getPropertyNames();

                throw new UnknownValueException(String.format(
                        "Class %s does not contain a property (or public field) named '%s'.", activeType.getName(),
                        propertyName), new AvailableValues("Properties (and public fields)", names));
            }

            return createExpressionTermInfoForProperty(adapter);
        }
View Full Code Here


        throw new UnknownValueException(
                String
                        .format(
                                "Unable to create a client URL for classpath resource %s: The resource path was not within an aliased path.",
                                resourcePath), new AvailableValues("Aliased paths", aliasToPathPrefix.values()));
    }
View Full Code Here

        guesses.size() == 1 ? "matching" : "matching any of",

        InternalUtils.joinSorted(guesses));

        throw new UnknownValueException(message, new AvailableValues("Formal parameters", model
                .getDeclaredParameterNames()));
    }
View Full Code Here

    {
        PersistentFieldStrategy result = strategies.get(strategyName);

        if (result == null)
            throw new UnknownValueException(String.format("'%s' is not a defined persistent strategy.", strategyName),
                    new AvailableValues("Configured persistent field strategies", strategies));

        return result;
    }
View Full Code Here

        if (embeddedElement == null)
        {
            Set<String> ids = InternalUtils.keys(children);

            throw new UnknownValueException(String.format("Component %s does not contain embedded component '%s'.",
                    getCompleteId(), embeddedId), new AvailableValues("Embedded components", ids));
        }

        return embeddedElement;
    }
View Full Code Here

    public Translator get(String name)
    {
        Translator result = nameToTranslator.get(name);

        if (result == null)
            throw new UnknownValueException(String.format("Unknown translator type '%s'.", name), new AvailableValues(
                    "Configured translators", nameToTranslator));

        return result;
    }
View Full Code Here

        NullFieldStrategy result = configuration.get(name);

        if (result != null) return result;
       
        throw new UnknownValueException(String.format("Unrecognized name '%s' locating a null field strategy.", name),
                new AvailableValues("Configured null field strategies", configuration));

    }
View Full Code Here

        T result = stringToEnum.get(input);

        if (result == null)
            throw new UnknownValueException(
                    PublicUtilMessages.missingEnumValue(input, enumClass, stringToEnum.keySet()), new AvailableValues(
                            enumClass.getName() + " enum constants", stringToEnum));

        return result;
    }
View Full Code Here

    {
        Module module = serviceIdToModule.get(serviceId);

        if (module == null)
            throw new UnknownValueException(String.format("Service id '%s' is not defined by any module.", serviceId),
                    new AvailableValues("Defined service ids", serviceIdToModule));

        return module;
    }
View Full Code Here

        for (List<CoercionTuple> list : sourceTypeToTuple.values())
        {
            masterList.addAll(list);
        }

        return new AvailableValues("Configured coercions", masterList);
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ioc.util.AvailableValues

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.