Subversion Repositories XServices

Rev

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

Rev 64 Rev 65
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
 
16
 
17
package net.brutex.xservices.ws;
17
package net.brutex.xservices.ws;
18
 
18
 
19
import java.util.List;
19
import java.util.List;
20
 
20
 
21
import javax.jws.WebMethod;
21
import javax.jws.WebMethod;
22
import javax.jws.WebParam;
22
import javax.jws.WebParam;
23
import javax.jws.WebService;
23
import javax.jws.WebService;
24
import javax.xml.bind.annotation.XmlElement;
24
import javax.xml.bind.annotation.XmlElement;
25
 
25
 
26
import org.apache.cxf.annotations.WSDLDocumentation;
26
import org.apache.cxf.annotations.WSDLDocumentation;
27
import org.apache.cxf.annotations.WSDLDocumentationCollection;
27
import org.apache.cxf.annotations.WSDLDocumentationCollection;
28
 
28
 
29
import com.sun.xml.internal.ws.api.model.wsdl.WSDLDescriptorKind;
29
import com.sun.xml.internal.ws.api.model.wsdl.WSDLDescriptorKind;
30
 
30
 
31
import net.brutex.xservices.types.ArchiveResource;
31
import net.brutex.xservices.types.ArchiveResource;
32
import net.brutex.xservices.types.AttachmentType;
32
import net.brutex.xservices.types.AttachmentType;
33
import net.brutex.xservices.types.FileResource;
33
import net.brutex.xservices.types.FileResource;
34
import net.brutex.xservices.types.FileSetResource;
34
import net.brutex.xservices.types.FileSetResource;
35
import net.brutex.xservices.types.ReplacePattern;
35
import net.brutex.xservices.types.ReplacePattern;
36
import net.brutex.xservices.types.ReturnCode;
36
import net.brutex.xservices.types.ReturnCode;
37
import net.brutex.xservices.util.BrutexNamespaces;
37
import net.brutex.xservices.util.BrutexNamespaces;
38
import net.brutex.xservices.util.XServicesDocumentation;
38
import net.brutex.xservices.util.XServicesDocumentation;
39
/**
39
/**
40
 * @author Brian Rosenberger
40
 * @author Brian Rosenberger
41
 *
41
 *
42
 */
42
 */
43
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
43
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
44
@WSDLDocumentationCollection(
44
@WSDLDocumentationCollection(
45
    {
45
    {
46
    	@WSDLDocumentation(value = BrutexNamespaces.BRUTEX_COPYRIGHT, placement = WSDLDocumentation.Placement.TOP)
46
    	@WSDLDocumentation(value = BrutexNamespaces.BRUTEX_COPYRIGHT, placement = WSDLDocumentation.Placement.TOP)
47
    }
47
    }
48
)
48
)
49
public interface FileService {
49
public interface FileService {
-
 
50
 
-
 
51
	public static final String OPERATION_BASENAME ="basename";
-
 
52
	public static final String OPERATION_DOWNLOADFILE ="downloadFile";
-
 
53
	public static final String OPERATION_UPLOADFILE ="uploadFile";
-
 
54
	public static final String OPERATION_COPY ="copy";
-
 
55
	public static final String OPERATION_COPYFILE ="copyFile";
-
 
56
	public static final String OPERATION_LOADRESOURCE = "loadResource";
-
 
57
	public static final String OPERATION_LOADRESOURCEFROMARCHIVE = "loadResourceFromArchive";
-
 
58
	public static final String OPERATION_ECHOTOFILE = "echoToFile";
-
 
59
	public static final String OPERATION_CHANGEOWNER = "changeOwner";
-
 
60
	public static final String OPERATION_CHANGEMODE = "changeMode";
-
 
61
	public static final String OPERATION_CHANGEGROUP = "changeGroup";
-
 
62
	public static final String OPERATION_REPLACEINFILE = "replaceInFile";
-
 
63
	public static final String OPERATION_REPLACEINFILE2 = "replaceInFile2";
-
 
64
	public static final String OPERATION_REPLACEINFILEREGEX = "replaceInFileRegEx";
50
 
65
	
51
	/**
66
	/**
52
	 * @param filename
67
	 * @param filename
53
	 * @param suffix
68
	 * @param suffix
54
	 * @return The base name of the given file excluding the suffix. 
69
	 * @return The base name of the given file excluding the suffix. 
55
	 */
70
	 */
56
	@WSDLDocumentation(value = "The base name of the given file excluding the suffix.")
71
	@WSDLDocumentation(value = "The base name of the given file excluding the suffix.")
57
	@WebMethod(operationName = "basename")
72
	@WebMethod(operationName = OPERATION_BASENAME)
58
	public abstract String basename(
73
	public abstract String basename(
59
			@WebParam(name = "file") @XmlElement(required=true) String filename,
74
			@WebParam(name = "file") @XmlElement(required=true) String filename,
60
			@WebParam(name = "suffix") String suffix);
75
			@WebParam(name = "suffix") String suffix);
61
 
76
 
62
	/**
77
	/**
63
	 * @param res
78
	 * @param res
64
	 * @return The file itself (MTOM attachment or inline base64) including some file metadata.
79
	 * @return The file itself (MTOM attachment or inline base64) including some file metadata.
-
 
80
	 * @throws XServicesFault 
65
	 */
81
	 */
66
	@WSDLDocumentation(XServicesDocumentation.SERVICE_OPERATION_DOWNLOADFILE)
82
	@WSDLDocumentation(XServicesDocumentation.SERVICE_OPERATION_DOWNLOADFILE)
67
	@WebMethod(operationName = "downloadFile")
83
	@WebMethod(operationName = OPERATION_DOWNLOADFILE)
68
	public abstract AttachmentType downloadFile(
84
	public abstract AttachmentType downloadFile(
69
			@WebParam(name = "file") FileResource res);
85
			@WebParam(name = FileResource.XML_NAME) FileResource res) throws XServicesFault;
70
	
86
	
71
	/**
87
	/**
72
	 * @param file
88
	 * @param file
73
	 * @return The file name of the file that has been uploaded.
89
	 * @return The file name of the file that has been uploaded.
-
 
90
	 * @throws XServicesFault 
74
	 */
91
	 */
75
	@WSDLDocumentation(XServicesDocumentation.SERVICE_OPERATION_UPLOADFILE)
92
	@WSDLDocumentation(XServicesDocumentation.SERVICE_OPERATION_UPLOADFILE)
76
	@WebMethod(operationName = "uploadFile")
93
	@WebMethod(operationName = OPERATION_UPLOADFILE)
77
	public abstract String uploadFile(
94
	public abstract String uploadFile(
78
			@WebParam(name = "file") AttachmentType file);
95
			@WebParam(name = "file") AttachmentType file) throws XServicesFault;
79
			
96
			
80
	/**
97
	/**
81
	 * @param src
98
	 * @param src
82
	 * @param todir
99
	 * @param todir
83
	 * @param plm
100
	 * @param plm
84
	 * @param overwrite
101
	 * @param overwrite
85
	 * @param encoding
102
	 * @param encoding
86
	 * @return 
103
	 * @return 
87
	 * @throws XServicesFault
104
	 * @throws XServicesFault
88
	 */
105
	 */
89
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_COPY)
106
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_COPY)
90
	@WebMethod(operationName = "copy")
107
	@WebMethod(operationName = OPERATION_COPY)
91
	public abstract ReturnCode copy(
108
	public abstract ReturnCode copy(
92
			@WebParam(name = "fileset") @XmlElement(required=true) FileSetResource src,
109
			@WebParam(name =  FileSetResource.XML_NAME) @XmlElement(required=true) FileSetResource src,
93
			@WebParam(name = "todir") @XmlElement(required=true) String todir,
110
			@WebParam(name = "todir") @XmlElement(required=true) String todir,
94
			@WebParam(name = "preservelastmodified") boolean plm,
111
			@WebParam(name = "preservelastmodified") boolean plm,
95
			@WebParam(name = "overwrite") boolean overwrite,
112
			@WebParam(name = "overwrite") boolean overwrite,
96
			@WebParam(name = "encoding") String encoding) throws XServicesFault;
113
			@WebParam(name = "encoding") String encoding) throws XServicesFault;
97
	
114
	
98
	/**
115
	/**
99
	 * @param fromFile
116
	 * @param fromFile
100
	 * @param tofile
117
	 * @param tofile
101
	 * @param overwrite
118
	 * @param overwrite
102
	 * @return
119
	 * @return
103
	 * @throws XServicesFault
120
	 * @throws XServicesFault
104
	 */
121
	 */
105
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_COPYFILE)
122
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_COPYFILE)
106
	@WebMethod(operationName = "copyFile")
123
	@WebMethod(operationName = OPERATION_COPYFILE)
107
	public abstract ReturnCode copyFile(
124
	public abstract ReturnCode copyFile(
108
			@WebParam(name = "fromFile") @XmlElement(required=true) String fromFile,
125
			@WebParam(name = "fromFile") @XmlElement(required=true) String fromFile,
109
			@WebParam(name = "toFile") @XmlElement(required=true) String tofile,
126
			@WebParam(name = "toFile") @XmlElement(required=true) String tofile,
110
			@WebParam(name = "overwrite") boolean overwrite) throws XServicesFault;
127
			@WebParam(name = "overwrite") boolean overwrite) throws XServicesFault;
111
 
128
 
112
	/**
129
	/**
113
	 * @param res
130
	 * @param res
114
	 * @param encoding
131
	 * @param encoding
115
	 * @return content of the resource
132
	 * @return content of the resource
-
 
133
	 * @throws XServicesFault 
116
	 */
134
	 */
117
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_LOADRESOURCE)
135
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_LOADRESOURCE)
118
	@WebMethod(operationName = "loadResource")
136
	@WebMethod(operationName = OPERATION_LOADRESOURCE)
119
	public abstract String loadRes(
137
	public abstract String loadRes(
120
			@WebParam(name = "resource") FileResource res,
138
			@WebParam(name = FileResource.XML_NAME) FileResource res,
121
			@WebParam(name = "encoding") String encoding);
139
			@WebParam(name = "encoding") String encoding) throws XServicesFault;
122
 
140
 
123
	/**
141
	/**
124
	 * @param res
142
	 * @param res
125
	 * @param encoding
143
	 * @param encoding
126
	 * @return content of the resource
144
	 * @return content of the resource
-
 
145
	 * @throws XServicesFault 
127
	 */
146
	 */
128
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_LOADRESOURCEFROMARCHIVE)
147
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_LOADRESOURCEFROMARCHIVE)
129
	@WebMethod(operationName = "loadResourceFromArchive")
148
	@WebMethod(operationName = OPERATION_LOADRESOURCEFROMARCHIVE)
130
	public abstract String loadResFromArchive(
149
	public abstract String loadResFromArchive(
131
			@WebParam(name = "archiveresource") ArchiveResource res,
150
			@WebParam(name = "archiveresource") ArchiveResource res,
132
			@WebParam(name = "encoding") String encoding);
151
			@WebParam(name = "encoding") String encoding) throws XServicesFault;
133
 
152
 
134
	/**
153
	/**
135
	 * @param message
154
	 * @param message
136
	 * @param file
155
	 * @param file
137
	 * @param encoding
156
	 * @param encoding
138
	 * @param append
157
	 * @param append
139
	 * @return
158
	 * @return
-
 
159
	 * @throws XServicesFault 
140
	 */
160
	 */
141
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_ECHOTOFILE)
161
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_ECHOTOFILE)
142
	@WebMethod(operationName = "echoToFile")
162
	@WebMethod(operationName = OPERATION_ECHOTOFILE)
143
	public abstract ReturnCode echo2file(
163
	public abstract ReturnCode echo2file(
144
			@WebParam(name = "message") @XmlElement(required=true) String message,
164
			@WebParam(name = "message") @XmlElement(required=true) String message,
145
			@WebParam(name = "file") @XmlElement(required=true) String file,
165
			@WebParam(name = "file") @XmlElement(required=true) String file,
146
			@WebParam(name = "encoding") String encoding,
166
			@WebParam(name = "encoding") String encoding,
147
			@WebParam(name = "append") boolean append);
167
			@WebParam(name = "append") boolean append) throws XServicesFault;
-
 
168
 
-
 
169
	/**
-
 
170
	 * @param res
-
 
171
	 * @param owner
-
 
172
	 * @return
148
 
173
	 */
149
	@WebMethod(operationName = "changeOwner")
174
	@WebMethod(operationName = OPERATION_CHANGEOWNER)
150
	public abstract ReturnCode changeOwner(
175
	public abstract ReturnCode changeOwner(
151
			@WebParam(name = "fileset") FileSetResource res,
176
			@WebParam(name =  FileSetResource.XML_NAME) FileSetResource res,
-
 
177
			@WebParam(name = "owner") @XmlElement(required=true) String owner);
-
 
178
 
-
 
179
	/**
-
 
180
	 * @param res
-
 
181
	 * @param group
152
			@WebParam(name = "owner") @XmlElement(required=true) String owner);
182
	 * @return
153
 
183
	 */
154
	@WebMethod(operationName = "changeGroup")
184
	@WebMethod(operationName = OPERATION_CHANGEGROUP)
155
	public abstract ReturnCode changeGroup(
185
	public abstract ReturnCode changeGroup(
-
 
186
			@WebParam(name =  FileSetResource.XML_NAME) FileSetResource res,
-
 
187
			@WebParam(name = "group") @XmlElement(required=true) String group);
-
 
188
 
-
 
189
	/**
-
 
190
	 * @param res
156
			@WebParam(name = "fileset") FileSetResource res,
191
	 * @param perm
157
			@WebParam(name = "group") @XmlElement(required=true) String group);
192
	 * @return
158
 
193
	 */
159
	@WebMethod(operationName = "changeMode")
194
	@WebMethod(operationName = OPERATION_CHANGEMODE)
-
 
195
	public abstract ReturnCode changeMode(
-
 
196
			@WebParam(name = FileSetResource.XML_NAME) FileSetResource res,
-
 
197
			@WebParam(name = "permissions") @XmlElement(required=true) String perm);
-
 
198
	
-
 
199
	/**
-
 
200
	 * @param res
-
 
201
	 * @param search
-
 
202
	 * @param replace
160
	public abstract ReturnCode changeMode(
203
	 * @return
161
			@WebParam(name = "fileset") FileSetResource res,
204
	 * @throws XServicesFault
162
			@WebParam(name = "permissions") @XmlElement(required=true) String perm);
205
	 */
163
	
206
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_REPLACEINFILE)
164
	@WebMethod(operationName = "replaceInFile")
207
	@WebMethod(operationName = OPERATION_REPLACEINFILE)
-
 
208
	public abstract ReturnCode replaceInFile(
-
 
209
			@WebParam(name = FileResource.XML_NAME) @XmlElement(required=true) FileResource res,
-
 
210
			@WebParam(name = "search") @XmlElement(required=true) String search,
-
 
211
			@WebParam(name = "replace") @XmlElement(required=true) String replace) throws XServicesFault;
-
 
212
	
-
 
213
	/**
-
 
214
	 * @param res
165
	public abstract ReturnCode replaceInFile(
215
	 * @param patternList
166
			@WebParam(name = "file") @XmlElement(required=true) FileResource res,
216
	 * @return
167
			@WebParam(name = "search") @XmlElement(required=true) String search,
217
	 * @throws XServicesFault
168
			@WebParam(name = "replace") @XmlElement(required=true) String replace);
218
	 */
-
 
219
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_REPLACEINFILE2)
-
 
220
	@WebMethod(operationName = OPERATION_REPLACEINFILE2)
-
 
221
	public abstract ReturnCode replaceInFile2(
-
 
222
			@WebParam(name = FileResource.XML_NAME) FileResource res,
-
 
223
			@WebParam(name = "patternList") List<ReplacePattern> patternList) throws XServicesFault;
-
 
224
	
-
 
225
	/**
-
 
226
	 * @param res
-
 
227
	 * @param search
169
	
228
	 * @param replace
170
	@WebMethod(operationName = "replaceInFile2")
229
	 * @param flags
171
	public abstract ReturnCode replaceInFile2(
230
	 * @return
172
			@WebParam(name = "file") FileResource res,
231
	 * @throws XServicesFault
173
			@WebParam(name = "patternList") List<ReplacePattern> patternList);
232
	 */
174
	
233
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_REPLACEINFILEREGEX)
175
	@WebMethod(operationName = "replaceInFileRegEx")
234
	@WebMethod(operationName = OPERATION_REPLACEINFILEREGEX)
176
	public abstract ReturnCode replaceInFileRegEx(
235
	public abstract ReturnCode replaceInFileRegEx(
177
			@WebParam(name = "file") FileResource res,
236
			@WebParam(name = FileResource.XML_NAME) FileResource res,
178
			@WebParam(name = "search") String search,
237
			@WebParam(name = "search") String search,
179
			@WebParam(name = "replace") String replace,
238
			@WebParam(name = "replace") String replace,
180
			@WebParam(name = "flags") String flags);
239
			@WebParam(name = "flags") String flags) throws XServicesFault;
181
}
240
}
182
 
241
 
183
Generated by GNU Enscript 1.6.5.90.
242
Generated by GNU Enscript 1.6.5.90.
184
 
243
 
185
 
244