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.relyingparty;
18  
19  import java.util.List;
20  
21  import org.opensaml.saml2.metadata.provider.MetadataProvider;
22  import org.opensaml.ws.security.SecurityPolicy;
23  import org.opensaml.xml.security.credential.Credential;
24  import org.opensaml.xml.security.trust.TrustEngine;
25  
26  import edu.internet2.middleware.shibboleth.common.relyingparty.RelyingPartyConfiguration;
27  
28  /**
29   * Container for relying party group information.
30   */
31  public class RelyingPartyGroup {
32  
33      /** Anonymous relying party config for the group. */
34      private RelyingPartyConfiguration anonymousRP;
35  
36      /** Default relying party config for the group. */
37      private RelyingPartyConfiguration defaultRP;
38  
39      /** Relying party config for the group. */
40      private List<RelyingPartyConfiguration> relyingParties;
41  
42      /** Metadata provider for the group. */
43      private MetadataProvider metadataProvider;
44      
45      /** Security policies for the group. */
46      private List<SecurityPolicy> securityPolicies;
47      
48      /** Trust engines for the group. */
49      private List<TrustEngine> trustEngines;
50  
51      /** Credentials for the group. */
52      private List<Credential> groupCredentials;
53      
54      /**
55       * Gets the anonymous relying party config for the group.
56       * 
57       * @return anonymous relying party config for the group
58       */
59      public RelyingPartyConfiguration getAnonymousRP() {
60          return anonymousRP;
61      }
62      
63      /**
64       * Gets the credentials for the group.
65       * 
66       * @return credentials for the group
67       */
68      public List<Credential> getCredentials() {
69          return groupCredentials;
70      }
71      
72      /**
73       * Gets the default relying party for the group.
74       * 
75       * @return default relying party for the group
76       */
77      public RelyingPartyConfiguration getDefaultRP() {
78          return defaultRP;
79      }
80      
81      /**
82       * Gets the metadata provider for the group.
83       * 
84       * @return metadata provider for the group
85       */
86      public MetadataProvider getMetadataProvider() {
87          return metadataProvider;
88      }
89  
90      /**
91       * Gets the relying party configurations for the group.
92       * 
93       * @return relying party configurations for the group
94       */
95      public List<RelyingPartyConfiguration> getRelyingParties() {
96          return relyingParties;
97      }
98  
99      /**
100      * Gets the security policies for the group.
101      * 
102      * @return security policies for the group
103      */
104     public List<SecurityPolicy> getSecurityPolicies() {
105         return securityPolicies;
106     }
107 
108     /**
109      * Gets the trust engines for the group.
110      * 
111      * @return trust engines for the group
112      */
113     public List<TrustEngine> getTrustEngines() {
114         return trustEngines;
115     }
116 
117     /**
118      * Sets the anonymous relying party config for the group.
119      * 
120      * @param config anonymous relying party config for the group
121      */
122     public void setAnonymousRP(RelyingPartyConfiguration config) {
123         anonymousRP = config;
124     }
125 
126     /**
127      * Sets the credentials for the group.
128      * 
129      * @param credentials credentials for the group
130      */
131     public void setCredentials(List<Credential> credentials) {
132         groupCredentials = credentials;
133     }
134 
135     /**
136      * Sets the default relying party for the group.
137      * 
138      * @param config default relying party for the group
139      */
140     public void setDefaultRP(RelyingPartyConfiguration config) {
141         defaultRP = config;
142     }
143 
144     /**
145      * Sets the metadata provider for the group.
146      * 
147      * @param provider metadata provider for the group
148      */
149     public void setMetadataProvider(MetadataProvider provider) {
150         metadataProvider = provider;
151     }
152 
153     /**
154      * Sets the relying party configurations for the group.
155      * 
156      * @param configurations relying party configurations for the group
157      */
158     public void setRelyingParties(List<RelyingPartyConfiguration> configurations) {
159         relyingParties = configurations;
160     }
161 
162     /**
163      * Sets the security policies for the group.
164      * 
165      * @param policies security policies for the group
166      */
167     public void setSecurityPolicies(List<SecurityPolicy> policies) {
168         securityPolicies = policies;
169     }
170 
171     /**
172      * Sets the trust engines for the group.
173      * 
174      * @param engines trust engines for the group
175      */
176     public void setTrustEngines(List<TrustEngine> engines) {
177         trustEngines = engines;
178     }
179 }