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

com.groupbyinc.util.UrlBeautifier Maven / Gradle / Ivy

package com.groupbyinc.util;

import com.groupbyinc.api.Query;
import com.groupbyinc.api.request.Request;
import com.groupbyinc.injector.StaticInjector;
import com.groupbyinc.injector.StaticInjectorFactory;

import java.util.HashMap;
import java.util.Map;

/**
 * @author will
 */
public class UrlBeautifier extends AbstractUrlBeautifier {
    static final StaticInjector> INJECTOR =
            new StaticInjectorFactory>().create();

    static {
        INJECTOR.set(new HashMap());
    }

    private UrlBeautifier() {
    }

    /**
     * 
     * Create a UrlBeautifier and store it for the lifetime of this JVM under the name specified.
     * 
     *
     * @param name The handle back to this UrlBeautifier
     */
    public static void createUrlBeautifier(String name) {
        getUrlBeautifiers().put(name, new UrlBeautifier());
    }

    /**
     * 
     * Get a map of UrlBeautifiers keyed by name.
     * 
     *
     * @return
     */
    public static Map getUrlBeautifiers() {
        return INJECTOR.get();
    }

    @Override
    protected Query createQuery() {
        return new Query();
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy