Package org.apache.tapestry5.services

Examples of org.apache.tapestry5.services.ApplicationStateContribution


        "class", "t-autocomplete-menu");
        writer.end();

        Link link = resources.createEventLink(EVENT_NAME);

        JSONObject config = new JSONObject();
        config.put("paramName", PARAM_NAME);
        config.put("indicator", loaderId);

        if (resources.isBound("minChars"))
            config.put("minChars", minChars);

        if (resources.isBound("frequency"))
            config.put("frequency", frequency);

        if (resources.isBound("tokens"))
        {
            for (int i = 0; i < tokens.length(); i++)
            {
                config.accumulate("tokens", tokens.substring(i, i + 1));
            }
        }

        // Let subclasses do more.
        configure(config);
View Full Code Here


     * not formatted correct.
     */
    JSONObject onParse(@RequestParameter(INPUT_PARAMETER)
    String input)
    {
        JSONObject response = new JSONObject();

        try
        {
            Date date = format.parse(input);

            response.put(RESULT, date.getTime());
        }
        catch (ParseException ex)
        {
            response.put(ERROR, ex.getMessage());
        }

        return response;
    }
View Full Code Here

     * the result.
     */
    JSONObject onFormat(@RequestParameter(INPUT_PARAMETER)
    String input)
    {
        JSONObject response = new JSONObject();

        try
        {
            long millis = Long.parseLong(input);

            Date date = new Date(millis);

            response.put(RESULT, format.format(date));
        }
        catch (NumberFormatException ex)
        {
            response.put(ERROR, ex.getMessage());
        }

        return response;
    }
View Full Code Here

        {

            final PersistentClass persistentClass = mappings.next();
            final Class entityClass = persistentClass.getMappedClass();

            configuration.add(entityClass, new ApplicationStateContribution(HibernatePersistenceConstants.ENTITY));
        }
    }
View Full Code Here

        {

            final PersistentClass persistentClass = mappings.next();
            final Class entityClass = persistentClass.getMappedClass();

            configuration.add(entityClass, new ApplicationStateContribution(HibernatePersistenceConstants.ENTITY));
        }
    }
View Full Code Here

        {

            final PersistentClass persistentClass = mappings.next();
            final Class entityClass = persistentClass.getMappedClass();

            configuration.add(entityClass, new ApplicationStateContribution(HibernatePersistenceConstants.ENTITY));
        }
    }
View Full Code Here

        {
            for (final String className : info.getManagedClassNames())
            {
                final Class<?> clazz = loadClass(info, className);

                configuration.add(clazz, new ApplicationStateContribution(JpaPersistenceConstants.ENTITY));
            }
        }
    }
View Full Code Here

        {

            final PersistentClass persistentClass = mappings.next();
            final Class entityClass = persistentClass.getMappedClass();
           
            configuration.add(entityClass, new ApplicationStateContribution(HibernatePersistenceConstants.ENTITY));
        }
    }
View Full Code Here

        this.source = source;
        this.locator = locator;

        for (Class asoClass : configuration.keySet())
        {
            ApplicationStateContribution contribution = configuration.get(asoClass);

            ApplicationStateAdapter adapter = newAdapter(asoClass, contribution.getStrategy(),
                    contribution.getCreator());

            classToAdapter.put(asoClass, adapter);
        }

    }
View Full Code Here

        {

            final PersistentClass persistentClass = mappings.next();
            final Class entityClass = persistentClass.getMappedClass();

            configuration.add(entityClass, new ApplicationStateContribution(HibernatePersistenceConstants.ENTITY));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.services.ApplicationStateContribution

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.