Subversion Repositories XServices

Rev

Rev 49 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 49 Rev 54
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.impl;
16
package net.brutex.xservices.ws.impl;
17
 
17
 
18
import java.io.File;
18
import java.io.File;
-
 
19
import java.io.FileInputStream;
-
 
20
import java.io.FileNotFoundException;
-
 
21
import java.io.FileOutputStream;
-
 
22
import java.io.IOException;
-
 
23
import java.io.InputStream;
-
 
24
import java.io.UnsupportedEncodingException;
-
 
25
import java.util.List;
-
 
26
 
-
 
27
import javax.activation.DataHandler;
19
import javax.jws.WebMethod;
28
import javax.jws.WebMethod;
20
import javax.jws.WebParam;
29
import javax.jws.WebParam;
21
import javax.jws.WebService;
30
import javax.jws.WebService;
-
 
31
 
-
 
32
import net.brutex.xservices.types.AntProperty;
22
import net.brutex.xservices.types.ArchiveResource;
33
import net.brutex.xservices.types.ArchiveResource;
-
 
34
import net.brutex.xservices.types.AttachmentType;
23
import net.brutex.xservices.types.FileResource;
35
import net.brutex.xservices.types.FileResource;
24
import net.brutex.xservices.types.FileSetResource;
36
import net.brutex.xservices.types.FileSetResource;
25
import net.brutex.xservices.types.ResourceInterface;
37
import net.brutex.xservices.types.ResourceInterface;
26
import net.brutex.xservices.types.ReturnCode;
38
import net.brutex.xservices.types.ReturnCode;
27
import net.brutex.xservices.util.BrutexNamespaces;
39
import net.brutex.xservices.util.BrutexNamespaces;
28
import net.brutex.xservices.util.RunTask;
40
import net.brutex.xservices.util.RunTask;
29
import net.brutex.xservices.ws.FileService;
41
import net.brutex.xservices.ws.FileService;
30
import net.brutex.xservices.ws.XServicesFault;
42
import net.brutex.xservices.ws.XServicesFault;
-
 
43
 
-
 
44
import org.apache.commons.codec.binary.Base64;
-
 
45
import org.apache.commons.codec.binary.Base64InputStream;
-
 
46
import org.apache.cxf.aegis.type.mtom.StreamDataSource;
31
 
47
import org.apache.tools.ant.BuildException;
32
import org.apache.tools.ant.taskdefs.Basename;
48
import org.apache.tools.ant.taskdefs.Basename;
33
import org.apache.tools.ant.taskdefs.Chmod;
49
import org.apache.tools.ant.taskdefs.Chmod;
34
import org.apache.tools.ant.taskdefs.Copy;
50
import org.apache.tools.ant.taskdefs.Copy;
35
import org.apache.tools.ant.taskdefs.Echo;
51
import org.apache.tools.ant.taskdefs.Echo;
36
import org.apache.tools.ant.taskdefs.LoadResource;
52
import org.apache.tools.ant.taskdefs.LoadResource;
37
import org.apache.tools.ant.taskdefs.optional.unix.Chgrp;
53
import org.apache.tools.ant.taskdefs.optional.unix.Chgrp;
38
import org.apache.tools.ant.taskdefs.optional.unix.Chown;
54
import org.apache.tools.ant.taskdefs.optional.unix.Chown;
39
import org.apache.tools.ant.types.FileSet;
55
import org.apache.tools.ant.types.FileSet;
40
 
56
 
41
/**
57
/**
42
 *
58
 * 
43
 * @author Brian Rosenberger, bru@brutex.de
59
 * @author Brian Rosenberger, bru@brutex.de
44
 */
60
 */
45
@WebService(
-
 
46
		targetNamespace = BrutexNamespaces.WS_XSERVICES, 
-
 
47
		endpointInterface ="net.brutex.xservices.ws.FileService", 
61
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES, endpointInterface = "net.brutex.xservices.ws.FileService", serviceName = "FileService")
48
		serviceName = "FileService"
-
 
49
			)
-
 
50
public class FileServiceImpl implements FileService {
62
public class FileServiceImpl implements FileService {
-
 
63
 
51
 
64
	/*
-
 
65
	 * (non-Javadoc)
52
    /* (non-Javadoc)
66
	 * 
-
 
67
	 * @see net.brutex.xservices.ws.impl.FileService#basename(java.lang.String,
53
	 * @see net.brutex.xservices.ws.impl.FileService#basename(java.lang.String, java.lang.String)
68
	 * java.lang.String)
54
	 */
69
	 */
55
    @Override
70
	@Override
56
	@WebMethod(operationName = "basename")
71
	@WebMethod(operationName = "basename")
57
    public ReturnCode basename(@WebParam(name = "file") String filename,
72
	public ReturnCode basename(@WebParam(name = "file") String filename,
58
            @WebParam(name = "suffix") String suffix) {
73
			@WebParam(name = "suffix") String suffix) {
59
        return basename(new File(filename), suffix);
74
		return basename(new File(filename), suffix);
60
    }
75
	}
-
 
76
 
-
 
77
	/*
-
 
78
	 * (non-Javadoc)
-
 
79
	 * 
-
 
80
	 * @see
-
 
81
	 * net.brutex.xservices.ws.impl.FileService#base64Encode(net.brutex.xservices
-
 
82
	 * .types.FileSetResource)
-
 
83
	 */
-
 
84
	@Override
-
 
85
	@WebMethod(operationName = "downloadFile")
-
 
86
	public AttachmentType downloadFile(@WebParam(name = "file") FileResource res) {
-
 
87
		InputStream is = null;
-
 
88
		try {
-
 
89
			is = res.getAntResource(null).getInputStream();
-
 
90
		} catch (IOException e) {
-
 
91
			// TODO Auto-generated catch block
-
 
92
			e.printStackTrace();
-
 
93
		}
-
 
94
		DataHandler h = new DataHandler(new StreamDataSource(
-
 
95
				"application/binary", is));
-
 
96
		AttachmentType t = new AttachmentType();
-
 
97
		t.setContent(h);
-
 
98
		return t;
-
 
99
	}
-
 
100
 
-
 
101
	/*
-
 
102
	 * (non-Javadoc)
-
 
103
	 * 
-
 
104
	 * @see
-
 
105
	 * net.brutex.xservices.ws.impl.FileService#base64Decode(net.brutex.xservices
-
 
106
	 * .types.AttachmentType)
-
 
107
	 */
-
 
108
	@Override
-
 
109
	@WebMethod(operationName = "uploadFile")
-
 
110
	public String uploadFile(@WebParam(name = "file") AttachmentType file) {
-
 
111
		DataHandler h =  file.getContent();
-
 
112
		File f = new File(file.getFilename());
-
 
113
		FileOutputStream fout;
-
 
114
		try {
-
 
115
			fout = new FileOutputStream(f);
-
 
116
			/*
-
 
117
			 * InputStream in = h.getInputStream();
-
 
118
			int b;
-
 
119
			while( (b=in.read())!= -1 ) {
-
 
120
				fout.write(b);
-
 
121
			}
-
 
122
			*/
-
 
123
			h.writeTo(fout);
-
 
124
			fout.flush();
-
 
125
			fout.close();
-
 
126
			//in.close();
-
 
127
		} catch (FileNotFoundException e) {
-
 
128
			throw new BuildException(e);
-
 
129
		} catch (IOException e) {
-
 
130
			throw new BuildException(e);
-
 
131
		}
-
 
132
		return file.getFilename();
-
 
133
	}
-
 
134
 
61
 
135
	/*
-
 
136
	 * (non-Javadoc)
-
 
137
	 * 
62
    /* (non-Javadoc)
138
	 * @see
-
 
139
	 * net.brutex.xservices.ws.impl.FileService#copy(net.brutex.xservices.types
63
	 * @see net.brutex.xservices.ws.impl.FileService#copy(net.brutex.xservices.types.FileSetResource, java.lang.String, boolean, boolean, java.lang.String)
140
	 * .FileSetResource, java.lang.String, boolean, boolean, java.lang.String)
64
	 */
141
	 */
65
    @Override
142
	@Override
66
	@WebMethod(operationName = "copy")
143
	@WebMethod(operationName = "copy")
67
    public ReturnCode copy(@WebParam(name = "fileset") FileSetResource src,
144
	public ReturnCode copy(@WebParam(name = "fileset") FileSetResource src,
68
            @WebParam(name = "todir") String todir,
145
			@WebParam(name = "todir") String todir,
69
            @WebParam(name = "preservelastmodified") boolean plm,
146
			@WebParam(name = "preservelastmodified") boolean plm,
70
            @WebParam(name = "overwrite") boolean overwrite,
147
			@WebParam(name = "overwrite") boolean overwrite,
71
            @WebParam(name = "encoding") String encoding)
148
			@WebParam(name = "encoding") String encoding) throws XServicesFault {
72
            throws XServicesFault {
-
 
73
        return copy(src, new File(todir), plm, overwrite, encoding);
149
		return copy(src, new File(todir), plm, overwrite, encoding);
74
    }
150
	}
-
 
151
 
75
 
152
	/*
-
 
153
	 * (non-Javadoc)
-
 
154
	 * 
76
    /* (non-Javadoc)
155
	 * @see
-
 
156
	 * net.brutex.xservices.ws.impl.FileService#loadRes(net.brutex.xservices
77
	 * @see net.brutex.xservices.ws.impl.FileService#loadRes(net.brutex.xservices.types.FileResource, java.lang.String)
157
	 * .types.FileResource, java.lang.String)
78
	 */
158
	 */
79
    @Override
159
	@Override
80
	@WebMethod(operationName = "loadResource")
160
	@WebMethod(operationName = "loadResource")
81
    public ReturnCode loadRes(@WebParam(name = "resource") FileResource res,
161
	public ReturnCode loadRes(@WebParam(name = "resource") FileResource res,
82
            @WebParam(name = "encoding") String encoding) {
162
			@WebParam(name = "encoding") String encoding) {
83
        if (encoding == null || encoding.equals("")) {
163
		if (encoding == null || encoding.equals("")) {
84
            encoding = System.getProperty("file.encoding");
164
			encoding = System.getProperty("file.encoding");
85
        }
165
		}
86
        return loadResource(res, encoding);
166
		return loadResource(res, encoding);
87
    }
167
	}
-
 
168
 
88
 
169
	/*
-
 
170
	 * (non-Javadoc)
-
 
171
	 * 
89
    /* (non-Javadoc)
172
	 * @see
-
 
173
	 * net.brutex.xservices.ws.impl.FileService#loadResFromArchive(net.brutex
90
	 * @see net.brutex.xservices.ws.impl.FileService#loadResFromArchive(net.brutex.xservices.types.ArchiveResource, java.lang.String)
174
	 * .xservices.types.ArchiveResource, java.lang.String)
91
	 */
175
	 */
92
    @Override
176
	@Override
93
	@WebMethod(operationName = "loadResourceFromArchive")
177
	@WebMethod(operationName = "loadResourceFromArchive")
-
 
178
	public ReturnCode loadResFromArchive(
94
    public ReturnCode loadResFromArchive(@WebParam(name = "archiveresource") ArchiveResource res,
179
			@WebParam(name = "archiveresource") ArchiveResource res,
95
            @WebParam(name = "encoding") String encoding) {
180
			@WebParam(name = "encoding") String encoding) {
96
        if (encoding == null || encoding.equals("")) {
181
		if (encoding == null || encoding.equals("")) {
97
            encoding = System.getProperty("file.encoding");
182
			encoding = System.getProperty("file.encoding");
98
        }
183
		}
99
        return loadResource(res, encoding);
184
		return loadResource(res, encoding);
100
    }
185
	}
-
 
186
 
101
 
187
	/*
-
 
188
	 * (non-Javadoc)
102
    /* (non-Javadoc)
189
	 * 
-
 
190
	 * @see net.brutex.xservices.ws.impl.FileService#echo2file(java.lang.String,
103
	 * @see net.brutex.xservices.ws.impl.FileService#echo2file(java.lang.String, java.lang.String, java.lang.String, boolean)
191
	 * java.lang.String, java.lang.String, boolean)
104
	 */
192
	 */
105
    @Override
193
	@Override
106
	@WebMethod(operationName = "echoToFile")
194
	@WebMethod(operationName = "echoToFile")
107
    public ReturnCode echo2file(@WebParam(name = "message") String message,
195
	public ReturnCode echo2file(@WebParam(name = "message") String message,
-
 
196
			@WebParam(name = "file") String file,
108
            @WebParam(name = "file") String file, @WebParam(name = "encoding") String encoding,
197
			@WebParam(name = "encoding") String encoding,
109
            @WebParam(name = "append") boolean append) {
198
			@WebParam(name = "append") boolean append) {
110
        return echo(message, new File(file), encoding, append);
199
		return echo(message, new File(file), encoding, append);
111
    }
200
	}
-
 
201
 
112
 
202
	/*
-
 
203
	 * (non-Javadoc)
-
 
204
	 * 
113
    /* (non-Javadoc)
205
	 * @see
-
 
206
	 * net.brutex.xservices.ws.impl.FileService#changeOwner(net.brutex.xservices
114
	 * @see net.brutex.xservices.ws.impl.FileService#changeOwner(net.brutex.xservices.types.FileSetResource, java.lang.String)
207
	 * .types.FileSetResource, java.lang.String)
115
	 */
208
	 */
116
    @Override
209
	@Override
117
	@WebMethod(operationName = "changeOwner")
210
	@WebMethod(operationName = "changeOwner")
-
 
211
	public ReturnCode changeOwner(
118
    public ReturnCode changeOwner(@WebParam(name = "fileset") FileSetResource res,
212
			@WebParam(name = "fileset") FileSetResource res,
119
            @WebParam(name = "owner") String owner) {
213
			@WebParam(name = "owner") String owner) {
120
        return chown(res, owner);
214
		return chown(res, owner);
121
    }
215
	}
-
 
216
 
122
 
217
	/*
-
 
218
	 * (non-Javadoc)
-
 
219
	 * 
123
    /* (non-Javadoc)
220
	 * @see
-
 
221
	 * net.brutex.xservices.ws.impl.FileService#changeGroup(net.brutex.xservices
124
	 * @see net.brutex.xservices.ws.impl.FileService#changeGroup(net.brutex.xservices.types.FileSetResource, java.lang.String)
222
	 * .types.FileSetResource, java.lang.String)
125
	 */
223
	 */
126
    @Override
224
	@Override
127
	@WebMethod(operationName = "changeGroup")
225
	@WebMethod(operationName = "changeGroup")
-
 
226
	public ReturnCode changeGroup(
128
    public ReturnCode changeGroup(@WebParam(name = "fileset") FileSetResource res,
227
			@WebParam(name = "fileset") FileSetResource res,
129
            @WebParam(name = "group") String group) {
228
			@WebParam(name = "group") String group) {
130
        return chgrp(res, group);
229
		return chgrp(res, group);
131
    }
230
	}
-
 
231
 
132
 
232
	/*
-
 
233
	 * (non-Javadoc)
-
 
234
	 * 
133
    /* (non-Javadoc)
235
	 * @see
-
 
236
	 * net.brutex.xservices.ws.impl.FileService#changeMode(net.brutex.xservices
134
	 * @see net.brutex.xservices.ws.impl.FileService#changeMode(net.brutex.xservices.types.FileSetResource, java.lang.String)
237
	 * .types.FileSetResource, java.lang.String)
135
	 */
238
	 */
136
    @Override
239
	@Override
137
	@WebMethod(operationName = "changeMode")
240
	@WebMethod(operationName = "changeMode")
-
 
241
	public ReturnCode changeMode(
138
    public ReturnCode changeMode(@WebParam(name="fileset") FileSetResource res,
242
			@WebParam(name = "fileset") FileSetResource res,
139
            @WebParam(name="permissions") String perm) {
243
			@WebParam(name = "permissions") String perm) {
140
        return chmod(res, perm);
244
		return chmod(res, perm);
141
    }
245
	}
142
 
246
 
143
    @WebMethod(exclude = true)
247
	@WebMethod(exclude = true)
144
    private ReturnCode basename(File file,
248
	private ReturnCode basename(File file, String suffix) {
145
            String suffix) {
-
 
146
        Basename basename = new Basename();
249
		Basename basename = new Basename();
147
        RunTask runner = new RunTask(basename);
250
		RunTask runner = new RunTask(basename);
148
        basename.setFile(file);
251
		basename.setFile(file);
149
        if (suffix != null && !suffix.equals("")) {
252
		if (suffix != null && !suffix.equals("")) {
150
            basename.setSuffix(suffix);
253
			basename.setSuffix(suffix);
151
        }
254
		}
152
        basename.setProperty("basename.value");
255
		basename.setProperty("basename.value");
153
        return runner.postTask();
256
		return runner.postTask();
154
    }
257
	}
155
 
258
 
156
    @WebMethod(exclude = true)
259
	@WebMethod(exclude = true)
157
    private ReturnCode loadResource(ResourceInterface src, String encoding) {
260
	private ReturnCode loadResource(ResourceInterface src, String encoding) {
158
        LoadResource lr = new LoadResource();
261
		LoadResource lr = new LoadResource();
159
        lr.setTaskName("LoadResource");
262
		lr.setTaskName("LoadResource");
160
        RunTask runner = new RunTask(lr);
263
		RunTask runner = new RunTask(lr);
161
        lr.addConfigured(src.getAntResource(lr.getProject()));
264
		lr.addConfigured(src.getAntResource(lr.getProject()));
162
        lr.setEncoding(encoding);
265
		lr.setEncoding(encoding);
163
        System.out.println("Using encoding: " + encoding);
266
		System.out.println("Using encoding: " + encoding);
164
        lr.setProperty("LoadResource.out");
267
		lr.setProperty("LoadResource.out");
165
        return runner.postTask();
268
		return runner.postTask();
166
    }
269
	}
167
 
270
 
168
    @WebMethod(exclude = true)
271
	@WebMethod(exclude = true)
169
    private ReturnCode echo(String msg, File file, String encoding, boolean append) {
272
	private ReturnCode echo(String msg, File file, String encoding,
-
 
273
			boolean append) {
170
        Echo echo = new Echo();
274
		Echo echo = new Echo();
171
        echo.setTaskName("toFile");
275
		echo.setTaskName("toFile");
172
        RunTask runTask = new RunTask(echo);
276
		RunTask runTask = new RunTask(echo);
173
        echo.addText(msg);
277
		echo.addText(msg);
174
        echo.setEncoding(encoding);
278
		echo.setEncoding(encoding);
175
        echo.setFile(file);
279
		echo.setFile(file);
176
        echo.setAppend(append);
280
		echo.setAppend(append);
177
        return runTask.postTask();
281
		return runTask.postTask();
178
    }
282
	}
179
 
283
 
180
    @WebMethod(exclude = true)
284
	@WebMethod(exclude = true)
181
    private ReturnCode copy(FileSetResource src, File dst, boolean preservelastmodified,
285
	private ReturnCode copy(FileSetResource src, File dst,
182
            boolean overwrite, String encoding) {
286
			boolean preservelastmodified, boolean overwrite, String encoding) {
183
        Copy copy = new Copy();
287
		Copy copy = new Copy();
184
        copy.setTaskName("Copy");
288
		copy.setTaskName("Copy");
185
        RunTask runner = new RunTask(copy);
289
		RunTask runner = new RunTask(copy);
186
        FileSet set = src.getAntFileSet(copy.getProject());
290
		FileSet set = src.getAntResource(copy.getProject());
187
        copy.add(set);
291
		copy.add(set);
188
 
292
 
189
        if (dst.isDirectory()) {
293
		if (dst.isDirectory()) {
190
            copy.setTodir(dst);
294
			copy.setTodir(dst);
191
        }
295
		}
192
        if (dst.isFile()) {
296
		if (dst.isFile()) {
193
            copy.setTofile(dst);
297
			copy.setTofile(dst);
194
        }
298
		}
195
        copy.setOverwrite(overwrite);
299
		copy.setOverwrite(overwrite);
196
        copy.setPreserveLastModified(preservelastmodified);
300
		copy.setPreserveLastModified(preservelastmodified);
197
        if (encoding != null && !encoding.equals("")) {
301
		if (encoding != null && !encoding.equals("")) {
198
            copy.setOutputEncoding(encoding);
302
			copy.setOutputEncoding(encoding);
199
        } else {
303
		} else {
200
            copy.setOutputEncoding(System.getProperty("file.encoding"));
304
			copy.setOutputEncoding(System.getProperty("file.encoding"));
201
        }
305
		}
202
 
306
 
203
        return runner.postTask();
307
		return runner.postTask();
204
    }
308
	}
205
 
309
 
206
    @WebMethod(exclude = true)
310
	@WebMethod(exclude = true)
207
    private ReturnCode chown(FileSetResource src, String owner) {
311
	private ReturnCode chown(FileSetResource src, String owner) {
208
        Chown chown = new Chown();
312
		Chown chown = new Chown();
209
        chown.setTaskName("Chown");
313
		chown.setTaskName("Chown");
210
        RunTask runner = new RunTask(chown);
314
		RunTask runner = new RunTask(chown);
211
        chown.setOwner(owner);
315
		chown.setOwner(owner);
212
        FileSet set = src.getAntFileSet(chown.getProject());
316
		FileSet set = src.getAntResource(chown.getProject());
213
        chown.add(set);
317
		chown.add(set);
214
        chown.setMaxParallel(300);
318
		chown.setMaxParallel(300);
215
        return runner.postTask();
319
		return runner.postTask();
216
    }
320
	}
217
 
321
 
218
    @WebMethod(exclude = true)
322
	@WebMethod(exclude = true)
219
    private ReturnCode chgrp(FileSetResource src, String group) {
323
	private ReturnCode chgrp(FileSetResource src, String group) {
220
        Chgrp chgrp = new Chgrp();
324
		Chgrp chgrp = new Chgrp();
221
        chgrp.setTaskName("Chgrp");
325
		chgrp.setTaskName("Chgrp");
222
        RunTask runner = new RunTask(chgrp);
326
		RunTask runner = new RunTask(chgrp);
223
        chgrp.setGroup(group);
327
		chgrp.setGroup(group);
224
        FileSet set = src.getAntFileSet(chgrp.getProject());
328
		FileSet set = src.getAntResource(chgrp.getProject());
225
        chgrp.add(set);
329
		chgrp.add(set);
226
        chgrp.setMaxParallel(300);
330
		chgrp.setMaxParallel(300);
227
        return runner.postTask();
331
		return runner.postTask();
228
    }
332
	}
229
 
333
 
230
    @WebMethod(exclude = true)
334
	@WebMethod(exclude = true)
231
    private ReturnCode chmod(FileSetResource src, String perm) {
335
	private ReturnCode chmod(FileSetResource src, String perm) {
232
        Chmod chmod = new Chmod();
336
		Chmod chmod = new Chmod();
233
        chmod.setTaskName("Chmod");
337
		chmod.setTaskName("Chmod");
234
        RunTask runner = new RunTask(chmod);
338
		RunTask runner = new RunTask(chmod);
235
        FileSet set = src.getAntFileSet(chmod.getProject());
339
		FileSet set = src.getAntResource(chmod.getProject());
236
        chmod.add(set);
340
		chmod.add(set);
237
        chmod.setMaxParallel(300);
341
		chmod.setMaxParallel(300);
238
        chmod.setPerm(perm);
342
		chmod.setPerm(perm);
239
        chmod.setVerbose(true);
343
		chmod.setVerbose(true);
240
        return runner.postTask();
344
		return runner.postTask();
241
    }
345
	}
242
 
346
 
243
}
347
}