1 /** 2 * Copyright 2005-2013 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.api.extension; 17 18 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; 19 import org.kuali.rice.kew.api.KewApiConstants; 20 import org.springframework.cache.annotation.Cacheable; 21 22 import javax.jws.WebMethod; 23 import javax.jws.WebResult; 24 import javax.jws.WebService; 25 import javax.jws.soap.SOAPBinding; 26 import java.util.List; 27 28 29 /** 30 * A service which is used for retrieving information about extensions to various 31 * pieces of Kuali Enterprise Workflow. 32 * 33 * @author Kuali Rice Team (rice.collab@kuali.org) 34 */ 35 @WebService(name = "extensionRepositoryService", targetNamespace = KewApiConstants.Namespaces.KEW_NAMESPACE_2_0) 36 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) 37 public interface ExtensionRepositoryService { 38 /** 39 * Returns the {@link ExtensionDefinition} of the {@Link RuleAttribute} for the given id. 40 * @param id the id to search by. 41 * @return the extension definition found for the matching rule attribute service 42 * @throws RiceIllegalArgumentException if id is null or blank 43 */ 44 @WebMethod(operationName = "getExtensionById") 45 @WebResult(name = "extensionDefinition") 46 @Cacheable(value= ExtensionDefinition.Cache.NAME, key="'id=' + #p0") 47 ExtensionDefinition getExtensionById(String id) throws RiceIllegalArgumentException; 48 49 /** 50 * Returns the {@link ExtensionDefinition} of the {@Link RuleAttribute} for the given name. 51 * @param name the name to search by. 52 * @return the extension definition found for the matching rule attribute service 53 * @throws RiceIllegalArgumentException if name is null or blank 54 */ 55 @WebMethod(operationName = "getExtensionByName") 56 @WebResult(name = "extensionDefinition") 57 @Cacheable(value= ExtensionDefinition.Cache.NAME, key="'name=' + #p0") 58 ExtensionDefinition getExtensionByName(String name) throws RiceIllegalArgumentException; 59 60 /** 61 * Returns the {@link ExtensionDefinition} of the {@Link RuleAttribute} for the given resourceDescriptor. 62 * @param resourceDescriptor the resourceDescriptor to search by. 63 * @return the extension definition found for the matching rule attribute service 64 * @throws RiceIllegalArgumentException if resourceDescriptor is null or blank 65 */ 66 @WebMethod(operationName = "getExtensionByResourceDescriptor") 67 @WebResult(name = "extensionDefinitions") 68 @Cacheable(value=ExtensionDefinition.Cache.NAME, key="'resourceDescriptor=' + #p0") 69 List<ExtensionDefinition> getExtensionsByResourceDescriptor(String resourceDescriptor) throws RiceIllegalArgumentException; 70 71 }