Subversion Repositories XServices

Rev

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

Rev 93 Rev 112
1
/*
1
/*
2
 *   Copyright 2012 Brian Rosenberger (Brutex Network)
2
 *   Copyright 2013 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
 
-
 
19
import java.util.ArrayList;
18
 
20
 
19
import javax.jws.WebMethod;
21
import javax.jws.WebMethod;
20
import javax.jws.WebParam;
22
import javax.jws.WebParam;
21
import javax.jws.WebService;
23
import javax.jws.WebService;
-
 
24
import javax.xml.bind.annotation.XmlElement;
22
 
-
 
23
import net.brutex.xservices.types.ReturnCode;
25
 
24
import net.brutex.xservices.types.StringMatchType;
26
import net.brutex.xservices.types.StringMatchType;
25
import net.brutex.xservices.types.StringReplaceType;
27
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;
28
import net.brutex.xservices.types.StringSplitType;
31
 
29
 
32
import org.apache.cxf.annotations.WSDLDocumentation;
30
import org.apache.cxf.annotations.WSDLDocumentation;
33
 
31
 
34
/**
32
/**
35
 * String operation services.
-
 
36
 * @author Brian Rosenberger
33
 * @author Brian Rosenberger, bru(at)brutex.de
37
 * @since 0.5.0
-
 
38
 *
34
 *
39
 */
35
 */
40
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
36
@WebService(targetNamespace="http://ws.xservices.brutex.net")
41
public interface StringService {
37
public abstract interface StringService
42
	
38
{
43
	public static final String SERVICE_NAME = "StringService";
39
  public static final String SERVICE_NAME = "StringService";
-
 
40
  public static final String OPERATION_REPLACEREGEX = "replaceRegEx";
-
 
41
  public static final String OPERATION_MATCHREGEX = "matchRegEx";
-
 
42
  public static final String OPERATION_ENCODETOENTITIES = "encodeToXMLEntities";
-
 
43
  public static final String PARAM_STRING = "string";
-
 
44
  public static final String PARAM_SEARCH = "search";
-
 
45
  public static final String PARAM_REPLACE = "replace";
-
 
46
  public static final String PARAM_FLAGS = "regexflags";
44
	
-
 
45
	final String OPERATION_REPLACEREGEX = "replaceRegEx";
-
 
46
	final String OPERATION_MATCHREGEX = "matchRegEx";
-
 
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
	 */
47
 
64
	@WebMethod(operationName=OPERATION_REPLACEREGEX)
48
  @WebMethod(operationName="replaceRegEx")
65
	@WSDLDocumentation(value="Store text based data")
49
  @WSDLDocumentation("Store text based data")
66
	public abstract StringReplaceType replaceRegEx(
50
  public abstract StringReplaceType replaceRegEx(
67
			@WebParam(name = PARAM_STRING) String res,
51
		  @WebParam(name="string") String paramString1, 
68
			@WebParam(name = PARAM_SEARCH) String search,
52
		  @WebParam(name="search") String paramString2, 
69
			@WebParam(name = PARAM_REPLACE) String replace,
53
		  @WebParam(name="replace") String paramString3, 
-
 
54
		  @WebParam(name="regexflags") String paramString4)
70
			@WebParam(name = PARAM_FLAGS) String flags) throws XServicesFault;
55
    throws XServicesFault;
71
	
56
 
72
	@WebMethod(operationName=OPERATION_MATCHREGEX)
57
  @WebMethod(operationName="matchRegEx")
73
	@WSDLDocumentation(value="Match text based data")
58
  @WSDLDocumentation("Match text based data")
74
	public abstract StringMatchType matchRegEx(
59
  public abstract StringMatchType matchRegEx(
75
			@WebParam(name = PARAM_STRING) String res,
60
		  @WebParam(name="string") String paramString1, 
-
 
61
		  @WebParam(name="search") String paramString2, 
-
 
62
		  @WebParam(name="regexflags") String paramString3)
-
 
63
    throws XServicesFault;
-
 
64
 
-
 
65
  @WebMethod(operationName="encodeToXMLEntities")
-
 
66
  @WSDLDocumentation("Match text based data")
-
 
67
  public abstract String encodeToXMLEntities(
76
			@WebParam(name = PARAM_SEARCH) String search,
68
		  @WebParam(name="string") @XmlElement(required=true) String paramString)
-
 
69
    throws XServicesFault;
-
 
70
  
-
 
71
  @WebMethod(operationName="splitString")
-
 
72
  @WSDLDocumentation("Split a string into tokens")
-
 
73
  public abstract StringSplitType splitString( 
-
 
74
		  @WebParam(name="string") @XmlElement(required=true) String paramString,
77
			@WebParam(name = PARAM_FLAGS) String flags) throws XServicesFault;
75
		  @WebParam(name="delimiter") @XmlElement(required=true) String delimiter)
78
	
76
  	throws XServicesFault;
79
	
77
  
80
}
78
}
-
 
79
 
-
 
80
Generated by GNU Enscript 1.6.5.90.
-
 
81
 
-
 
82