package innovimax.mixthem.rest.request;

import java.io.InputStream;

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

public class FileParamsCheck extends AbstractParamsCheck {

    public boolean addFromFile(InputStream file1InputStream, FormDataContentDisposition file1Detail, InputStream file2InputStream, FormDataContentDisposition file2Detail) {
        if (checkFileMissing(file1Detail) && checkFileMissing(file2Detail)) {
            return true;
        }
        return false;
    }

    public boolean altFromFile(String type, InputStream file1InputStream, FormDataContentDisposition file1Detail, InputStream file2InputStream, FormDataContentDisposition file2Detail) {
        if (checkAlternateMode(type) && checkFileMissing(file1Detail) && checkFileMissing(file2Detail)) {
            return true;
        }
        return false;
    }

    public boolean randomAltFromFile(InputStream file1InputStream, FormDataContentDisposition file1Detail, InputStream file2InputStream, FormDataContentDisposition file2Detail,  Integer seed) {
        if (checkFileMissing(file1Detail) && checkFileMissing(file2Detail)) {
            return true;
        }
        return false;
    }

    public boolean joinFromFile(InputStream file1InputStream, FormDataContentDisposition file1Detail, InputStream file2InputStream, FormDataContentDisposition file2Detail,  Integer col1,  Integer col2) {
        if (checkFileMissing(file1Detail) && checkFileMissing(file2Detail)) {
            return true;
        }
        return false;
    }

    public boolean zipFromFile(String type, InputStream file1InputStream, FormDataContentDisposition file1Detail, InputStream file2InputStream, FormDataContentDisposition file2Detail, String sep) {
        if (checkZipMode(type) && checkFileMissing(file1Detail) && checkFileMissing(file2Detail)) {
            return true;
        }
        return false;
    }
}

@@ -435,32 +435,50 @@
 ing(file2Detail)
+ && checkAddRule()
 ) %7B%0A            
@@ -481,32 +481,40 @@
     return true;
+        
 %0A        %7D%0A     
@@ -817,32 +817,60 @@
 ing(file2Detail)
+ && checkAlternateRule(type)
 ) %7B%0A            
@@ -873,32 +873,40 @@
     return true;
+        
 %0A        %7D%0A     
@@ -1189,32 +1189,60 @@
 ing(file2Detail)
+ && checkRandomAltRule(seed)
 ) %7B%0A            
@@ -1245,32 +1245,40 @@
     return true;
+        
 %0A        %7D%0A     
@@ -1571,32 +1571,61 @@
 ing(file2Detail)
+ && checkJoinRule(col1, col2)
 ) %7B%0A            
@@ -1870,24 +1870,24 @@
 ring sep) %7B%0A
-
         if (
@@ -1970,16 +1970,43 @@
 2Detail)
+ && checkZipRule(type, sep)
 ) %7B%0A    

Update FileParamsCheck.java