All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vertx.up.secure.Rampart Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package io.vertx.up.secure;

import io.vertx.core.json.JsonObject;
import io.vertx.up.atom.secure.Cliff;
import io.vertx.up.eon.em.WallType;
import io.vertx.up.uca.marshal.Transformer;
import io.vertx.up.fn.Fn;

public class Rampart implements Transformer {

    @Override
    public Cliff transform(final JsonObject input) {
        return Fn.getJvm(() -> {
            if (input.containsKey(Wall.TYPE)) {
                // Standard
                final Transformer transformer =
                        Pool.WALL_TRANSFORMER
                                .get(WallType.from(input.getString(Wall.TYPE)));
                return transformer.transform(input);
            } else {
                // Non Standard
                // TODO: Custom building.
                return new Cliff();
            }
        }, input);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy