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.actionlist;
17  
18  import java.util.List;
19  
20  import javax.jws.WebMethod;
21  import javax.jws.WebParam;
22  import javax.jws.WebResult;
23  import javax.jws.WebService;
24  import javax.jws.soap.SOAPBinding;
25  import javax.xml.bind.annotation.XmlElement;
26  import javax.xml.bind.annotation.XmlElementWrapper;
27  
28  import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
29  import org.kuali.rice.kew.api.KewApiConstants;
30  import org.kuali.rice.kew.api.action.ActionItem;
31  import org.kuali.rice.kew.api.action.ActionItemCustomization;
32  import org.kuali.rice.kew.framework.KewFrameworkServiceLocator;
33  
34  /**
35   * A remotable service which handles processing of a client application's custom processing of
36   * action list attributes.
37   *
38   * @author Kuali Rice Team (rice.collab@kuali.org)
39   */
40  @WebService(name = KewFrameworkServiceLocator.ACTION_LIST_CUSTOMIZATION_HANDLER_SERVICE, targetNamespace = KewApiConstants.Namespaces.KEW_NAMESPACE_2_0)
41  @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
42  public interface ActionListCustomizationHandlerService {
43      
44      // TODO Modeled from DocumentSecurityHandlerService, but get a better description
45      /**
46       * Returns a list of Action Item Customizations from the given list of Action Items and Principal ID.
47       *
48       * <p>This method essentially invokes CustomActionListAttribute???
49       * {@link DocumentSecurityAttribute#isAuthorizedForDocument(String, org.kuali.rice.kew.api.document.Document)}
50       * method for each of the security attributes supplied in the document security directives, passing the associated
51       * list of document ids.</p>
52       *
53       * @param principalId the id of the Principal ???
54       * @param actionItems the list of Action Items to be customized.
55       * 
56       * @return the list of Action Item Customizations
57       *
58       * @throws RiceIllegalArgumentException if the given principalId is a null or blank value
59       * @throws RiceIllegalArgumentException if any of the action items ???
60       */
61      @WebMethod(operationName = "customizeActionList")
62      @WebResult(name = "actionListCustomizations")
63      @XmlElementWrapper(name = "actionListCustomizations", required = false)
64      @XmlElement(name = "actionListCustomization", required = false)
65      List<ActionItemCustomization> customizeActionList(
66              @WebParam(name = "principalId") String principalId, 
67              @WebParam(name = "actionItems") List<ActionItem> actionItems)
68          throws RiceIllegalArgumentException;
69  }