001: /*
002: * $Id: RequestSecurityToken.java,v 1.3 2007/05/29 22:11:30 ofung Exp $
003: */
004:
005: /*
006: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
007: *
008: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
009: *
010: * The contents of this file are subject to the terms of either the GNU
011: * General Public License Version 2 only ("GPL") or the Common Development
012: * and Distribution License("CDDL") (collectively, the "License"). You
013: * may not use this file except in compliance with the License. You can obtain
014: * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
015: * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
016: * language governing permissions and limitations under the License.
017: *
018: * When distributing the software, include this License Header Notice in each
019: * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
020: * Sun designates this particular file as subject to the "Classpath" exception
021: * as provided by Sun in the GPL Version 2 section of the License file that
022: * accompanied this code. If applicable, add the following below the License
023: * Header, with the fields enclosed by brackets [] replaced by your own
024: * identifying information: "Portions Copyrighted [year]
025: * [name of copyright owner]"
026: *
027: * Contributor(s):
028: *
029: * If you wish your version of this file to be governed by only the CDDL or
030: * only the GPL Version 2, indicate your decision by adding "[Contributor]
031: * elects to include this software in this distribution under the [CDDL or GPL
032: * Version 2] license." If you don't indicate a single choice of license, a
033: * recipient has the option to distribute your version of this file under
034: * either the CDDL, the GPL Version 2 or to extend the choice of license to
035: * its licensees as provided above. However, if you add GPL Version 2 code
036: * and therefore, elected the GPL Version 2 license, then the option applies
037: * only if the new code is made subject to such option by the copyright
038: * holder.
039: */
040:
041: package com.sun.xml.ws.security.trust.elements;
042:
043: import java.util.List;
044: import java.util.Map;
045: import javax.xml.namespace.QName;
046:
047: import java.net.URI;
048:
049: import com.sun.xml.ws.api.security.trust.Claims;
050: import com.sun.xml.ws.security.trust.WSTrustConstants;
051:
052: /**
053: * @author Kumar Jayanti
054: */
055: public interface RequestSecurityToken extends WSTrustElementBase {
056:
057: /**
058: * Predefined constants for the Type of Key desired in the Security Token
059: * Values for the wst:KeyType parameter
060: */
061: public static final String PUBLIC_KEY_TYPE = WSTrustConstants.WST_NAMESPACE
062: + "/PublicKey";
063: public static final String SYMMETRIC_KEY_TYPE = WSTrustConstants.WST_NAMESPACE
064: + "/SymmetricKey";
065:
066: /**
067: * Gets the value of the any property.
068: *
069: * <p>
070: * This accessor method returns a reference to the live list,
071: * not a snapshot. Therefore any modification you make to the
072: * returned list will be present inside the JAXB object.
073: * This is why there is not a <CODE>set</CODE> method for the any property.
074: *
075: * <p>
076: * For example, to add a new item, do as follows:
077: * <pre>
078: * getAny().add(newItem);
079: * </pre>
080: *
081: *
082: * <p>
083: * Objects of the following type(s) are allowed in the list
084: * {@link Element }
085: * {@link Object }
086: */
087: List<Object> getAny();
088:
089: /**
090: * Gets the value of the context property.
091: *
092: *
093: * @return {@link String }
094: */
095: String getContext();
096:
097: /**
098: * Gets a map that contains attributes that aren't bound to any typed property on this class.
099: *
100: * <p>
101: * the map is keyed by the name of the attribute and
102: * the value is the string value of the attribute.
103: *
104: * the map returned by this method is live, and you can add new attribute
105: * by updating the map directly. Because of this design, there's no setter.
106: *
107: *
108: *
109: * @return always non-null
110: */
111: Map<QName, String> getOtherAttributes();
112:
113: /**
114: * Get the type of request, specified as a URI.
115: * The URI indicates the class of function that is requested.
116: * @return {@link URI}
117: */
118: URI getRequestType();
119:
120: /**
121: * Set the type of request, specified as a URI.
122: * @param requestType {@link URI}
123: */
124: void setRequestType(URI requestType);
125:
126: /**
127: * Set the desired claims settings for the requested token
128: */
129: void setClaims(Claims claims);
130:
131: /**
132: * Get the desired claims settings for the token if specified, null otherwise
133: */
134: Claims getClaims();
135:
136: /**
137: * Set the Participants Sharing the requested Token
138: */
139: void setParticipants(Participants participants);
140:
141: /**
142: * Get the participants sharing the token if specified, null otherwise
143: */
144: Participants getParticipants();
145:
146: CancelTarget getCancelTarget();
147:
148: }
|