Package com.mozilla.grouperfish.model

Examples of com.mozilla.grouperfish.model.Query


    /** Run all transforms configurations of this namespace over the results of all queries. */
    public void schedule(final Scope ns) {
        final Map<String, String> queries = ns.queries();
        final Map<String, String> transforms = ns.map(Type.CONFIGURATION_TRANSFORM);
        for (final Map.Entry<String, String> queryEntry : queries.entrySet()) {
            final Query query = new Query(queryEntry.getKey(), queryEntry.getValue());
            for (final Map.Entry<String, String> item : transforms.entrySet()) {
                schedule(ns, query, new TransformConfig(item.getKey(), item.getValue()));
            }
        }
    }
View Full Code Here



    private static final Query fetchQuery(final Scope ns, final String name, final Box<Response> failure) {
        final String json = ns.queries().get(name);
        if (json != null) {
            return new Query(name, json);
        }

        failure.put(Response.status(new StatusType() {
            @Override public int getStatusCode() { return 404; }
            @Override public String getReasonPhrase() { return "Unknown query: " + name; }
View Full Code Here

            if (!ns.allows(RunResource.class, new HttpAccess(Operation.RUN, request))) {
                return FORBIDDEN;
            }

            final Box<Response> any404 = new Box<Response>();
            final Query q = fetchQuery(ns, queryName, any404);
            for (final Response some404 : any404) return some404;

            try {
                batchService().schedule(ns, q);
            }
View Full Code Here

                return FORBIDDEN;
            }

            final Box<Response> any404 = new Box<Response>();

            final Query q = fetchQuery(ns, queryName, any404);
            for (final Response some404 : any404) return some404;

            final TransformConfig config = fetchTransformConfig(ns, transformName, any404);
            for (final Response some404 : any404) return some404;
View Full Code Here

TOP

Related Classes of com.mozilla.grouperfish.model.Query

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.