View Javadoc

1   /*
2    * Copyright [2007] [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.config.attribute.resolver;
18  
19  import java.util.Set;
20  
21  import org.opensaml.xml.util.DatatypeHelper;
22  import org.springframework.beans.factory.config.AbstractFactoryBean;
23  
24  /**
25   * Base class for resolver resolution plugin factories.
26   */
27  public abstract class AbstractResolutionPluginFactoryBean extends AbstractFactoryBean {
28  
29      /** ID of resolution plug-ins this plugin depends on. */
30      private Set<String> dependencyIds;
31  
32      /** Unique ID of the plugin. */
33      private String pluginId;
34  
35      /**
36       * Sets the ID of resolution plug-ins this plugin depends on.
37       * 
38       * @param ids ID of attribute definitions this plugin depends on
39       */
40      public void setDependencyIds(Set<String> ids) {
41          dependencyIds = ids;
42      }
43  
44      /**
45       * Gets the ID of resolution plug-ins this plugin depends on.
46       * 
47       * @return ID of data connectors this plugin depends on
48       */
49      public Set<String> getDependencyIds() {
50          return dependencyIds;
51      }
52  
53      /**
54       * Gets the unique ID of this plugin.
55       * 
56       * @return unique ID of this plugin
57       */
58      public String getPluginId() {
59          return pluginId;
60      }
61  
62      /**
63       * Sets the unique ID of this plugin.
64       * 
65       * @param id unique ID of this plugin
66       */
67      public void setPluginId(String id) {
68          pluginId = DatatypeHelper.safeTrimOrNullString(id);
69      }
70  }