package innovimax.mixthem.rest.services;

import java.io.InputStream;

import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;

import org.glassfish.jersey.media.multipart.FormDataContentDisposition;

public class FileServiceImpl implements FileService {

    @Override
    public Response addFromFile(InputStream file1InputStream, FormDataContentDisposition file1Detail, InputStream file2InputStream, FormDataContentDisposition file2Detail) {
        return Response.status(Status.NOT_IMPLEMENTED).build();
    }

    @Override
    public Response altFromFile(String type, InputStream file1InputStream, FormDataContentDisposition file1Detail, InputStream file2InputStream, FormDataContentDisposition file2Detail) {
        return Response.status(Status.NOT_IMPLEMENTED).build();
    }

    @Override
    public Response randomAltFromFile(InputStream file1InputStream, FormDataContentDisposition file1Detail, InputStream file2InputStream, FormDataContentDisposition file2Detail,  Integer seed) {
        return Response.status(Status.NOT_IMPLEMENTED).build();
    }

    @Override
    public Response joinFromFile(InputStream file1InputStream, FormDataContentDisposition file1Detail, InputStream file2InputStream, FormDataContentDisposition file2Detail,  Integer col1,  Integer col2) {
        return Response.status(Status.NOT_IMPLEMENTED).build();
    }

    @Override
    public Response zipFromFile(String type, InputStream file1InputStream, FormDataContentDisposition file1Detail, InputStream file2InputStream, FormDataContentDisposition file2Detail, String sep) {
        return Response.status(Status.NOT_IMPLEMENTED).build();
    }
}

@@ -31,24 +31,132 @@
 .services;%0A%0A
+import innovimax.mixthem.rest.request.CheckFactory;%0Aimport innovimax.mixthem.rest.request.FileParamsCheck;%0A%0A
 import java.
@@ -376,16 +376,94 @@
 vice %7B%0A%0A
+    private final FileParamsCheck check = CheckFactory.getFileParamsCheck();%0A%0A
     @Ove
@@ -634,32 +634,192 @@
  file2Detail) %7B%0A
+        if (!check.addFromFile(file1InputStream, file1Detail, file2InputStream, file2Detail)) %7B%0A            return check.getErrorResponse();        %0A        %7D %0A
         return R
@@ -1066,32 +1066,190 @@
  file2Detail) %7B%0A
+        if (!check.altFromFile(type, file1InputStream, file1Detail, file2InputStream, file2Detail)) %7B%0A            return check.getErrorResponse();%0A        %7D %0A
         return R
@@ -1508,24 +1508,188 @@
 ger seed) %7B%0A
+        if (!check.randomAltFromFile(file1InputStream, file1Detail, file2InputStream, file2Detail, seed)) %7B%0A            return check.getErrorResponse();%0A        %7D %0A
         retu
@@ -1962,24 +1962,189 @@
 ger col2) %7B%0A
+        if (!check.joinFromFile(file1InputStream, file1Detail, file2InputStream, file2Detail, col1, col2)) %7B%0A            return check.getErrorResponse();%0A        %7D %0A
         retu
@@ -2411,24 +2411,187 @@
 ring sep) %7B%0A
+        if (!check.zipFromFile(type, file1InputStream, file1Detail, file2InputStream, file2Detail, sep)) %7B%0A            return check.getErrorResponse();%0A        %7D %0A
         retu

Update FileServiceImpl.java