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