<commit_before>package net.floodlightcontroller.flowcache.web;

import net.floodlightcontroller.restserver.RestletRoutable;

import org.restlet.Context;
import org.restlet.Restlet;
import org.restlet.routing.Router;

public class FlowWebRoutable implements RestletRoutable {
    /**
     * Create the Restlet router and bind to the proper resources.
     */
    @Override
    public Restlet getRestlet(Context context) {
        Router router = new Router(context);
        router.attach("/add/{flow}/json", AddFlowResource.class);
        router.attach("/delete/{flow-id}/json", DeleteFlowResource.class);
        router.attach("/get/{flow-id}/json", GetFlowByIdResource.class);
        router.attach("/get/{installer-id}/{src-dpid}/{src-port}/{dst-dpid}/{dst-port}/json", GetFlowByInstallerIdResource.class);
        router.attach("/getall/{src-dpid}/{src-port}/{dst-dpid}/{dst-port}/json", GetAllFlowsByEndpointsResource.class);
        router.attach("/getall/json", GetAllFlowsResource.class);
        return router;
    }

    /**
     * Set the base path for the Topology
     */
    @Override
    public String basePath() {
        return "/wm/flow";
    }
}<commit_msg>Change the REST API so adding a flow is using path "/add/json" instead of "/add/{flow}/json", because now we use POST mechanism to add a flow.<commit_after>package net.floodlightcontroller.flowcache.web;

import net.floodlightcontroller.restserver.RestletRoutable;

import org.restlet.Context;
import org.restlet.Restlet;
import org.restlet.routing.Router;

public class FlowWebRoutable implements RestletRoutable {
    /**
     * Create the Restlet router and bind to the proper resources.
     */
    @Override
    public Restlet getRestlet(Context context) {
        Router router = new Router(context);
        router.attach("/add/json", AddFlowResource.class);
        router.attach("/delete/{flow-id}/json", DeleteFlowResource.class);
        router.attach("/get/{flow-id}/json", GetFlowByIdResource.class);
        router.attach("/get/{installer-id}/{src-dpid}/{src-port}/{dst-dpid}/{dst-port}/json", GetFlowByInstallerIdResource.class);
        router.attach("/getall/{src-dpid}/{src-port}/{dst-dpid}/{dst-port}/json", GetAllFlowsByEndpointsResource.class);
        router.attach("/getall/json", GetAllFlowsResource.class);
        return router;
    }

    /**
     * Set the base path for the Topology
     */
    @Override
    public String basePath() {
        return "/wm/flow";
    }
}
{'fraction_non_alphanumeric': 0.13570274636510501, 'fraction_numerical': 0.0, 'mean_word_length': 3.3763250883392226, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1090846', 'n_tokens_mistral': 751, 'n_tokens_neox': 735, 'n_words': 146}