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.profile; 19 20 import java.util.Collection; 21 22 import org.opensaml.ws.message.MessageContext; 23 24 import edu.internet2.middleware.shibboleth.common.relyingparty.ProfileConfiguration; 25 import edu.internet2.middleware.shibboleth.common.relyingparty.RelyingPartyConfiguration; 26 import edu.internet2.middleware.shibboleth.common.session.Session; 27 28 /** 29 * Extension to the basic message conext that carries profile request specific information. 30 * 31 * @param <ProfileConfigurationType> profile configuration type for current request 32 */ 33 public interface ProfileRequestContext<ProfileConfigurationType extends ProfileConfiguration> extends MessageContext { 34 35 /** 36 * Gets the configuration for the profile for the relying party. 37 * 38 * @return configuration for the profile for the relying party 39 */ 40 public ProfileConfigurationType getProfileConfiguration(); 41 42 /** 43 * Gets the configuration for the relying party for this request. 44 * 45 * @return configuration for the relying party for this request 46 */ 47 public RelyingPartyConfiguration getRelyingPartyConfiguration(); 48 49 /** 50 * Gets the current user session, if there is one. 51 * 52 * @return current user session 53 */ 54 public Session getUserSession(); 55 56 /** 57 * Sets the configuration for the profile for the relying party. 58 * 59 * @param configuration configuration for the profile for the relying party 60 */ 61 public void setProfileConfiguration(ProfileConfigurationType configuration); 62 63 /** 64 * Sets the configuration for the relying party for this request. 65 * 66 * @param configuration configuration for the relying party for this request 67 */ 68 public void setRelyingPartyConfiguration(RelyingPartyConfiguration configuration); 69 70 /** 71 * Sets the current user session. 72 * 73 * @param session current user session 74 */ 75 public void setUserSession(Session session); 76 77 /** 78 * Gets the attributes, by ID, released to the peer. 79 * 80 * @return attributes released to the peer 81 */ 82 public Collection<String> getReleasedAttributes(); 83 84 /** 85 * Sets the attributes, by ID, released to the peer. 86 * 87 * @param attributeIds ids of the attributes released to the peer 88 */ 89 public void setReleasedAttributes(Collection<String> attributeIds); 90 }