Subversion Repositories XServices

Rev

Rev 86 | Rev 112 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
86 brianR 1
/*
2
 *   Copyright 2012 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
 
23
import net.brutex.xservices.types.ReturnCode;
93 brianR 24
import net.brutex.xservices.types.StringMatchType;
86 brianR 25
import net.brutex.xservices.types.StringReplaceType;
26
import net.brutex.xservices.types.TargetNodeType;
27
import net.brutex.xservices.types.ant.AttachmentType;
28
import net.brutex.xservices.types.ant.CollectionType;
29
import net.brutex.xservices.types.ant.FileResource;
30
import net.brutex.xservices.util.BrutexNamespaces;
31
 
32
import org.apache.cxf.annotations.WSDLDocumentation;
33
 
34
/**
35
 * String operation services.
36
 * @author Brian Rosenberger
37
 * @since 0.5.0
38
 *
39
 */
40
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
41
public interface StringService {
42
 
43
	public static final String SERVICE_NAME = "StringService";
44
 
45
	final String OPERATION_REPLACEREGEX = "replaceRegEx";
93 brianR 46
	final String OPERATION_MATCHREGEX = "matchRegEx";
86 brianR 47
 
48
 
49
	final static String PARAM_STRING = "string";
50
	final static String PARAM_SEARCH = "search";
51
	final static String PARAM_REPLACE = "replace";
52
	final static String PARAM_FLAGS = "regexflags";
53
		;
54
	/**
55
	 * String replace using regular expression.
56
	 * @param res String
57
	 * @param search regex search pattern
58
	 * @param replace string replacement
59
	 * @param flags regex flags
60
	 *
61
	 * @return replacement
62
	 * @throws XServicesFault
63
	 */
64
	@WebMethod(operationName=OPERATION_REPLACEREGEX)
65
	@WSDLDocumentation(value="Store text based data")
66
	public abstract StringReplaceType replaceRegEx(
67
			@WebParam(name = PARAM_STRING) String res,
68
			@WebParam(name = PARAM_SEARCH) String search,
69
			@WebParam(name = PARAM_REPLACE) String replace,
70
			@WebParam(name = PARAM_FLAGS) String flags) throws XServicesFault;
71
 
93 brianR 72
	@WebMethod(operationName=OPERATION_MATCHREGEX)
73
	@WSDLDocumentation(value="Match text based data")
74
	public abstract StringMatchType matchRegEx(
75
			@WebParam(name = PARAM_STRING) String res,
76
			@WebParam(name = PARAM_SEARCH) String search,
77
			@WebParam(name = PARAM_FLAGS) String flags) throws XServicesFault;
86 brianR 78
 
93 brianR 79
 
86 brianR 80
}