1 |
/*
|
1 |
/*
|
2 |
* Copyright 2010 Brian Rosenberger (Brutex Network)
|
2 |
* Copyright 2010 Brian Rosenberger (Brutex Network)
|
3 |
*
|
3 |
*
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
* you may not use this file except in compliance with 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
|
6 |
* You may obtain a copy of the License at
|
7 |
*
|
7 |
*
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0
|
9 |
*
|
9 |
*
|
10 |
* Unless required by applicable law or agreed to in writing, software
|
10 |
* Unless required by applicable law or agreed to in writing, software
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
* See the License for the specific language governing permissions and
|
13 |
* See the License for the specific language governing permissions and
|
14 |
* limitations under the License.
|
14 |
* limitations under the License.
|
15 |
*/
|
15 |
*/
|
16 |
package net.brutex.xservices.ws;
|
16 |
package net.brutex.xservices.ws;
|
17 |
|
17 |
|
18 |
import javax.jws.WebMethod;
|
18 |
import javax.jws.WebMethod;
|
19 |
import javax.jws.WebParam;
|
19 |
import javax.jws.WebParam;
|
20 |
import javax.jws.WebService;
|
20 |
import javax.jws.WebService;
|
21 |
import net.brutex.xservices.types.ArchiveResource;
|
21 |
import net.brutex.xservices.types.ArchiveResource;
|
22 |
import net.brutex.xservices.types.CompressionType;
|
22 |
import net.brutex.xservices.types.CompressionType;
|
23 |
import net.brutex.xservices.types.FileResource;
|
23 |
import net.brutex.xservices.types.FileResource;
|
24 |
import net.brutex.xservices.types.FileSetResource;
|
24 |
import net.brutex.xservices.types.FileSetResource;
|
25 |
|
25 |
|
26 |
import net.brutex.xservices.types.ReturnCode;
|
26 |
import net.brutex.xservices.types.ReturnCode;
|
27 |
import net.brutex.xservices.util.BrutexNamespaces;
|
27 |
import net.brutex.xservices.util.BrutexNamespaces;
|
28 |
|
28 |
|
29 |
|
29 |
|
30 |
/**
|
30 |
/**
|
31 |
*
|
31 |
*
|
32 |
* @author Brian Rosenberger, bru@brutex.de
|
32 |
* @author Brian Rosenberger, bru@brutex.de
|
33 |
*/
|
33 |
*/
|
34 |
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
|
34 |
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
|
35 |
public interface ArchiveService {
|
35 |
public interface ArchiveService {
|
36 |
|
36 |
|
37 |
public static final String WS_OPERATION_BZIP2 = "bzip2";
|
37 |
public static final String WS_OPERATION_BZIP2 = "bzip2";
|
38 |
public static final String WS_OPERATION_BZIP2_ARCHIVE = "bzip2FromArchive";
|
38 |
public static final String WS_OPERATION_BZIP2_ARCHIVE = "bzip2FromArchive";
|
39 |
public static final String WS_OPERATION_GZIP = "gzip";
|
39 |
public static final String WS_OPERATION_GZIP = "gzip";
|
40 |
public static final String WS_OPERATION_GZIP_ARCHIVE = "gzipFromArchive";
|
40 |
public static final String WS_OPERATION_GZIP_ARCHIVE = "gzipFromArchive";
|
41 |
public static final String WS_OPERATION_UNZIP = "unzip";
|
41 |
public static final String WS_OPERATION_UNZIP = "unzip";
|
42 |
public static final String WS_OPERATION_GUNZIP = "gunzip";
|
42 |
public static final String WS_OPERATION_GUNZIP = "gunzip";
|
43 |
public static final String WS_OPERATION_BUNZIP2 = "bunzip2";
|
43 |
public static final String WS_OPERATION_BUNZIP2 = "bunzip2";
|
44 |
public static final String WS_PARAM_SOURCEFILE = "source";
|
44 |
public static final String WS_PARAM_SOURCEFILE = "source";
|
45 |
public static final String WS_PARAM_SOURCEFILE_STRING = "srcfile";
|
45 |
public static final String WS_PARAM_SOURCEFILE_STRING = "srcfile";
|
46 |
public static final String WS_PARAM_SOURCEURL = "srcurl";
|
46 |
public static final String WS_PARAM_SOURCEURL = "srcurl";
|
47 |
public static final String WS_PARAM_SOURCEARCHIVE = "archivesource";
|
47 |
public static final String WS_PARAM_SOURCEARCHIVE = "archivesource";
|
48 |
public static final String WS_PARAM_DESTFILE = "destfile";
|
48 |
public static final String WS_PARAM_DESTFILE = "destfile";
|
49 |
public static final String WS_PARAM_DESTDIR = "destdir";
|
49 |
public static final String WS_PARAM_DESTDIR = "destdir";
|
50 |
public static final String WS_PARAM_ENCODING = "encoding";
|
50 |
public static final String WS_PARAM_ENCODING = "encoding";
|
51 |
public static final String WS_PARAM_OVERWRITE = "overwrite";
|
51 |
public static final String WS_PARAM_OVERWRITE = "overwrite";
|
- |
|
52 |
public static final String WS_PARAM_COMPRESS = "compresslevel";
|
- |
|
53 |
|
- |
|
54 |
/**
|
- |
|
55 |
* @param src
|
- |
|
56 |
* @param file
|
- |
|
57 |
* @return
|
- |
|
58 |
* @throws XServicesFault
|
52 |
|
59 |
*/
|
53 |
@WebMethod(operationName = WS_OPERATION_BZIP2, action = WS_OPERATION_BZIP2)
|
60 |
@WebMethod(operationName = WS_OPERATION_BZIP2, action = WS_OPERATION_BZIP2)
|
54 |
public ReturnCode bzip2(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
|
61 |
public ReturnCode bzip2(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
|
- |
|
62 |
@WebParam(name = WS_PARAM_DESTFILE) String file) throws XServicesFault;
|
- |
|
63 |
|
- |
|
64 |
/**
|
- |
|
65 |
* @param src
|
- |
|
66 |
* @param file
|
- |
|
67 |
* @return
|
55 |
@WebParam(name = WS_PARAM_DESTFILE) String file);
|
68 |
* @throws XServicesFault
|
56 |
|
69 |
*/
|
57 |
@WebMethod(operationName = WS_OPERATION_BZIP2_ARCHIVE, action = WS_OPERATION_BZIP2_ARCHIVE)
|
70 |
@WebMethod(operationName = WS_OPERATION_BZIP2_ARCHIVE, action = WS_OPERATION_BZIP2_ARCHIVE)
|
- |
|
71 |
public ReturnCode bzip2FromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
|
- |
|
72 |
@WebParam(name = WS_PARAM_DESTFILE) String file) throws XServicesFault;
|
- |
|
73 |
|
- |
|
74 |
/**
|
- |
|
75 |
* @param src
|
- |
|
76 |
* @param file
|
58 |
public ReturnCode bzip2FromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
|
77 |
* @return
|
59 |
@WebParam(name = WS_PARAM_DESTFILE) String file);
|
78 |
* @throws XServicesFault
|
60 |
|
79 |
*/
|
- |
|
80 |
@WebMethod(operationName = WS_OPERATION_GZIP, action = WS_OPERATION_GZIP)
|
- |
|
81 |
public ReturnCode gzip(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
|
- |
|
82 |
@WebParam(name = WS_PARAM_DESTFILE) String file) throws XServicesFault;
|
- |
|
83 |
|
- |
|
84 |
/**
|
- |
|
85 |
* @param src
|
61 |
@WebMethod(operationName = WS_OPERATION_GZIP, action = WS_OPERATION_GZIP)
|
86 |
* @param file
|
62 |
public ReturnCode gzip(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
|
87 |
* @return
|
63 |
@WebParam(name = WS_PARAM_DESTFILE) String file);
|
88 |
* @throws XServicesFault
|
- |
|
89 |
*/
|
- |
|
90 |
@WebMethod(operationName = WS_OPERATION_GZIP_ARCHIVE, action = WS_OPERATION_GZIP_ARCHIVE)
|
- |
|
91 |
public ReturnCode gzipFromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
|
- |
|
92 |
@WebParam(name = WS_PARAM_DESTFILE) String file) throws XServicesFault;
|
- |
|
93 |
|
- |
|
94 |
/**
|
64 |
|
95 |
* @param src
|
65 |
@WebMethod(operationName = WS_OPERATION_GZIP_ARCHIVE, action = WS_OPERATION_GZIP_ARCHIVE)
|
96 |
* @param dest
|
66 |
public ReturnCode gzipFromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
|
97 |
* @return
|
- |
|
98 |
* @throws XServicesFault
|
- |
|
99 |
*/
|
- |
|
100 |
@WebMethod(operationName = WS_OPERATION_GUNZIP, action = WS_OPERATION_GUNZIP)
|
- |
|
101 |
public ReturnCode gunzip(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
- |
|
102 |
@WebParam(name = WS_PARAM_DESTDIR) String dest) throws XServicesFault;
|
- |
|
103 |
|
67 |
@WebParam(name = WS_PARAM_DESTFILE) String file);
|
104 |
/**
|
68 |
|
105 |
* @param src
|
69 |
@WebMethod(operationName = WS_OPERATION_GUNZIP, action = WS_OPERATION_GUNZIP)
|
106 |
* @param dest
|
- |
|
107 |
* @return
|
- |
|
108 |
* @throws XServicesFault
|
- |
|
109 |
*/
|
- |
|
110 |
@WebMethod(operationName = WS_OPERATION_BUNZIP2)
|
- |
|
111 |
public ReturnCode bunzip2(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
- |
|
112 |
@WebParam(name = WS_PARAM_DESTDIR) String dest) throws XServicesFault;
|
70 |
public ReturnCode gunzip(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
113 |
|
71 |
@WebParam(name = WS_PARAM_DESTDIR) String dest);
|
114 |
/**
|
72 |
|
115 |
* @param src
|
- |
|
116 |
* @param dest
|
- |
|
117 |
* @return
|
- |
|
118 |
* @throws XServicesFault
|
- |
|
119 |
*/
|
- |
|
120 |
@WebMethod(operationName = "gunzipFromURL")
|
- |
|
121 |
public ReturnCode gunzipFromURL(@WebParam(name = WS_PARAM_SOURCEURL) String src,
|
73 |
@WebMethod(operationName = WS_OPERATION_BUNZIP2)
|
122 |
@WebParam(name = WS_PARAM_DESTDIR) String dest) throws XServicesFault;
|
74 |
public ReturnCode bunzip2(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
123 |
|
75 |
@WebParam(name = WS_PARAM_DESTDIR) String dest);
|
124 |
/**
|
- |
|
125 |
* @param src
|
- |
|
126 |
* @param dest
|
- |
|
127 |
* @return
|
- |
|
128 |
* @throws XServicesFault
|
- |
|
129 |
*/
|
- |
|
130 |
@WebMethod(operationName = "bunzip2FromURL")
|
- |
|
131 |
public ReturnCode bunzip2FromURL(@WebParam(name = WS_PARAM_SOURCEURL) String src,
|
- |
|
132 |
@WebParam(name = WS_PARAM_DESTDIR) String dest) throws XServicesFault;
|
- |
|
133 |
|
76 |
|
134 |
/**
|
77 |
@WebMethod(operationName = "gunzipFromURL")
|
135 |
* @param src
|
78 |
public ReturnCode gunzipFromURL(@WebParam(name = WS_PARAM_SOURCEURL) String src,
|
136 |
* @param file
|
79 |
@WebParam(name = WS_PARAM_DESTDIR) String dest);
|
137 |
* @param overwrite
|
80 |
|
138 |
* @param encoding
|
81 |
@WebMethod(operationName = "bunzip2FromURL")
|
139 |
* @param level
|
82 |
public ReturnCode bunzip2FromURL(@WebParam(name = WS_PARAM_SOURCEURL) String src,
|
140 |
* @return
|
83 |
@WebParam(name = WS_PARAM_DESTDIR) String dest);
|
141 |
* @throws XServicesFault
|
84 |
|
142 |
*/
|
85 |
@WebMethod(operationName = "zip")
|
143 |
@WebMethod(operationName = "zip")
|
86 |
public ReturnCode zip(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
|
144 |
public ReturnCode zip(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
|
87 |
@WebParam(name = WS_PARAM_DESTFILE) String file,
|
145 |
@WebParam(name = WS_PARAM_DESTFILE) String file,
|
88 |
@WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
|
146 |
@WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
|
89 |
@WebParam(name = WS_PARAM_ENCODING) String encoding,
|
147 |
@WebParam(name = WS_PARAM_ENCODING) String encoding,
|
90 |
@WebParam(name = "compresslevel") int level);
|
148 |
@WebParam(name = WS_PARAM_COMPRESS) int level) throws XServicesFault;
|
- |
|
149 |
|
- |
|
150 |
/**
|
- |
|
151 |
* @param src
|
- |
|
152 |
* @param file
|
- |
|
153 |
* @param update
|
- |
|
154 |
* @param encoding
|
- |
|
155 |
* @param level
|
- |
|
156 |
* @return
|
- |
|
157 |
* @throws XServicesFault
|
91 |
|
158 |
*/
|
92 |
@WebMethod(operationName = "zipFromArchive")
|
159 |
@WebMethod(operationName = "zipFromArchive")
|
93 |
public ReturnCode zipFromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
|
160 |
public ReturnCode zipFromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
|
94 |
@WebParam(name = WS_PARAM_DESTFILE) String file,
|
161 |
@WebParam(name = WS_PARAM_DESTFILE) String file,
|
95 |
@WebParam(name = WS_PARAM_OVERWRITE) boolean update,
|
162 |
@WebParam(name = WS_PARAM_OVERWRITE) boolean update,
|
96 |
@WebParam(name = WS_PARAM_ENCODING) String encoding,
|
163 |
@WebParam(name = WS_PARAM_ENCODING) String encoding,
|
97 |
@WebParam(name = "compresslevel") int level);
|
164 |
@WebParam(name = "compresslevel") int level) throws XServicesFault;
|
- |
|
165 |
|
- |
|
166 |
/**
|
- |
|
167 |
* @param src
|
- |
|
168 |
* @param dest
|
- |
|
169 |
* @param overwrite
|
- |
|
170 |
* @param encoding
|
- |
|
171 |
* @return
|
- |
|
172 |
* @throws XServicesFault
|
98 |
|
173 |
*/
|
99 |
@WebMethod(operationName = "unzip")
|
174 |
@WebMethod(operationName = "unzip")
|
100 |
public ReturnCode unzip(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
175 |
public ReturnCode unzip(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
101 |
@WebParam(name = WS_PARAM_DESTDIR) String dest,
|
176 |
@WebParam(name = WS_PARAM_DESTDIR) String dest,
|
102 |
@WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
|
177 |
@WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
|
103 |
@WebParam(name = WS_PARAM_ENCODING) String encoding);
|
178 |
@WebParam(name = WS_PARAM_ENCODING) String encoding) throws XServicesFault;
|
- |
|
179 |
|
- |
|
180 |
/**
|
- |
|
181 |
* @param src
|
- |
|
182 |
* @param dest
|
- |
|
183 |
* @return
|
- |
|
184 |
* @throws XServicesFault
|
104 |
|
185 |
*/
|
105 |
@WebMethod(operationName = "unrar")
|
186 |
@WebMethod(operationName = "unrar")
|
106 |
public ReturnCode unrar(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
187 |
public ReturnCode unrar(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
- |
|
188 |
@WebParam(name = WS_PARAM_DESTDIR) String dest) throws XServicesFault;
|
- |
|
189 |
|
- |
|
190 |
/**
|
- |
|
191 |
* @param src
|
- |
|
192 |
* @param dest
|
- |
|
193 |
* @param overwrite
|
- |
|
194 |
* @param compression
|
- |
|
195 |
* @return
|
107 |
@WebParam(name = WS_PARAM_DESTDIR) String dest);
|
196 |
* @throws XServicesFault
|
108 |
|
197 |
*/
|
109 |
@WebMethod(operationName = "untar")
|
198 |
@WebMethod(operationName = "untar")
|
110 |
public ReturnCode untar(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
199 |
public ReturnCode untar(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
111 |
@WebParam(name = WS_PARAM_DESTDIR) String dest,
|
200 |
@WebParam(name = WS_PARAM_DESTDIR) String dest,
|
112 |
@WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
|
201 |
@WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
|
113 |
@WebParam(name = "compression") CompressionType compression);
|
202 |
@WebParam(name = "compression") CompressionType compression) throws XServicesFault;
|
114 |
}
|
203 |
}
|