001 /**
002 * Copyright 2005-2012 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.rice.kew.api.actionlist;
017
018 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
019 import org.kuali.rice.kew.api.KewApiConstants;
020 import org.kuali.rice.kew.api.action.ActionItem;
021
022 import javax.jws.WebMethod;
023 import javax.jws.WebParam;
024 import javax.jws.WebResult;
025 import javax.jws.WebService;
026 import javax.jws.soap.SOAPBinding;
027 import javax.xml.bind.annotation.XmlElement;
028 import javax.xml.bind.annotation.XmlElementWrapper;
029 import java.util.List;
030
031 @WebService(name = "actionListService", targetNamespace = KewApiConstants.Namespaces.KEW_NAMESPACE_2_0)
032 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
033 public interface ActionListService {
034
035 /**
036 * Gets the number of ActionItems for a given principal
037 *
038 * @param principalId unique Id for a principal in the system
039 *
040 * @return a count of ActionItems for a given principal
041 *
042 * @throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException if {@code principalId} is null
043 */
044 @WebMethod(operationName = "getUserActionItemCount")
045 @WebResult(name = "userActionItemCount")
046 Integer getUserActionItemCount(
047 @WebParam(name = "principalId") String principalId)
048 throws RiceIllegalArgumentException;
049
050 /**
051 * Returns a list of all {@link ActionItem}s for a {@link org.kuali.rice.kew.api.document.Document}
052 *
053 * @param documentId unique id of the document to get the ActionItems for
054 *
055 * @return list of ActionItems for a document
056 *
057 * @throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException if {@code documentId} is null
058 */
059 @WebMethod(operationName = "getAllActionItems")
060 @WebResult(name = "actionItems")
061 @XmlElementWrapper(name = "actionItems", required = true)
062 @XmlElement(name = "actionItem", required = true)
063 List<ActionItem> getAllActionItems(
064 @WebParam(name = "documentId") String documentId)
065 throws RiceIllegalArgumentException;
066
067 /**
068 * Returns a list of {@link ActionItem}s for a {@link org.kuali.rice.kew.api.document.Document} that match one of the
069 * passed in actionRequestCodes
070 *
071 * @param documentId unique id of the document to get the ActionItems for
072 * @param actionRequestedCodes list of action request codes to match with the ActionItems
073 *
074 * @return list of ActionItems for a document with a given action request code
075 *
076 * @throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException if {@code documentId} is null
077 */
078 @WebMethod(operationName = "getActionItems")
079 @WebResult(name = "actionItems")
080 @XmlElementWrapper(name = "actionItems", required = true)
081 @XmlElement(name = "actionItem", required = true)
082 List<ActionItem> getActionItems(
083 @WebParam(name = "documentId") String documentId,
084 @WebParam(name = "actionRequestedCodes") List<String> actionRequestedCodes)
085 throws RiceIllegalArgumentException;
086
087 /**
088 * Returns a list of {@link ActionItem}s for a Principal in the system
089 *
090 * @param principalId unique Id for a principal in the system
091 *
092 * @return list of ActionItems for a given principal
093 *
094 * @throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException if {@code principalId} is null
095 */
096 @WebMethod(operationName = "getActionItemsForPrincipal")
097 @WebResult(name = "actionItems")
098 @XmlElementWrapper(name = "actionItems", required = true)
099 @XmlElement(name = "actionItem", required = true)
100 List<ActionItem> getActionItemsForPrincipal(
101 @WebParam(name = "principalId") String principalId)
102 throws RiceIllegalArgumentException;
103
104 }