Subversion Repositories XServices

Compare Revisions

Regard whitespace Rev 6 → Rev 10

/xservices/trunk/src/java/net/brutex/xservices/ws/ArchiveService.java/ArchiveService.java
25,6 → 25,7
import net.brutex.xservices.types.CompressionType;
import net.brutex.xservices.types.FileResource;
import net.brutex.xservices.types.ResourceInterface;
import net.brutex.xservices.types.ReturnCode;
import net.brutex.xservices.util.RunTask;
import net.brutex.xservices.util.UnRarTask;
import org.apache.tools.ant.taskdefs.BUnzip2;
61,13 → 62,13
public static final String WS_PARAM_OVERWRITE= "overwrite";
 
@WebMethod(operationName = WS_OPERATION_BZIP2, action=WS_OPERATION_BZIP2)
public String bzip2(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
public ReturnCode bzip2(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
@WebParam(name = WS_PARAM_DESTFILE) String file) {
return bzip(src, new File(file));
}
 
@WebMethod(operationName = WS_OPERATION_BZIP2_ARCHIVE, action=WS_OPERATION_BZIP2_ARCHIVE)
public String bzip2FromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
public ReturnCode bzip2FromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
@WebParam(name = WS_PARAM_DESTFILE) String file) {
return bzip(src, new File(file));
}
184,7 → 185,7
}
 
@WebMethod(exclude = true)
private String bzip(ResourceInterface src, File dst) {
private ReturnCode bzip(ResourceInterface src, File dst) {
if (dst.exists() && dst.isFile()) {
dst.delete();
}
195,7 → 196,7
bzip.setDestfile(dst);
 
Map<String, String> result = runner.postTask();
return "complete";
return new ReturnCode(0,"complete","");
}
 
@WebMethod(exclude = true)