Subversion Repositories XServices

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6 brianR 1
/*
2
 *   Copyright 2010 Brian Rosenberger (Brutex Network)
3
 *
4
 *   Licensed under the Apache License, Version 2.0 (the "License");
5
 *   you may not use this file except in compliance with the License.
6
 *   You may obtain a copy of the License at
7
 *
8
 *       http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 *   Unless required by applicable law or agreed to in writing, software
11
 *   distributed under the License is distributed on an "AS IS" BASIS,
12
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 *   See the License for the specific language governing permissions and
14
 *   limitations under the License.
15
 */
16
package net.brutex.xservices.ws;
17
 
18
import javax.jws.WebMethod;
19
import javax.jws.WebParam;
20
import javax.jws.WebService;
21
import net.brutex.xservices.types.ArchiveResource;
22
import net.brutex.xservices.types.CompressionType;
23
import net.brutex.xservices.types.FileResource;
54 brianR 24
import net.brutex.xservices.types.FileSetResource;
46 brianR 25
 
10 brianR 26
import net.brutex.xservices.types.ReturnCode;
46 brianR 27
import net.brutex.xservices.util.BrutexNamespaces;
6 brianR 28
 
46 brianR 29
 
6 brianR 30
/**
31
 *
32
 * @author Brian Rosenberger, bru@brutex.de
33
 */
46 brianR 34
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
35
public interface ArchiveService {
6 brianR 36
 
37
    public static final String WS_OPERATION_BZIP2 = "bzip2";
38
    public static final String WS_OPERATION_BZIP2_ARCHIVE = "bzip2FromArchive";
39
    public static final String WS_OPERATION_GZIP = "gzip";
40
    public static final String WS_OPERATION_GZIP_ARCHIVE = "gzipFromArchive";
41
    public static final String WS_OPERATION_UNZIP = "unzip";
42
    public static final String WS_OPERATION_GUNZIP = "gunzip";
43
    public static final String WS_OPERATION_BUNZIP2 = "bunzip2";
44
    public static final String WS_PARAM_SOURCEFILE = "source";
45
    public static final String WS_PARAM_SOURCEFILE_STRING = "srcfile";
46
    public static final String WS_PARAM_SOURCEURL = "srcurl";
47
    public static final String WS_PARAM_SOURCEARCHIVE = "archivesource";
48
    public static final String WS_PARAM_DESTFILE = "destfile";
49
    public static final String WS_PARAM_DESTDIR = "destdir";
50
    public static final String WS_PARAM_ENCODING = "encoding";
12 brianR 51
    public static final String WS_PARAM_OVERWRITE = "overwrite";
6 brianR 52
 
12 brianR 53
    @WebMethod(operationName = WS_OPERATION_BZIP2, action = WS_OPERATION_BZIP2)
10 brianR 54
    public ReturnCode bzip2(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
46 brianR 55
            @WebParam(name = WS_PARAM_DESTFILE) String file);
6 brianR 56
 
12 brianR 57
    @WebMethod(operationName = WS_OPERATION_BZIP2_ARCHIVE, action = WS_OPERATION_BZIP2_ARCHIVE)
10 brianR 58
    public ReturnCode bzip2FromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
46 brianR 59
            @WebParam(name = WS_PARAM_DESTFILE) String file);
6 brianR 60
 
12 brianR 61
    @WebMethod(operationName = WS_OPERATION_GZIP, action = WS_OPERATION_GZIP)
62
    public ReturnCode gzip(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
46 brianR 63
            @WebParam(name = WS_PARAM_DESTFILE) String file);
6 brianR 64
 
12 brianR 65
    @WebMethod(operationName = WS_OPERATION_GZIP_ARCHIVE, action = WS_OPERATION_GZIP_ARCHIVE)
66
    public ReturnCode gzipFromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
46 brianR 67
            @WebParam(name = WS_PARAM_DESTFILE) String file);
6 brianR 68
 
12 brianR 69
    @WebMethod(operationName = WS_OPERATION_GUNZIP, action = WS_OPERATION_GUNZIP)
70
    public ReturnCode gunzip(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
46 brianR 71
            @WebParam(name = WS_PARAM_DESTDIR) String dest);
6 brianR 72
 
73
    @WebMethod(operationName = WS_OPERATION_BUNZIP2)
12 brianR 74
    public ReturnCode bunzip2(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
46 brianR 75
            @WebParam(name = WS_PARAM_DESTDIR) String dest);
6 brianR 76
 
77
    @WebMethod(operationName = "gunzipFromURL")
12 brianR 78
    public ReturnCode gunzipFromURL(@WebParam(name = WS_PARAM_SOURCEURL) String src,
46 brianR 79
            @WebParam(name = WS_PARAM_DESTDIR) String dest);
6 brianR 80
 
81
    @WebMethod(operationName = "bunzip2FromURL")
12 brianR 82
    public ReturnCode bunzip2FromURL(@WebParam(name = WS_PARAM_SOURCEURL) String src,
46 brianR 83
            @WebParam(name = WS_PARAM_DESTDIR) String dest);
6 brianR 84
 
85
    @WebMethod(operationName = "zip")
12 brianR 86
    public ReturnCode zip(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
6 brianR 87
            @WebParam(name = WS_PARAM_DESTFILE) String file,
88
            @WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
89
            @WebParam(name = WS_PARAM_ENCODING) String encoding,
46 brianR 90
            @WebParam(name = "compresslevel") int level);
6 brianR 91
 
92
    @WebMethod(operationName = "zipFromArchive")
12 brianR 93
    public ReturnCode zipFromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
6 brianR 94
            @WebParam(name = WS_PARAM_DESTFILE) String file,
95
            @WebParam(name = WS_PARAM_OVERWRITE) boolean update,
96
            @WebParam(name = WS_PARAM_ENCODING) String encoding,
46 brianR 97
            @WebParam(name = "compresslevel") int level);
6 brianR 98
 
99
    @WebMethod(operationName = "unzip")
12 brianR 100
    public ReturnCode unzip(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
6 brianR 101
            @WebParam(name = WS_PARAM_DESTDIR) String dest,
102
            @WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
46 brianR 103
            @WebParam(name = WS_PARAM_ENCODING) String encoding);
6 brianR 104
 
105
    @WebMethod(operationName = "unrar")
12 brianR 106
    public ReturnCode unrar(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
46 brianR 107
            @WebParam(name = WS_PARAM_DESTDIR) String dest);
6 brianR 108
 
109
    @WebMethod(operationName = "untar")
12 brianR 110
    public ReturnCode untar(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
6 brianR 111
            @WebParam(name = WS_PARAM_DESTDIR) String dest,
112
            @WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
46 brianR 113
            @WebParam(name = "compression") CompressionType compression);
6 brianR 114
}