Subversion Repositories XServices

Rev

Blame | Last modification | View Log | Download | RSS feed

/*
 *   Copyright 2012 Brian Rosenberger (Brutex Network)
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */

package net.brutex.xservices.ws;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

import net.brutex.xservices.types.ReturnCode;
import net.brutex.xservices.types.StringReplaceType;
import net.brutex.xservices.types.TargetNodeType;
import net.brutex.xservices.types.ant.AttachmentType;
import net.brutex.xservices.types.ant.CollectionType;
import net.brutex.xservices.types.ant.FileResource;
import net.brutex.xservices.util.BrutexNamespaces;

import org.apache.cxf.annotations.WSDLDocumentation;

/**
 * String operation services.
 * @author Brian Rosenberger
 * @since 0.5.0
 *
 */
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
public interface StringService {
        
        public static final String SERVICE_NAME = "StringService";
        
        final String OPERATION_REPLACEREGEX = "replaceRegEx";


        final static String PARAM_STRING = "string";
        final static String PARAM_SEARCH = "search";
        final static String PARAM_REPLACE = "replace";
        final static String PARAM_FLAGS = "regexflags";
                ;
        /**
         * String replace using regular expression.
         * @param res String
         * @param search regex search pattern
         * @param replace string replacement
         * @param flags regex flags
         * 
         * @return replacement
         * @throws XServicesFault
         */
        @WebMethod(operationName=OPERATION_REPLACEREGEX)
        @WSDLDocumentation(value="Store text based data")
        public abstract StringReplaceType replaceRegEx(
                        @WebParam(name = PARAM_STRING) String res,
                        @WebParam(name = PARAM_SEARCH) String search,
                        @WebParam(name = PARAM_REPLACE) String replace,
                        @WebParam(name = PARAM_FLAGS) String flags) throws XServicesFault;
        
        
}