Subversion Repositories XServices

Rev

Rev 83 | Details | Compare with Previous | 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.CompressionType;
46 brianR 22
 
10 brianR 23
import net.brutex.xservices.types.ReturnCode;
83 brianR 24
import net.brutex.xservices.types.ant.ArchiveResource;
25
import net.brutex.xservices.types.ant.FileResource;
26
import net.brutex.xservices.types.ant.FileSetResource;
46 brianR 27
import net.brutex.xservices.util.BrutexNamespaces;
6 brianR 28
 
46 brianR 29
 
6 brianR 30
/**
69 brianR 31
 * Archiving related web service.
32
 *
6 brianR 33
 * @author Brian Rosenberger, bru@brutex.de
69 brianR 34
 * @since 0.4.0
6 brianR 35
 */
46 brianR 36
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
37
public interface ArchiveService {
6 brianR 38
 
69 brianR 39
    final String WS_OPERATION_BZIP2 = "bzip2";
40
    final String WS_OPERATION_BZIP2_ARCHIVE = "bzip2FromArchive";
41
    final String WS_OPERATION_GZIP = "gzip";
42
    final String WS_OPERATION_GZIP_ARCHIVE = "gzipFromArchive";
43
    final String WS_OPERATION_UNZIP = "unzip";
44
    final String WS_OPERATION_GUNZIP = "gunzip";
45
    final String WS_OPERATION_BUNZIP2 = "bunzip2";
46
    final String WS_PARAM_SOURCEFILE = "source";
47
    final String WS_PARAM_SOURCEFILE_STRING = "srcfile";
48
    final String WS_PARAM_SOURCEURL = "srcurl";
49
    final String WS_PARAM_SOURCEARCHIVE = "archivesource";
50
    final String WS_PARAM_DESTFILE = "destfile";
51
    final String WS_PARAM_DESTDIR = "destdir";
52
    final String WS_PARAM_ENCODING = "encoding";
53
    final String WS_PARAM_OVERWRITE = "overwrite";
54
    final String WS_PARAM_COMPRESS = "compresslevel";
6 brianR 55
 
65 brianR 56
    /**
57
     * @param src
58
     * @param file
59
     * @return
60
     * @throws XServicesFault
61
     */
12 brianR 62
    @WebMethod(operationName = WS_OPERATION_BZIP2, action = WS_OPERATION_BZIP2)
10 brianR 63
    public ReturnCode bzip2(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
65 brianR 64
            @WebParam(name = WS_PARAM_DESTFILE) String file) throws XServicesFault;
6 brianR 65
 
65 brianR 66
    /**
67
     * @param src
68
     * @param file
69
     * @return
70
     * @throws XServicesFault
71
     */
12 brianR 72
    @WebMethod(operationName = WS_OPERATION_BZIP2_ARCHIVE, action = WS_OPERATION_BZIP2_ARCHIVE)
10 brianR 73
    public ReturnCode bzip2FromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
65 brianR 74
            @WebParam(name = WS_PARAM_DESTFILE) String file) throws XServicesFault;
6 brianR 75
 
65 brianR 76
    /**
77
     * @param src
78
     * @param file
79
     * @return
80
     * @throws XServicesFault
81
     */
12 brianR 82
    @WebMethod(operationName = WS_OPERATION_GZIP, action = WS_OPERATION_GZIP)
83
    public ReturnCode gzip(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
65 brianR 84
            @WebParam(name = WS_PARAM_DESTFILE) String file) throws XServicesFault;
6 brianR 85
 
65 brianR 86
    /**
87
     * @param src
88
     * @param file
89
     * @return
90
     * @throws XServicesFault
91
     */
12 brianR 92
    @WebMethod(operationName = WS_OPERATION_GZIP_ARCHIVE, action = WS_OPERATION_GZIP_ARCHIVE)
93
    public ReturnCode gzipFromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
65 brianR 94
            @WebParam(name = WS_PARAM_DESTFILE) String file) throws XServicesFault;
6 brianR 95
 
65 brianR 96
    /**
97
     * @param src
98
     * @param dest
99
     * @return
100
     * @throws XServicesFault
101
     */
12 brianR 102
    @WebMethod(operationName = WS_OPERATION_GUNZIP, action = WS_OPERATION_GUNZIP)
103
    public ReturnCode gunzip(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
65 brianR 104
            @WebParam(name = WS_PARAM_DESTDIR) String dest) throws XServicesFault;
6 brianR 105
 
65 brianR 106
    /**
107
     * @param src
108
     * @param dest
109
     * @return
110
     * @throws XServicesFault
111
     */
6 brianR 112
    @WebMethod(operationName = WS_OPERATION_BUNZIP2)
12 brianR 113
    public ReturnCode bunzip2(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
65 brianR 114
            @WebParam(name = WS_PARAM_DESTDIR) String dest) throws XServicesFault;
6 brianR 115
 
65 brianR 116
    /**
117
     * @param src
118
     * @param dest
119
     * @return
120
     * @throws XServicesFault
121
     */
6 brianR 122
    @WebMethod(operationName = "gunzipFromURL")
12 brianR 123
    public ReturnCode gunzipFromURL(@WebParam(name = WS_PARAM_SOURCEURL) String src,
65 brianR 124
            @WebParam(name = WS_PARAM_DESTDIR) String dest) throws XServicesFault;
6 brianR 125
 
65 brianR 126
    /**
127
     * @param src
128
     * @param dest
129
     * @return
130
     * @throws XServicesFault
131
     */
6 brianR 132
    @WebMethod(operationName = "bunzip2FromURL")
12 brianR 133
    public ReturnCode bunzip2FromURL(@WebParam(name = WS_PARAM_SOURCEURL) String src,
65 brianR 134
            @WebParam(name = WS_PARAM_DESTDIR) String dest) throws XServicesFault;
6 brianR 135
 
65 brianR 136
    /**
137
     * @param src
138
     * @param file
139
     * @param overwrite
140
     * @param encoding
141
     * @param level
142
     * @return
143
     * @throws XServicesFault
144
     */
6 brianR 145
    @WebMethod(operationName = "zip")
12 brianR 146
    public ReturnCode zip(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
6 brianR 147
            @WebParam(name = WS_PARAM_DESTFILE) String file,
148
            @WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
149
            @WebParam(name = WS_PARAM_ENCODING) String encoding,
65 brianR 150
            @WebParam(name = WS_PARAM_COMPRESS) int level) throws XServicesFault;
6 brianR 151
 
65 brianR 152
    /**
153
     * @param src
154
     * @param file
155
     * @param update
156
     * @param encoding
157
     * @param level
158
     * @return
159
     * @throws XServicesFault
160
     */
6 brianR 161
    @WebMethod(operationName = "zipFromArchive")
12 brianR 162
    public ReturnCode zipFromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
6 brianR 163
            @WebParam(name = WS_PARAM_DESTFILE) String file,
164
            @WebParam(name = WS_PARAM_OVERWRITE) boolean update,
165
            @WebParam(name = WS_PARAM_ENCODING) String encoding,
65 brianR 166
            @WebParam(name = "compresslevel") int level) throws XServicesFault;
6 brianR 167
 
65 brianR 168
    /**
169
     * @param src
170
     * @param dest
171
     * @param overwrite
172
     * @param encoding
173
     * @return
174
     * @throws XServicesFault
175
     */
6 brianR 176
    @WebMethod(operationName = "unzip")
12 brianR 177
    public ReturnCode unzip(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
6 brianR 178
            @WebParam(name = WS_PARAM_DESTDIR) String dest,
179
            @WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
65 brianR 180
            @WebParam(name = WS_PARAM_ENCODING) String encoding) throws XServicesFault;
6 brianR 181
 
65 brianR 182
    /**
183
     * @param src
184
     * @param dest
185
     * @return
186
     * @throws XServicesFault
187
     */
6 brianR 188
    @WebMethod(operationName = "unrar")
12 brianR 189
    public ReturnCode unrar(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
65 brianR 190
            @WebParam(name = WS_PARAM_DESTDIR) String dest) throws XServicesFault;
6 brianR 191
 
65 brianR 192
    /**
193
     * @param src
194
     * @param dest
195
     * @param overwrite
196
     * @param compression
197
     * @return
198
     * @throws XServicesFault
199
     */
6 brianR 200
    @WebMethod(operationName = "untar")
12 brianR 201
    public ReturnCode untar(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
6 brianR 202
            @WebParam(name = WS_PARAM_DESTDIR) String dest,
203
            @WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
65 brianR 204
            @WebParam(name = "compression") CompressionType compression) throws XServicesFault;
6 brianR 205
}