Line 20... |
Line 20... |
20 |
import javax.jws.WebParam;
|
20 |
import javax.jws.WebParam;
|
21 |
import javax.jws.WebService;
|
21 |
import javax.jws.WebService;
|
22 |
import net.brutex.xservices.types.ArchiveResource;
|
22 |
import net.brutex.xservices.types.ArchiveResource;
|
23 |
import net.brutex.xservices.types.CompressionType;
|
23 |
import net.brutex.xservices.types.CompressionType;
|
24 |
import net.brutex.xservices.types.FileResource;
|
24 |
import net.brutex.xservices.types.FileResource;
|
25 |
import net.brutex.xservices.types.FileSetResource;
|
- |
|
26 |
import net.brutex.xservices.types.ResourceInterface;
|
25 |
import net.brutex.xservices.types.ResourceInterface;
|
27 |
import net.brutex.xservices.types.ResourceSetInterface;
|
- |
|
28 |
import net.brutex.xservices.types.ReturnCode;
|
26 |
import net.brutex.xservices.types.ReturnCode;
|
29 |
import net.brutex.xservices.util.BrutexNamespaces;
|
27 |
import net.brutex.xservices.util.BrutexNamespaces;
|
30 |
import net.brutex.xservices.util.RunTask;
|
28 |
import net.brutex.xservices.util.RunTask;
|
31 |
import net.brutex.xservices.util.UnRarTask;
|
29 |
import net.brutex.xservices.util.UnRarTask;
|
32 |
import net.brutex.xservices.ws.ArchiveService;
|
30 |
import net.brutex.xservices.ws.ArchiveService;
|
Line 50... |
Line 48... |
50 |
|
48 |
|
51 |
|
49 |
|
52 |
/* (non-Javadoc)
|
50 |
/* (non-Javadoc)
|
53 |
* @see net.brutex.xservices.ws.ArchiveService#bzip2(net.brutex.xservices.types.FileResource, java.lang.String)
|
- |
|
54 |
*/
|
51 |
* @see net.brutex.xservices.ws.ArchiveService#bzip2(net.brutex.xservices.types.FileResource, java.lang.String)
|
55 |
@Override
|
52 |
*/
|
56 |
@WebMethod(operationName = WS_OPERATION_BZIP2, action = WS_OPERATION_BZIP2)
|
53 |
@WebMethod(operationName = WS_OPERATION_BZIP2, action = WS_OPERATION_BZIP2)
|
57 |
public ReturnCode bzip2(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
|
54 |
public ReturnCode bzip2(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
|
58 |
@WebParam(name = WS_PARAM_DESTFILE) String file) {
|
55 |
@WebParam(name = WS_PARAM_DESTFILE) String file) {
|
Line 59... |
Line 56... |
59 |
return bzip(src, new File(file));
|
56 |
return bzip(src, new File(file));
|
60 |
}
|
57 |
}
|
61 |
|
58 |
|
62 |
/* (non-Javadoc)
|
59 |
/* (non-Javadoc)
|
63 |
* @see net.brutex.xservices.ws.ArchiveService#bzip2FromArchive(net.brutex.xservices.types.ArchiveResource, java.lang.String)
|
60 |
* @see net.brutex.xservices.ws.ArchiveService#bzip2FromArchive(net.brutex.xservices.types.ArchiveResource, java.lang.String)
|
64 |
*/
|
61 |
*/
|
65 |
@Override
|
62 |
|
66 |
@WebMethod(operationName = WS_OPERATION_BZIP2_ARCHIVE, action = WS_OPERATION_BZIP2_ARCHIVE)
|
63 |
@WebMethod(operationName = WS_OPERATION_BZIP2_ARCHIVE, action = WS_OPERATION_BZIP2_ARCHIVE)
|
67 |
public ReturnCode bzip2FromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
|
64 |
public ReturnCode bzip2FromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
|
Line 68... |
Line 65... |
68 |
@WebParam(name = WS_PARAM_DESTFILE) String file) {
|
65 |
@WebParam(name = WS_PARAM_DESTFILE) String file) {
|
69 |
return null;// return bzip(src, new File(file));
|
66 |
return null;// return bzip(src, new File(file));
|
70 |
}
|
67 |
}
|
71 |
|
68 |
|
72 |
/* (non-Javadoc)
|
69 |
/* (non-Javadoc)
|
73 |
* @see net.brutex.xservices.ws.ArchiveService#gzip(net.brutex.xservices.types.FileResource, java.lang.String)
|
70 |
* @see net.brutex.xservices.ws.ArchiveService#gzip(net.brutex.xservices.types.FileResource, java.lang.String)
|
74 |
*/
|
71 |
*/
|
75 |
@Override
|
72 |
|
76 |
@WebMethod(operationName = WS_OPERATION_GZIP, action = WS_OPERATION_GZIP)
|
73 |
@WebMethod(operationName = WS_OPERATION_GZIP, action = WS_OPERATION_GZIP)
|
Line 77... |
Line 74... |
77 |
public ReturnCode gzip(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
|
74 |
public ReturnCode gzip(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
|
78 |
@WebParam(name = WS_PARAM_DESTFILE) String file) {
|
75 |
@WebParam(name = WS_PARAM_DESTFILE) String file) {
|
79 |
return gzip(src, new File(file));
|
76 |
return gzip(src, new File(file));
|
80 |
}
|
77 |
}
|
81 |
|
78 |
|
82 |
/* (non-Javadoc)
|
79 |
/* (non-Javadoc)
|
83 |
* @see net.brutex.xservices.ws.ArchiveService#gzipFromArchive(net.brutex.xservices.types.ArchiveResource, java.lang.String)
|
80 |
* @see net.brutex.xservices.ws.ArchiveService#gzipFromArchive(net.brutex.xservices.types.ArchiveResource, java.lang.String)
|
84 |
*/
|
81 |
*/
|
85 |
@Override
|
82 |
|
Line 86... |
Line 83... |
86 |
@WebMethod(operationName = WS_OPERATION_GZIP_ARCHIVE, action = WS_OPERATION_GZIP_ARCHIVE)
|
83 |
@WebMethod(operationName = WS_OPERATION_GZIP_ARCHIVE, action = WS_OPERATION_GZIP_ARCHIVE)
|
87 |
public ReturnCode gzipFromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
|
84 |
public ReturnCode gzipFromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
|
88 |
@WebParam(name = WS_PARAM_DESTFILE) String file) {
|
85 |
@WebParam(name = WS_PARAM_DESTFILE) String file) {
|
89 |
return gzip(src, new File(file));
|
86 |
return gzip(src, new File(file));
|
90 |
}
|
87 |
}
|
91 |
|
88 |
|
92 |
/* (non-Javadoc)
|
89 |
/* (non-Javadoc)
|
93 |
* @see net.brutex.xservices.ws.ArchiveService#gunzip(java.lang.String, java.lang.String)
|
90 |
* @see net.brutex.xservices.ws.ArchiveService#gunzip(java.lang.String, java.lang.String)
|
94 |
*/
|
91 |
*/
|
Line 104... |
Line 101... |
104 |
}
|
101 |
}
|
Line 105... |
Line 102... |
105 |
|
102 |
|
106 |
/* (non-Javadoc)
|
103 |
/* (non-Javadoc)
|
107 |
* @see net.brutex.xservices.ws.ArchiveService#bunzip2(java.lang.String, java.lang.String)
|
104 |
* @see net.brutex.xservices.ws.ArchiveService#bunzip2(java.lang.String, java.lang.String)
|
108 |
*/
|
105 |
*/
|
109 |
@Override
|
106 |
|
110 |
@WebMethod(operationName = WS_OPERATION_BUNZIP2)
|
107 |
@WebMethod(operationName = WS_OPERATION_BUNZIP2)
|
111 |
public ReturnCode bunzip2(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
108 |
public ReturnCode bunzip2(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
112 |
@WebParam(name = WS_PARAM_DESTDIR) String dest) {
|
109 |
@WebParam(name = WS_PARAM_DESTDIR) String dest) {
|
113 |
File target = null;
|
110 |
File target = null;
|
Line 118... |
Line 115... |
118 |
}
|
115 |
}
|
Line 119... |
Line 116... |
119 |
|
116 |
|
120 |
/* (non-Javadoc)
|
117 |
/* (non-Javadoc)
|
121 |
* @see net.brutex.xservices.ws.ArchiveService#gunzipFromURL(java.lang.String, java.lang.String)
|
118 |
* @see net.brutex.xservices.ws.ArchiveService#gunzipFromURL(java.lang.String, java.lang.String)
|
122 |
*/
|
119 |
*/
|
123 |
@Override
|
120 |
|
124 |
@WebMethod(operationName = "gunzipFromURL")
|
121 |
@WebMethod(operationName = "gunzipFromURL")
|
125 |
public ReturnCode gunzipFromURL(@WebParam(name = WS_PARAM_SOURCEURL) String src,
|
122 |
public ReturnCode gunzipFromURL(@WebParam(name = WS_PARAM_SOURCEURL) String src,
|
126 |
@WebParam(name = WS_PARAM_DESTDIR) String dest) {
|
123 |
@WebParam(name = WS_PARAM_DESTDIR) String dest) {
|
127 |
File target = null;
|
124 |
File target = null;
|
Line 132... |
Line 129... |
132 |
}
|
129 |
}
|
Line 133... |
Line 130... |
133 |
|
130 |
|
134 |
/* (non-Javadoc)
|
131 |
/* (non-Javadoc)
|
135 |
* @see net.brutex.xservices.ws.ArchiveService#bunzip2FromURL(java.lang.String, java.lang.String)
|
132 |
* @see net.brutex.xservices.ws.ArchiveService#bunzip2FromURL(java.lang.String, java.lang.String)
|
136 |
*/
|
133 |
*/
|
137 |
@Override
|
134 |
|
138 |
@WebMethod(operationName = "bunzip2FromURL")
|
135 |
@WebMethod(operationName = "bunzip2FromURL")
|
139 |
public ReturnCode bunzip2FromURL(@WebParam(name = WS_PARAM_SOURCEURL) String src,
|
136 |
public ReturnCode bunzip2FromURL(@WebParam(name = WS_PARAM_SOURCEURL) String src,
|
140 |
@WebParam(name = WS_PARAM_DESTDIR) String dest) {
|
137 |
@WebParam(name = WS_PARAM_DESTDIR) String dest) {
|
141 |
File target = null;
|
138 |
File target = null;
|
Line 146... |
Line 143... |
146 |
}
|
143 |
}
|
Line 147... |
Line 144... |
147 |
|
144 |
|
148 |
/* (non-Javadoc)
|
145 |
/* (non-Javadoc)
|
149 |
* @see net.brutex.xservices.ws.ArchiveService#zip(net.brutex.xservices.types.FileResource, java.lang.String, boolean, java.lang.String, int)
|
146 |
* @see net.brutex.xservices.ws.ArchiveService#zip(net.brutex.xservices.types.FileResource, java.lang.String, boolean, java.lang.String, int)
|
150 |
*/
|
147 |
*/
|
151 |
@Override
|
148 |
|
152 |
@WebMethod(operationName = "zip")
|
149 |
@WebMethod(operationName = "zip")
|
153 |
public ReturnCode zip(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
|
150 |
public ReturnCode zip(@WebParam(name = WS_PARAM_SOURCEFILE) FileResource src,
|
154 |
@WebParam(name = WS_PARAM_DESTFILE) String file,
|
151 |
@WebParam(name = WS_PARAM_DESTFILE) String file,
|
155 |
@WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
|
152 |
@WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
|
Line 165... |
Line 162... |
165 |
}
|
162 |
}
|
Line 166... |
Line 163... |
166 |
|
163 |
|
167 |
/* (non-Javadoc)
|
164 |
/* (non-Javadoc)
|
168 |
* @see net.brutex.xservices.ws.ArchiveService#zipFromArchive(net.brutex.xservices.types.ArchiveResource, java.lang.String, boolean, java.lang.String, int)
|
165 |
* @see net.brutex.xservices.ws.ArchiveService#zipFromArchive(net.brutex.xservices.types.ArchiveResource, java.lang.String, boolean, java.lang.String, int)
|
169 |
*/
|
166 |
*/
|
170 |
@Override
|
167 |
|
171 |
@WebMethod(operationName = "zipFromArchive")
|
168 |
@WebMethod(operationName = "zipFromArchive")
|
172 |
public ReturnCode zipFromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
|
169 |
public ReturnCode zipFromArchive(@WebParam(name = WS_PARAM_SOURCEARCHIVE) ArchiveResource src,
|
173 |
@WebParam(name = WS_PARAM_DESTFILE) String file,
|
170 |
@WebParam(name = WS_PARAM_DESTFILE) String file,
|
174 |
@WebParam(name = WS_PARAM_OVERWRITE) boolean update,
|
171 |
@WebParam(name = WS_PARAM_OVERWRITE) boolean update,
|
Line 178... |
Line 175... |
178 |
}
|
175 |
}
|
Line 179... |
Line 176... |
179 |
|
176 |
|
180 |
/* (non-Javadoc)
|
177 |
/* (non-Javadoc)
|
181 |
* @see net.brutex.xservices.ws.ArchiveService#unzip(java.lang.String, java.lang.String, boolean, java.lang.String)
|
178 |
* @see net.brutex.xservices.ws.ArchiveService#unzip(java.lang.String, java.lang.String, boolean, java.lang.String)
|
182 |
*/
|
179 |
*/
|
183 |
@Override
|
180 |
|
184 |
@WebMethod(operationName = "unzip")
|
181 |
@WebMethod(operationName = "unzip")
|
185 |
public ReturnCode unzip(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
182 |
public ReturnCode unzip(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
186 |
@WebParam(name = WS_PARAM_DESTDIR) String dest,
|
183 |
@WebParam(name = WS_PARAM_DESTDIR) String dest,
|
187 |
@WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
|
184 |
@WebParam(name = WS_PARAM_OVERWRITE) boolean overwrite,
|
Line 190... |
Line 187... |
190 |
}
|
187 |
}
|
Line 191... |
Line 188... |
191 |
|
188 |
|
192 |
/* (non-Javadoc)
|
189 |
/* (non-Javadoc)
|
193 |
* @see net.brutex.xservices.ws.ArchiveService#unrar(java.lang.String, java.lang.String)
|
190 |
* @see net.brutex.xservices.ws.ArchiveService#unrar(java.lang.String, java.lang.String)
|
194 |
*/
|
191 |
*/
|
195 |
@Override
|
192 |
|
196 |
@WebMethod(operationName = "unrar")
|
193 |
@WebMethod(operationName = "unrar")
|
197 |
public ReturnCode unrar(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
194 |
public ReturnCode unrar(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
198 |
@WebParam(name = WS_PARAM_DESTDIR) String dest) {
|
195 |
@WebParam(name = WS_PARAM_DESTDIR) String dest) {
|
199 |
return unrar(new File(src), new File(dest));
|
196 |
return unrar(new File(src), new File(dest));
|
Line 200... |
Line 197... |
200 |
}
|
197 |
}
|
201 |
|
198 |
|
202 |
/* (non-Javadoc)
|
199 |
/* (non-Javadoc)
|
203 |
* @see net.brutex.xservices.ws.ArchiveService#untar(java.lang.String, java.lang.String, boolean, net.brutex.xservices.types.CompressionType)
|
200 |
* @see net.brutex.xservices.ws.ArchiveService#untar(java.lang.String, java.lang.String, boolean, net.brutex.xservices.types.CompressionType)
|
204 |
*/
|
201 |
*/
|
205 |
@Override
|
202 |
|
206 |
@WebMethod(operationName = "untar")
|
203 |
@WebMethod(operationName = "untar")
|
207 |
public ReturnCode untar(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
204 |
public ReturnCode untar(@WebParam(name = WS_PARAM_SOURCEFILE_STRING) String src,
|
208 |
@WebParam(name = WS_PARAM_DESTDIR) String dest,
|
205 |
@WebParam(name = WS_PARAM_DESTDIR) String dest,
|