1 /* 2 * Licensed to the University Corporation for Advanced Internet Development, 3 * Inc. (UCAID) under one or more contributor license agreements. See the 4 * NOTICE file distributed with this work for additional information regarding 5 * copyright ownership. The UCAID licenses this file to You under the Apache 6 * License, Version 2.0 (the "License"); you may not use this file except in 7 * compliance with the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 package edu.internet2.middleware.shibboleth.common.config.attribute.resolver; 19 20 import java.util.Set; 21 22 import org.opensaml.xml.util.DatatypeHelper; 23 import org.springframework.beans.factory.config.AbstractFactoryBean; 24 25 /** 26 * Base class for resolver resolution plugin factories. 27 */ 28 public abstract class AbstractResolutionPluginFactoryBean extends AbstractFactoryBean { 29 30 /** ID of resolution plug-ins this plugin depends on. */ 31 private Set<String> dependencyIds; 32 33 /** Unique ID of the plugin. */ 34 private String pluginId; 35 36 /** 37 * Sets the ID of resolution plug-ins this plugin depends on. 38 * 39 * @param ids ID of attribute definitions this plugin depends on 40 */ 41 public void setDependencyIds(Set<String> ids) { 42 dependencyIds = ids; 43 } 44 45 /** 46 * Gets the ID of resolution plug-ins this plugin depends on. 47 * 48 * @return ID of data connectors this plugin depends on 49 */ 50 public Set<String> getDependencyIds() { 51 return dependencyIds; 52 } 53 54 /** 55 * Gets the unique ID of this plugin. 56 * 57 * @return unique ID of this plugin 58 */ 59 public String getPluginId() { 60 return pluginId; 61 } 62 63 /** 64 * Sets the unique ID of this plugin. 65 * 66 * @param id unique ID of this plugin 67 */ 68 public void setPluginId(String id) { 69 pluginId = DatatypeHelper.safeTrimOrNullString(id); 70 } 71 }