Projects >> Public >>1217c4dbc5639d89013117bd23e9cbfd17b27819

Chunk
Conflicting content
package de.paluch.powerflare;

<<<<<<< HEAD
=======

import de.paluch.powerflare.command.*;
import de.paluch.powerflare.state.StateStore;

>>>>>>> c212593d264438bd917dccd61b62279fb5e4664b
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
Solution content
package de.paluch.powerflare;

<<<<<<< HEAD
=======
import de.paluch.powerflare.command.*;
import de.paluch.powerflare.state.StateStore;

>>>>>>> c212593d264438bd917dccd61b62279fb5e4664b
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
File
HttpControlInterface.java
Developer's decision
Manual
Kind of conflict
Import
Chunk
Conflicting content
     */
    @Path("powerflare/{port:[0-8]}/{state:(ON|OFF)}")
    @GET
<<<<<<< HEAD
    public String controlPowerflare(@PathParam("port") byte port, @PathParam("state") String state) {
        System.out.println("switchPort port|" + port + "|state|" + state);
=======
    @Produces(MediaType.TEXT_PLAIN)
    public String controlPowerflare(@PathParam("port") byte port, @PathParam("state") String state) {
        System.out.println("controlPowerflare port|" + port + "|state|" + state);
>>>>>>> c212593d264438bd917dccd61b62279fb5e4664b

        if (state == null) {
            throw new IllegalArgumentException("state is null");
Solution content
     */
    @Path("powerflare/{port:[0-8]}/{state:(ON|OFF)}")
    @GET
<<<<<<< HEAD
    public String controlPowerflare(@PathParam("port") byte port, @PathParam("state") String state) {
        System.out.println("switchPort port|" + port + "|state|" + state);
=======
    @Produces(MediaType.TEXT_PLAIN)
    public String controlPowerflare(@PathParam("port") byte port, @PathParam("state") String state) {
        System.out.println("controlPowerflare port|" + port + "|state|" + state);
>>>>>>> c212593d264438bd917dccd61b62279fb5e4664b

        if (state == null) {
            throw new IllegalArgumentException("state is null");
File
HttpControlInterface.java
Developer's decision
Manual
Kind of conflict
Annotation
Method invocation
Method signature
Chunk
Conflicting content
            command.execute(Multiplexer.getInstance().getChannel(), Multiplexer.getInstance().getExec());
            return RESULT_OK;
        }
<<<<<<< HEAD
        return "OK";
=======
        return RESULT_FAIL;
    }

    /**
     * Get Powerflare State.
     *
     * @param port
     * @return ON/OFF
     */
    @Path("powerflare/{port:[0-8]}")
    @GET
    @Produces(MediaType.TEXT_PLAIN)
    public String controlPowerflare(@PathParam("port") byte port) {
           return StateStore.getInstance().getState(port).name();
>>>>>>> c212593d264438bd917dccd61b62279fb5e4664b
    }

    /**
Solution content
            command.execute(Multiplexer.getInstance().getChannel(), Multiplexer.getInstance().getExec());
            return RESULT_OK;
        }
<<<<<<< HEAD
        return "OK";
=======
        return RESULT_FAIL;
    }

    /**
     * Get Powerflare State.
     *
     * @param port
     * @return ON/OFF
     */
    @Path("powerflare/{port:[0-8]}")
    @GET
    @Produces(MediaType.TEXT_PLAIN)
    public String controlPowerflare(@PathParam("port") byte port) {
           return StateStore.getInstance().getState(port).name();
>>>>>>> c212593d264438bd917dccd61b62279fb5e4664b
    }

    /**
File
HttpControlInterface.java
Developer's decision
Manual
Kind of conflict
Annotation
Attribute
Comment
Method invocation
Method signature
Return statement
Chunk
Conflicting content
     */
    @Path("relay/{port:[0-8]}/{state:(CONNECT|DISCONNECT)}")
    @GET
<<<<<<< HEAD
=======
    @Produces(MediaType.TEXT_PLAIN)
>>>>>>> c212593d264438bd917dccd61b62279fb5e4664b
    public String controlPort(@PathParam("port") byte port, @PathParam("state") String state) {
        System.out.println("controlPort port|" + port + "|state|" + state);
Solution content
     */
    @Path("relay/{port:[0-8]}/{state:(CONNECT|DISCONNECT)}")
    @GET
<<<<<<< HEAD
=======
    @Produces(MediaType.TEXT_PLAIN)
>>>>>>> c212593d264438bd917dccd61b62279fb5e4664b
    public String controlPort(@PathParam("port") byte port, @PathParam("state") String state) {
        System.out.println("controlPort port|" + port + "|state|" + state);
File
HttpControlInterface.java
Developer's decision
Manual
Kind of conflict
Annotation
Chunk
Conflicting content
            command.execute(Multiplexer.getInstance().getChannel(), Multiplexer.getInstance().getExec());
            return RESULT_OK;
        }
<<<<<<< HEAD

        return "OK";

=======
        return RESULT_FAIL;
>>>>>>> c212593d264438bd917dccd61b62279fb5e4664b
    }

}
Solution content
            command.execute(Multiplexer.getInstance().getChannel(), Multiplexer.getInstance().getExec());
            return RESULT_OK;
        }
<<<<<<< HEAD

        return "OK";

=======
        return RESULT_FAIL;
>>>>>>> c212593d264438bd917dccd61b62279fb5e4664b
    }

}
File
HttpControlInterface.java
Developer's decision
Manual
Kind of conflict
Attribute
Return statement