View Javadoc

1   /*
2    * Copyright 2005-20011 The Kuali Foundation
3    *
4    *
5    * Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in
6    * compliance with the License. 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 distributed under the License is distributed on an "AS
11   * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
12   * language governing permissions and limitations under the License.
13   */
14  package org.kuali.rice.kew.framework.document.lookup;
15  
16  import org.kuali.rice.core.api.uif.RemotableAttributeError;
17  import org.kuali.rice.core.api.uif.RemotableAttributeField;
18  import org.kuali.rice.core.api.util.jaxb.MultiValuedStringMapAdapter;
19  import org.kuali.rice.kew.api.KewApiConstants;
20  import org.kuali.rice.kew.api.document.attribute.DocumentAttribute;
21  import org.kuali.rice.kew.api.document.attribute.WorkflowAttributeDefinition;
22  import org.kuali.rice.kew.api.extension.ExtensionDefinition;
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  import javax.xml.bind.annotation.XmlElementWrapper;
31  import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
32  import java.util.List;
33  import java.util.Map;
34  
35  /**
36   * TODO...
37   *
38   * @author Kuali Rice Team (rice.collab@kuali.org)
39   */
40  @WebService(name = "searchableAttributeServiceSoap", targetNamespace = KewApiConstants.Namespaces.KEW_NAMESPACE_2_0)
41  @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
42  public interface SearchableAttribute {
43  
44      @WebMethod(operationName = "generateSearchContent")
45      @WebResult(name = "searchContent")
46      public String generateSearchContent(
47              @WebParam(name = "extensionDefinition") ExtensionDefinition extensionDefinition,
48              @WebParam(name = "documentTypeName") String documentTypeName,
49              @WebParam(name = "attributeDefinition") WorkflowAttributeDefinition attributeDefinition
50      );
51  
52      @WebMethod(operationName = "getDocumentAttributes")
53      @WebResult(name = "documentAttributes")
54      @XmlElementWrapper(name = "documentAttributes", required = false)
55      @XmlElement(name = "documentAttribute", required = false)
56      public List<DocumentAttribute> getDocumentAttributes(
57              @WebParam(name = "extensionDefinition") ExtensionDefinition extensionDefinition,
58              @WebParam(name = "documentSearchContext") DocumentSearchContext documentSearchContext
59      );
60  
61      @WebMethod(operationName = "getSearchFields")
62      @WebResult(name = "searchFields")
63      @XmlElementWrapper(name = "searchFields", required = false)
64      @XmlElement(name = "searchField", required = false)
65      public List<RemotableAttributeField> getSearchFields(
66              @WebParam(name = "extensionDefinition") ExtensionDefinition extensionDefinition,
67              @WebParam(name = "documentTypeName") String documentTypeName
68      );
69  
70      @WebMethod(operationName = "validateSearchParameters")
71      @WebResult(name = "validationErrors")
72      @XmlElementWrapper(name = "validationErrors", required = false)
73      @XmlElement(name = "validationError", required = false)
74      public List<RemotableAttributeError> validateSearchFieldParameters(
75              @WebParam(name = "extensionDefinition") ExtensionDefinition extensionDefinition,
76              @WebParam(name = "parameters")
77              @XmlJavaTypeAdapter(MultiValuedStringMapAdapter.class) Map<String, List<String>> parameters,
78              @WebParam(name = "documentTypeName") String documentTypeName
79      );
80  
81  }