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