View Javadoc

1   /*
2    * Copyright 2010 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.wayf.idpdisco;
18  
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  import org.opensaml.common.impl.AbstractSAMLObject;
23  import org.opensaml.xml.XMLObject;
24  import org.opensaml.xml.util.XMLObjectChildrenList;
25  
26  /**
27   * Concrete implementation of {@link edu.internet2.middleware.shibboleth.wayf.idpdisco.UIInfo}.
28   * @author Rod Widdowson
29   */
30  public class UIInfoImpl extends AbstractSAMLObject implements UIInfo {
31      
32      /** localized descriptions of the endpoint. */
33      private final XMLObjectChildrenList<Description> descriptions;
34      
35      /** localized displayNames of the endpoint. */
36      private final XMLObjectChildrenList<DisplayName> displayNames;
37          
38      /** localized Logos for the endpoint. */
39      private final XMLObjectChildrenList<Logo> logos;
40   
41      /** localized URLs for the endpoint. */
42      private final XMLObjectChildrenList<InformationURL> urls;
43   
44      /** localized PravcyStatementURLs for the endpoint. */
45      private final XMLObjectChildrenList<PrivacyStatementURL> privacyStatementURLs;
46   
47      /**
48       * Constructor.
49       * @param namespaceURI namespaceURI
50       * @param elementLocalName elementLocalName
51       * @param namespacePrefix namespacePrefix
52       */
53      protected UIInfoImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
54          super(namespaceURI, elementLocalName, namespacePrefix);
55          
56          descriptions = new XMLObjectChildrenList<Description>(this);
57          displayNames = new XMLObjectChildrenList<DisplayName>(this);
58          logos = new XMLObjectChildrenList<Logo>(this);
59          urls = new XMLObjectChildrenList<InformationURL>(this);
60          privacyStatementURLs = new XMLObjectChildrenList<PrivacyStatementURL>(this);
61      }
62  
63      
64      /** {@inheritDoc} */
65      public List<Description> getDescriptions() {
66          return descriptions;
67      }
68  
69      /** {@inheritDoc} */
70      public List<DisplayName> getDisplayNames() {
71          return displayNames;
72      }
73  
74      /** {@inheritDoc} */
75      public List<InformationURL> getInformationURLs() {
76          return urls;
77      }
78  
79      /** {@inheritDoc} */
80      public List<Logo> getLogos() {
81          return logos;
82      }
83  
84      /** {@inheritDoc} */
85      public List<PrivacyStatementURL> getPrivacyStatementURLs() {
86          return privacyStatementURLs;
87      }
88  
89      /** {@inheritDoc} */
90      public List<XMLObject> getOrderedChildren() {
91          ArrayList<XMLObject> children = new ArrayList<XMLObject>();
92          
93          children.addAll(descriptions);
94          children.addAll(displayNames);
95          children.addAll(urls);
96          children.addAll(logos);
97          children.addAll(privacyStatementURLs);
98          return children;
99      }
100 
101 }