Subversion Repositories XServices

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
46 brianR 1
package net.brutex.xservices.ws;
2
 
63 brianR 3
import java.util.List;
4
 
54 brianR 5
import javax.activation.DataHandler;
46 brianR 6
import javax.jws.WebMethod;
7
import javax.jws.WebParam;
8
import javax.jws.WebService;
9
 
10
import net.brutex.xservices.types.ArchiveResource;
54 brianR 11
import net.brutex.xservices.types.AttachmentType;
46 brianR 12
import net.brutex.xservices.types.FileResource;
13
import net.brutex.xservices.types.FileSetResource;
63 brianR 14
import net.brutex.xservices.types.ReplacePattern;
46 brianR 15
import net.brutex.xservices.types.ReturnCode;
16
import net.brutex.xservices.util.BrutexNamespaces;
17
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
18
public interface FileService {
19
 
20
	@WebMethod(operationName = "basename")
21
	public abstract ReturnCode basename(
22
			@WebParam(name = "file") String filename,
23
			@WebParam(name = "suffix") String suffix);
24
 
54 brianR 25
	@WebMethod(operationName = "downloadFile")
26
	public abstract AttachmentType downloadFile(
27
			@WebParam(name = "file") FileResource res);
28
 
29
	@WebMethod(operationName = "uploadFile")
30
	public abstract String uploadFile(
31
			@WebParam(name = "file") AttachmentType file);
32
 
46 brianR 33
	@WebMethod(operationName = "copy")
34
	public abstract ReturnCode copy(
35
			@WebParam(name = "fileset") FileSetResource src,
36
			@WebParam(name = "todir") String todir,
37
			@WebParam(name = "preservelastmodified") boolean plm,
38
			@WebParam(name = "overwrite") boolean overwrite,
39
			@WebParam(name = "encoding") String encoding) throws XServicesFault;
40
 
41
	@WebMethod(operationName = "loadResource")
42
	public abstract ReturnCode loadRes(
43
			@WebParam(name = "resource") FileResource res,
44
			@WebParam(name = "encoding") String encoding);
45
 
46
	@WebMethod(operationName = "loadResourceFromArchive")
47
	public abstract ReturnCode loadResFromArchive(
48
			@WebParam(name = "archiveresource") ArchiveResource res,
49
			@WebParam(name = "encoding") String encoding);
50
 
51
	@WebMethod(operationName = "echoToFile")
52
	public abstract ReturnCode echo2file(
53
			@WebParam(name = "message") String message,
54
			@WebParam(name = "file") String file,
55
			@WebParam(name = "encoding") String encoding,
56
			@WebParam(name = "append") boolean append);
57
 
58
	@WebMethod(operationName = "changeOwner")
59
	public abstract ReturnCode changeOwner(
60
			@WebParam(name = "fileset") FileSetResource res,
61
			@WebParam(name = "owner") String owner);
62
 
63
	@WebMethod(operationName = "changeGroup")
64
	public abstract ReturnCode changeGroup(
65
			@WebParam(name = "fileset") FileSetResource res,
66
			@WebParam(name = "group") String group);
67
 
68
	@WebMethod(operationName = "changeMode")
69
	public abstract ReturnCode changeMode(
70
			@WebParam(name = "fileset") FileSetResource res,
71
			@WebParam(name = "permissions") String perm);
63 brianR 72
 
73
	@WebMethod(operationName = "replaceInFile")
74
	public abstract ReturnCode replaceInFile(
75
			@WebParam(name = "file") FileResource res,
76
			@WebParam(name = "search") String search,
77
			@WebParam(name = "replace") String replace);
78
 
79
	@WebMethod(operationName = "replaceInFile2")
80
	public abstract ReturnCode replaceInFile2(
81
			@WebParam(name = "file") FileResource res,
82
			@WebParam(name = "patternList") List<ReplacePattern> patternList);
83
 
84
	@WebMethod(operationName = "replaceInFileRegEx")
85
	public abstract ReturnCode replaceInFileRegEx(
86
			@WebParam(name = "file") FileResource res,
87
			@WebParam(name = "search") String search,
88
			@WebParam(name = "replace") String replace,
89
			@WebParam(name = "flags") String flags);
46 brianR 90
}