1 /*
2 * Copyright [2005] [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 package edu.internet2.middleware.shibboleth.wayf;
17
18 import java.util.Collection;
19 /**
20 * This is just a container class for tieing together a set of IdPs to a name - this being what
21 * is sent to the JSP for display purposes.
22 */
23 public class IdPSiteSetEntry {
24
25 /** The metadata provider. */
26 private final IdPSiteSet siteSet;
27
28 /** The IdPs associated with that metadata provider. */
29 private final Collection<IdPSite> sites;
30
31 /**
32 * Create an object which contains just these two objects.
33 * @param siteSetParam the metadata provider.
34 * @param sitesParam the list of IdPs.
35 */
36 public IdPSiteSetEntry(IdPSiteSet siteSetParam, Collection<IdPSite> sitesParam) {
37 this.siteSet = siteSetParam;
38 this.sites = sitesParam;
39 }
40
41 /**
42 * Return something to display for this set of sites.
43 * @return the name as defined in the configuration
44 */
45 public String getName() {
46 return siteSet.getDisplayName();
47 }
48
49 /**
50 * Return the list of associated sites.
51 * @return a collection of IdPs.
52 */
53 public Collection<IdPSite> getSites() {
54 return sites;
55 }
56
57 }