1 /* 2 * Copyright [2006] [University Corporation for Advanced Internet Development, Inc.] 3 * 4 * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0 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 17 package edu.internet2.middleware.shibboleth.common.attribute.resolver.provider; 18 19 import java.util.List; 20 21 import edu.internet2.middleware.shibboleth.common.attribute.resolver.AttributeResolutionException; 22 23 /** 24 * A base interface for plugins that provide attributes. 25 * 26 * @param <ResolvedType> object type this plug-in resolves to 27 */ 28 public interface ResolutionPlugIn<ResolvedType> { 29 30 /** 31 * Returns the unqiue ID of the plugin. 32 * 33 * @return unqiue ID of the plugin 34 */ 35 public String getId(); 36 37 /** 38 * Gets the IDs of the resolution plugins this plugin is dependent on. 39 * 40 * @return IDs of the data connectors this plugin is dependent on 41 */ 42 public List<String> getDependencyIds(); 43 44 /** 45 * Performs the attribute resolution for this plugin. 46 * 47 * @param resolutionContext the context for the resolution 48 * 49 * @return the attributes made available by the resolution, never null 50 * 51 * @throws AttributeResolutionException the problem that occured during the resolution 52 */ 53 public ResolvedType resolve(ShibbolethResolutionContext resolutionContext) throws AttributeResolutionException; 54 55 /** 56 * Validate the internal state of this plug-in. 57 * 58 * @throws AttributeResolutionException if the plug-in has an invalid internal state 59 */ 60 public void validate() throws AttributeResolutionException; 61 }