Package com.mozilla.grouperfish.model

Examples of com.mozilla.grouperfish.model.TransformConfig


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


        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

            fs.makeDirectory(Helpers.outputDirectory(task));
        } catch (final Denied e) {
            throw Fail.hard(task, "Cannot create output directory.", e);
        }

        final TransformConfig config = task.transform();
        final Transform transform = transforms.get(config.transform());
        Assert.nonNull(transform);
        log.info(String.format("Launching transform '%s' with input directory '%s'", transform, inputDirectory));

        try {
            final TransformResult result = transform.run(task);
View Full Code Here

    private static final TransformConfig fetchTransformConfig(final Scope ns,
                                                    final String name,
                                                    final Box<Response> failure) {
        final String json = ns.map(Type.CONFIGURATION_TRANSFORM).get(name);
        if (json != null) {
            return new TransformConfig(name, json);
        }

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

            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;

            try {
                log.debug("Scheduling run: {} / {}", ns, q);
                batchService().schedule(ns, q, config);
View Full Code Here

TOP

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

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.