Subversion Repositories XServices

Rev

Rev 63 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 63 Rev 64
Line -... Line 1...
-
 
1
/*
-
 
2
 *   Copyright 2010 Brian Rosenberger (Brutex Network)
-
 
3
 *
-
 
4
 *   Licensed under the Apache License, Version 2.0 (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
-
 
7
 *
-
 
8
 *       http://www.apache.org/licenses/LICENSE-2.0
-
 
9
 *
-
 
10
 *   Unless required by applicable law or agreed to in writing, software
-
 
11
 *   distributed under the License is distributed on an "AS IS" BASIS,
-
 
12
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
 
13
 *   See the License for the specific language governing permissions and
-
 
14
 *   limitations under the License.
-
 
15
 */
-
 
16
 
1
package net.brutex.xservices.ws;
17
package net.brutex.xservices.ws;
Line 2... Line 18...
2
 
18
 
Line 3... Line -...
3
import java.util.List;
-
 
4
 
19
import java.util.List;
5
import javax.activation.DataHandler;
20
 
6
import javax.jws.WebMethod;
21
import javax.jws.WebMethod;
-
 
22
import javax.jws.WebParam;
-
 
23
import javax.jws.WebService;
-
 
24
import javax.xml.bind.annotation.XmlElement;
-
 
25
 
-
 
26
import org.apache.cxf.annotations.WSDLDocumentation;
-
 
27
import org.apache.cxf.annotations.WSDLDocumentationCollection;
Line 7... Line 28...
7
import javax.jws.WebParam;
28
 
8
import javax.jws.WebService;
29
import com.sun.xml.internal.ws.api.model.wsdl.WSDLDescriptorKind;
9
 
30
 
10
import net.brutex.xservices.types.ArchiveResource;
31
import net.brutex.xservices.types.ArchiveResource;
11
import net.brutex.xservices.types.AttachmentType;
32
import net.brutex.xservices.types.AttachmentType;
12
import net.brutex.xservices.types.FileResource;
33
import net.brutex.xservices.types.FileResource;
13
import net.brutex.xservices.types.FileSetResource;
34
import net.brutex.xservices.types.FileSetResource;
-
 
35
import net.brutex.xservices.types.ReplacePattern;
-
 
36
import net.brutex.xservices.types.ReturnCode;
-
 
37
import net.brutex.xservices.util.BrutexNamespaces;
-
 
38
import net.brutex.xservices.util.XServicesDocumentation;
-
 
39
/**
14
import net.brutex.xservices.types.ReplacePattern;
40
 * @author Brian Rosenberger
-
 
41
 *
-
 
42
 */
-
 
43
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
-
 
44
@WSDLDocumentationCollection(
-
 
45
    {
15
import net.brutex.xservices.types.ReturnCode;
46
    	@WSDLDocumentation(value = BrutexNamespaces.BRUTEX_COPYRIGHT, placement = WSDLDocumentation.Placement.TOP)
Line -... Line 47...
-
 
47
    }
-
 
48
)
-
 
49
public interface FileService {
-
 
50
 
-
 
51
	/**
-
 
52
	 * @param filename
16
import net.brutex.xservices.util.BrutexNamespaces;
53
	 * @param suffix
17
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
54
	 * @return The base name of the given file excluding the suffix. 
18
public interface FileService {
55
	 */
19
 
56
	@WSDLDocumentation(value = "The base name of the given file excluding the suffix.")
Line -... Line 57...
-
 
57
	@WebMethod(operationName = "basename")
-
 
58
	public abstract String basename(
-
 
59
			@WebParam(name = "file") @XmlElement(required=true) String filename,
-
 
60
			@WebParam(name = "suffix") String suffix);
-
 
61
 
20
	@WebMethod(operationName = "basename")
62
	/**
21
	public abstract ReturnCode basename(
63
	 * @param res
22
			@WebParam(name = "file") String filename,
64
	 * @return The file itself (MTOM attachment or inline base64) including some file metadata.
Line -... Line 65...
-
 
65
	 */
-
 
66
	@WSDLDocumentation(XServicesDocumentation.SERVICE_OPERATION_DOWNLOADFILE)
-
 
67
	@WebMethod(operationName = "downloadFile")
-
 
68
	public abstract AttachmentType downloadFile(
-
 
69
			@WebParam(name = "file") FileResource res);
23
			@WebParam(name = "suffix") String suffix);
70
	
24
 
71
	/**
25
	@WebMethod(operationName = "downloadFile")
72
	 * @param file
Line -... Line 73...
-
 
73
	 * @return The file name of the file that has been uploaded.
-
 
74
	 */
-
 
75
	@WSDLDocumentation(XServicesDocumentation.SERVICE_OPERATION_UPLOADFILE)
-
 
76
	@WebMethod(operationName = "uploadFile")
-
 
77
	public abstract String uploadFile(
-
 
78
			@WebParam(name = "file") AttachmentType file);
-
 
79
			
-
 
80
	/**
-
 
81
	 * @param src
-
 
82
	 * @param todir
26
	public abstract AttachmentType downloadFile(
83
	 * @param plm
27
			@WebParam(name = "file") FileResource res);
84
	 * @param overwrite
28
	
85
	 * @param encoding
29
	@WebMethod(operationName = "uploadFile")
86
	 * @return 
30
	public abstract String uploadFile(
87
	 * @throws XServicesFault
31
			@WebParam(name = "file") AttachmentType file);
88
	 */
32
			
89
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_COPY)
33
	@WebMethod(operationName = "copy")
90
	@WebMethod(operationName = "copy")
-
 
91
	public abstract ReturnCode copy(
-
 
92
			@WebParam(name = "fileset") @XmlElement(required=true) FileSetResource src,
-
 
93
			@WebParam(name = "todir") @XmlElement(required=true) String todir,
-
 
94
			@WebParam(name = "preservelastmodified") boolean plm,
-
 
95
			@WebParam(name = "overwrite") boolean overwrite,
-
 
96
			@WebParam(name = "encoding") String encoding) throws XServicesFault;
-
 
97
	
-
 
98
	/**
-
 
99
	 * @param fromFile
-
 
100
	 * @param tofile
-
 
101
	 * @param overwrite
-
 
102
	 * @return
-
 
103
	 * @throws XServicesFault
-
 
104
	 */
-
 
105
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_COPYFILE)
-
 
106
	@WebMethod(operationName = "copyFile")
-
 
107
	public abstract ReturnCode copyFile(
-
 
108
			@WebParam(name = "fromFile") @XmlElement(required=true) String fromFile,
-
 
109
			@WebParam(name = "toFile") @XmlElement(required=true) String tofile,
-
 
110
			@WebParam(name = "overwrite") boolean overwrite) throws XServicesFault;
34
	public abstract ReturnCode copy(
111
 
35
			@WebParam(name = "fileset") FileSetResource src,
112
	/**
36
			@WebParam(name = "todir") String todir,
113
	 * @param res
37
			@WebParam(name = "preservelastmodified") boolean plm,
114
	 * @param encoding
Line -... Line 115...
-
 
115
	 * @return content of the resource
-
 
116
	 */
-
 
117
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_LOADRESOURCE)
-
 
118
	@WebMethod(operationName = "loadResource")
-
 
119
	public abstract String loadRes(
-
 
120
			@WebParam(name = "resource") FileResource res,
38
			@WebParam(name = "overwrite") boolean overwrite,
121
			@WebParam(name = "encoding") String encoding);
39
			@WebParam(name = "encoding") String encoding) throws XServicesFault;
122
 
40
 
123
	/**
41
	@WebMethod(operationName = "loadResource")
124
	 * @param res
Line -... Line 125...
-
 
125
	 * @param encoding
-
 
126
	 * @return content of the resource
-
 
127
	 */
-
 
128
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_LOADRESOURCEFROMARCHIVE)
-
 
129
	@WebMethod(operationName = "loadResourceFromArchive")
-
 
130
	public abstract String loadResFromArchive(
-
 
131
			@WebParam(name = "archiveresource") ArchiveResource res,
-
 
132
			@WebParam(name = "encoding") String encoding);
42
	public abstract ReturnCode loadRes(
133
 
43
			@WebParam(name = "resource") FileResource res,
134
	/**
44
			@WebParam(name = "encoding") String encoding);
135
	 * @param message
45
 
136
	 * @param file
46
	@WebMethod(operationName = "loadResourceFromArchive")
137
	 * @param encoding
47
	public abstract ReturnCode loadResFromArchive(
138
	 * @param append
Line 48... Line 139...
48
			@WebParam(name = "archiveresource") ArchiveResource res,
139
	 * @return
49
			@WebParam(name = "encoding") String encoding);
140
	 */
50
 
141
	@WSDLDocumentation(value = XServicesDocumentation.SERVICE_OPERATION_ECHOTOFILE)
51
	@WebMethod(operationName = "echoToFile")
142
	@WebMethod(operationName = "echoToFile")
Line 52... Line 143...
52
	public abstract ReturnCode echo2file(
143
	public abstract ReturnCode echo2file(
53
			@WebParam(name = "message") String message,
144
			@WebParam(name = "message") @XmlElement(required=true) String message,
54
			@WebParam(name = "file") String file,
145
			@WebParam(name = "file") @XmlElement(required=true) String file,
55
			@WebParam(name = "encoding") String encoding,
146
			@WebParam(name = "encoding") String encoding,
Line 56... Line 147...
56
			@WebParam(name = "append") boolean append);
147
			@WebParam(name = "append") boolean append);
57
 
148
 
58
	@WebMethod(operationName = "changeOwner")
149
	@WebMethod(operationName = "changeOwner")
59
	public abstract ReturnCode changeOwner(
150
	public abstract ReturnCode changeOwner(
Line 60... Line 151...
60
			@WebParam(name = "fileset") FileSetResource res,
151
			@WebParam(name = "fileset") FileSetResource res,
61
			@WebParam(name = "owner") String owner);
152
			@WebParam(name = "owner") @XmlElement(required=true) String owner);
62
 
153
 
63
	@WebMethod(operationName = "changeGroup")
154
	@WebMethod(operationName = "changeGroup")
64
	public abstract ReturnCode changeGroup(
155
	public abstract ReturnCode changeGroup(
Line 65... Line 156...
65
			@WebParam(name = "fileset") FileSetResource res,
156
			@WebParam(name = "fileset") FileSetResource res,
66
			@WebParam(name = "group") String group);
157
			@WebParam(name = "group") @XmlElement(required=true) String group);
67
 
158
 
68
	@WebMethod(operationName = "changeMode")
159
	@WebMethod(operationName = "changeMode")