View Javadoc

1   /**
2    * Copyright 2005-2012 The Kuali Foundation
3    *
4    * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
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  package org.kuali.rice.kew.framework.validation;
17  
18  import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
19  import org.kuali.rice.kew.api.KewApiConstants;
20  import org.kuali.rice.kew.api.validation.RuleValidationContext;
21  import org.kuali.rice.kew.api.validation.ValidationResults;
22  import org.kuali.rice.kew.framework.KewFrameworkServiceLocator;
23  
24  import javax.jws.WebMethod;
25  import javax.jws.WebParam;
26  import javax.jws.WebResult;
27  import javax.jws.WebService;
28  import javax.jws.soap.SOAPBinding;
29  import javax.xml.bind.annotation.XmlElement;
30  
31  /**
32   *  Service responsible for exposing custom RuleValidationAttribute functionality.
33   *  This service is exposed by the node hosting the specified custom attribute.
34   *
35   * @author Kuali Rice Team (rice.collab@kuali.org)
36   */
37  @WebService(name = KewFrameworkServiceLocator.RULE_VALIDATION_ATTRIBUTE_EXPORTER_SERVICE, targetNamespace = KewApiConstants.Namespaces.KEW_NAMESPACE_2_0)
38  @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
39  public interface RuleValidationAttributeExporterService {
40      /**
41       * Validates the rule within the given RuleValidationContext.
42       *
43       * @return a ValidationResults object representing the results of the validation, if this is
44       * empty or <code>null</code> this signifies that validation was successful.
45       */
46      @WebMethod(operationName = "validate")
47      @WebResult(name = "validationResults")
48      @XmlElement(name = "validationResults", required = false)
49      ValidationResults validate(
50                                  @WebParam(name = "attributeName") String attributeName,
51                                  @WebParam(name = "validationContext") RuleValidationContext validationContext) throws RiceIllegalArgumentException;
52  }