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.attribute; 18 19 import java.util.Collection; 20 import java.util.Map; 21 22 /** 23 * Base interface for attribute resolution requests. 24 */ 25 public interface AttributeRequestContext { 26 27 /** 28 * Gets the collection of IDs for the attributes being requested by the relying party. 29 * 30 * @return collection of IDs for the attributes being requested by the relying party 31 */ 32 public Collection<String> getRequestedAttributesIds(); 33 34 /** 35 * Sets the collection of IDs for the attributes being requested by the relying party. 36 * 37 * @param ids collection of IDs for the attributes being requested by the relying party 38 */ 39 public void setRequestedAttributes(Collection<String> ids); 40 41 /** 42 * Gets the retrieved attributes. 43 * 44 * @return retrieved attributes 45 */ 46 public Map<String, BaseAttribute> getAttributes(); 47 48 /** 49 * Sets the retrieved attributes. 50 * 51 * @param attributes retrieved attributes 52 */ 53 public void setAttributes(Map<String, BaseAttribute> attributes); 54 55 /** 56 * Gets the method used to authenticate the principal. 57 * 58 * @return method used to authenticate the principal 59 */ 60 public String getPrincipalAuthenticationMethod(); 61 62 /** 63 * Gets the principal name of the subject of the request. 64 * 65 * @return principal name of the subject of the request 66 */ 67 public String getPrincipalName(); 68 69 /** 70 * Sets the method used to authenticate the principal. 71 * 72 * @param method method used to authenticate the principal 73 */ 74 public void setPrincipalAuthenticationMethod(String method); 75 76 /** 77 * Sets the principal name of the subject of the request. 78 * 79 * @param name principal name of the subject of the request 80 */ 81 public void setPrincipalName(String name); 82 }