Subversion Repositories XServices

Rev

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

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