Examples of IPropertySource


Examples of org.apache.tapestry.engine.IPropertySource

    public void testGlobalPropertyObjectProviderFailure()
    {
        Location l = fabricateLocation(223);

        MockControl sourceControl = newControl(IPropertySource.class);
        IPropertySource source = (IPropertySource) sourceControl.getMock();

        // Training

        source.getPropertyValue("foo");
        sourceControl.setThrowable(new ApplicationRuntimeException("failure"));

        replayControls();

        PropertyObjectProvider p = new PropertyObjectProvider();
View Full Code Here

Examples of org.apache.tapestry.engine.IPropertySource

        if (!init)
        {
            RequestContext requestContext = cycle.getRequestContext();
            ApplicationServlet servlet = requestContext.getServlet();
            ServletContext context = servlet.getServletContext();
            IPropertySource propertySource = cycle.getEngine().getPropertySource();

            Resource webInfLocation = new ContextResource(context, "/WEB-INF/");

            Resource webInfAppLocation =
                webInfLocation.getRelativeResource(servlet.getServletName() + "/");

            readQuestions(
                easyQuestions,
                webInfAppLocation,
                propertySource.getPropertyValue("easyquestionsfile"));
            readQuestions(
                mediumQuestions,
                webInfAppLocation,
                propertySource.getPropertyValue("mediumquestiosfile"));
            readQuestions(
                hardQuestions,
                webInfAppLocation,
                propertySource.getPropertyValue("hardquestionsfile"));
            points = new int[10];
            names = new String[10];
            for (int i = 0; i <= 9; i++)
            {
                points[i] = 0;
View Full Code Here

Examples of org.apache.tapestry.engine.IPropertySource

                getLocalizedProperties(component));
    } finally { }}

    private String getMessagesEncoding(IComponent component, Locale locale)
    {try { __CLOVER_305_0.M[3290]++;
        __CLOVER_305_0.S[14050]++;IPropertySource source = new DefaultComponentPropertySource(component,
                _applicationPropertySource, locale);

        __CLOVER_305_0.S[14051]++;String encoding = source.getPropertyValue(MESSAGES_ENCODING_PROPERTY_NAME);

        __CLOVER_305_0.S[14052]++;if ((((encoding == null) && (++__CLOVER_305_0.CT[2351] != 0)) || (++__CLOVER_305_0.CF[2351] == 0))){
            __CLOVER_305_0.S[14053]++;encoding = source.getPropertyValue(TemplateSourceImpl.TEMPLATE_ENCODING_PROPERTY_NAME);}

        __CLOVER_305_0.S[14054]++;return encoding;
    } finally { }}
View Full Code Here

Examples of org.apache.tapestry.engine.IPropertySource

                getLocalizedProperties(component));
    } finally { }}

    private String getMessagesEncoding(IComponent component, Locale locale)
    {try { __CLOVER_305_0.M[1464]++;
        __CLOVER_305_0.S[7112]++;IPropertySource source = new DefaultComponentPropertySource(component,
                _applicationPropertySource, locale);

        __CLOVER_305_0.S[7113]++;String encoding = source.getPropertyValue(MESSAGES_ENCODING_PROPERTY_NAME);

        __CLOVER_305_0.S[7114]++;if ((((encoding == null) && (++__CLOVER_305_0.CT[1239] != 0)) || (++__CLOVER_305_0.CF[1239] == 0))){
            __CLOVER_305_0.S[7115]++;encoding = source.getPropertyValue(TemplateSourceImpl.TEMPLATE_ENCODING_PROPERTY_NAME);}

        __CLOVER_305_0.S[7116]++;return encoding;
    } finally { }}
View Full Code Here

Examples of org.apache.tapestry.engine.IPropertySource

    protected AssetExternalizer(IRequestCycle cycle)
    {try { __CLOVER_36_0.M[236]++;
        __CLOVER_36_0.S[857]++;_resolver = cycle.getEngine().getClassResolver();
   
        __CLOVER_36_0.S[858]++;IPropertySource properties = cycle.getEngine().getPropertySource();


        __CLOVER_36_0.S[859]++;String directory = properties.getPropertyValue("org.apache.tapestry.asset.dir");

        __CLOVER_36_0.S[860]++;if ((((directory == null) && (++__CLOVER_36_0.CT[174] != 0)) || (++__CLOVER_36_0.CF[174] == 0))){
            __CLOVER_36_0.S[861]++;return;}

        __CLOVER_36_0.S[862]++;_URL = properties.getPropertyValue("org.apache.tapestry.asset.URL");

        __CLOVER_36_0.S[863]++;if ((((_URL == null) && (++__CLOVER_36_0.CT[175] != 0)) || (++__CLOVER_36_0.CF[175] == 0))){
            __CLOVER_36_0.S[864]++;return;}

        __CLOVER_36_0.S[865]++;_assetDir = new File(directory);
View Full Code Here

Examples of org.apache.tapestry.engine.IPropertySource

        __CLOVER_338_0.S[7676]++;return Tapestry.DEFAULT_TEMPLATE_EXTENSION;
    } finally { }}

    private String getTemplateEncoding(IComponent component, Locale locale)
    {try { __CLOVER_338_0.M[1657]++;
        __CLOVER_338_0.S[7677]++;IPropertySource source =
            new DefaultComponentPropertySource(component, _applicationPropertySource, locale);

        __CLOVER_338_0.S[7678]++;return source.getPropertyValue(TEMPLATE_ENCODING_PROPERTY_NAME);
    } finally { }}
View Full Code Here

Examples of org.apache.tapestry.engine.IPropertySource

        if (!init)
        {
            RequestContext requestContext = cycle.getRequestContext();
            ApplicationServlet servlet = requestContext.getServlet();
            ServletContext context = servlet.getServletContext();
            IPropertySource propertySource = cycle.getEngine().getPropertySource();
            IResourceLocation webInfLocation = new ContextResourceLocation(context, "/WEB-INF/");
            IResourceLocation webInfAppLocation = webInfLocation.getRelativeLocation(servlet.getServletName() + "/");
            readQuestions(easyQuestions, webInfAppLocation, propertySource.getPropertyValue("easyquestionsfile"));
            readQuestions(mediumQuestions, webInfAppLocation, propertySource.getPropertyValue("mediumquestiosfile"));
            readQuestions(hardQuestions, webInfAppLocation, propertySource.getPropertyValue("hardquestionsfile"));
            points = new int[10];
            names = new String[10];
            for (int i = 0; i <= 9; i++)
            {
                points[i] = 0;
View Full Code Here

Examples of org.apache.tapestry.engine.IPropertySource

        if (!init)
        {
            RequestContext requestContext = cycle.getRequestContext();
            ApplicationServlet servlet = requestContext.getServlet();
            ServletContext context = servlet.getServletContext();
            IPropertySource propertySource = cycle.getEngine().getPropertySource();
            IResourceLocation webInfLocation = new ContextResourceLocation(context, "/WEB-INF/");
            IResourceLocation webInfAppLocation = webInfLocation.getRelativeLocation(servlet.getServletName() + "/");
            readQuestions(easyQuestions, webInfAppLocation, propertySource.getPropertyValue("easyquestionsfile"));
            readQuestions(mediumQuestions, webInfAppLocation, propertySource.getPropertyValue("mediumquestiosfile"));
            readQuestions(hardQuestions, webInfAppLocation, propertySource.getPropertyValue("hardquestionsfile"));
            points = new int[10];
            names = new String[10];
            for (int i = 0; i <= 9; i++)
            {
                points[i] = 0;
View Full Code Here

Examples of org.apache.tapestry.engine.IPropertySource

        __CLOVER_393_0.S[8806]++;String result = null;
        __CLOVER_393_0.S[8807]++;int count = _sources.size();
       
        __CLOVER_393_0.S[8808]++;for (int i = 0; (((i < count) && (++__CLOVER_393_0.CT[1484] != 0)) || (++__CLOVER_393_0.CF[1484] == 0)); i++){
        {
            __CLOVER_393_0.S[8809]++;IPropertySource source = (IPropertySource)_sources.get(i);
           
            __CLOVER_393_0.S[8810]++;result = source.getPropertyValue(propertyName);
           
            __CLOVER_393_0.S[8811]++;if ((((result != null) && (++__CLOVER_393_0.CT[1485] != 0)) || (++__CLOVER_393_0.CF[1485] == 0))){
                __CLOVER_393_0.S[8812]++;break;}
        }}
       
View Full Code Here

Examples of org.apache.tapestry.engine.IPropertySource

        if (!init)
        {
            RequestContext requestContext = cycle.getRequestContext();
            ApplicationServlet servlet = requestContext.getServlet();
            ServletContext context = servlet.getServletContext();
            IPropertySource propertySource = cycle.getEngine().getPropertySource();

            Resource webInfLocation = new ContextResource(context, "/WEB-INF/");

            Resource webInfAppLocation =
                webInfLocation.getRelativeResource(servlet.getServletName() + "/");

            readQuestions(
                easyQuestions,
                webInfAppLocation,
                propertySource.getPropertyValue("easyquestionsfile"));
            readQuestions(
                mediumQuestions,
                webInfAppLocation,
                propertySource.getPropertyValue("mediumquestiosfile"));
            readQuestions(
                hardQuestions,
                webInfAppLocation,
                propertySource.getPropertyValue("hardquestionsfile"));
            points = new int[10];
            names = new String[10];
            for (int i = 0; i <= 9; i++)
            {
                points[i] = 0;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.