Subversion Repositories XServices

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
83 brianR 1
/*
2
 *   Copyright 2011 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
 
17
package net.brutex.xservices.ws;
18
 
19
import javax.jws.WebMethod;
20
import javax.jws.WebParam;
21
import javax.jws.WebService;
22
import net.brutex.xservices.types.TargetNodeType;
23
import net.brutex.xservices.types.ant.AttachmentType;
24
import net.brutex.xservices.types.ant.CollectionType;
25
import net.brutex.xservices.util.BrutexNamespaces;
26
 
27
import org.apache.cxf.annotations.WSDLDocumentation;
28
 
29
/**
30
 * Storage management services.
31
 * @author Brian Rosenberger
32
 * @since 0.5.0
33
 *
34
 */
35
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
36
public interface StorageService {
37
 
38
	public static final String SERVICE_NAME = "StorageService";
39
 
40
	final String OPERATION_STORETEXT = "storeText";
41
	final String OPERATION_STOREBINARY = "storeBinary";
42
	final String OPERATION_CREATECOLLECTION = "createCollection";
43
	final String OPERATION_DELIVERCOLLECTION = "deliverCollection";
44
 
45
	final String PARAM_TEXT = "text";
46
	final String PARAM_BINARY = "binary";
47
	final String PARAM_NAME = "name";
48
	final String PARAM_COLLECTION = "collection";
49
	final String PARAM_TARGETNODE = "target";
50
	final String PARAM_RAISEEVENT = "event";
51
		;
52
	/**
53
	 * Store text based data.
54
	 * @param text text to be stored
55
	 *
56
	 * @return uuid reference to stored object
57
	 * @throws XServicesFault
58
	 */
59
	@WebMethod(operationName=OPERATION_STORETEXT)
60
	@WSDLDocumentation(value="Store text based data")
61
	public abstract String storeText(@WebParam(name = PARAM_TEXT) String text) throws XServicesFault;
62
 
63
	@WebMethod(operationName=OPERATION_STOREBINARY)
64
	@WSDLDocumentation(value="Store binary data")
65
	public abstract String storeBinary(
66
				@WebParam(name= PARAM_BINARY) AttachmentType binary)
67
				throws XServicesFault;
68
 
69
	@WebMethod(operationName=OPERATION_CREATECOLLECTION)
70
	@WSDLDocumentation(value="Create a new Collection by name.")
71
	public abstract String createCollection(
72
				@WebParam(name= PARAM_COLLECTION) CollectionType collection)
73
				throws XServicesFault;
74
 
75
	@WebMethod(operationName=OPERATION_DELIVERCOLLECTION)
76
	@WSDLDocumentation(value="Deliver a collection to a target node (asynchronous).")
77
	public abstract void deliverCollection(
78
				@WebParam(name= PARAM_COLLECTION) CollectionType collection,
79
				@WebParam(name= PARAM_TARGETNODE) TargetNodeType targetnode,
80
				@WebParam(name= PARAM_RAISEEVENT) boolean isFiring)
81
				throws XServicesFault;
82
 
83
 
84
}