001: /*
002: * $Id: WSTrustElementBase.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.net.URI;
044:
045: import com.sun.xml.ws.policy.impl.bindings.AppliesTo;
046: import com.sun.xml.ws.policy.Policy;
047: import com.sun.xml.ws.policy.impl.bindings.PolicyReference;
048:
049: import com.sun.xml.ws.api.security.trust.WSTrustException;
050:
051: /**
052: * @author WS-Trust Implementation Team.
053: */
054: public interface WSTrustElementBase {
055:
056: /**
057: * Get the type of security token, specified as a URI.
058: * @return {@link URI}
059: */
060: URI getTokenType();
061:
062: /**
063: * Set the type of security token, specified as a URI.
064: * @param tokenType {@link URI}
065: */
066: void setTokenType(URI tokenType);
067:
068: /**
069: * Get the desired LifeTime settings for the token if specified, null otherwise
070: */
071: Lifetime getLifetime();
072:
073: /**
074: * Set the desired lifetime settings for the requested token
075: */
076: void setLifetime(Lifetime lifetime);
077:
078: /**
079: * Get the entropy for the requested token
080: * @return {@link Entropy}
081: */
082: Entropy getEntropy();
083:
084: /**
085: * Set the entropy for the requested token
086: * @param entropy {@link Entropy}
087: */
088: void setEntropy(Entropy entropy);
089:
090: /**
091: * Set the desired policy settings for the requested token
092: * @param appliesTo {@link AppliesTo}
093: */
094: void setAppliesTo(AppliesTo appliesTo);
095:
096: /**
097: * Get the desired AppliesTo policy settings for the token if specified, null otherwise
098: * @return {@link AppliesTo}
099: */
100: AppliesTo getAppliesTo();
101:
102: /**
103: * Set the value of OnBehalfOf for the requested token
104: * @param appliesTo {@link OnBehalfOf}
105: */
106: void setOnBehalfOf(OnBehalfOf onBehalfOf);
107:
108: /**
109: * Get the value of OnBehalfOf for the token if specified, null otherwise
110: * @return {@link OnBehalfOf}
111: */
112: OnBehalfOf getOnBehalfOf();
113:
114: /**
115: * set Issuer of the SecurityToken Presented in the message
116: */
117: void setIssuer(Issuer issuer);
118:
119: /**
120: * get Issuer of the SecurityToken Presented in the Message, null otherwise
121: */
122: Issuer getIssuer();
123:
124: /**
125: * set a <wst:Renewing/> element to make a renewable Issue request
126: */
127: void setRenewable(Renewing renew);
128:
129: /**
130: * get the <wst:Renewing/> element if present, null otherwise
131: */
132: Renewing getRenewable();
133:
134: /**
135: * Set a SignChallenge
136: */
137: void setSignChallenge(SignChallenge challenge);
138:
139: /**
140: * get SignChallenge element if any, null otherwise
141: */
142: SignChallenge getSignChallenge();
143:
144: /**
145: * set a BinaryExchange
146: */
147: void setBinaryExchange(BinaryExchange challenge);
148:
149: /**
150: * get BinaryExchange element if any, null otherwise
151: */
152: BinaryExchange getBinaryExchange();
153:
154: /**
155: * set AuthenticationType
156: */
157: void setAuthenticationType(URI uri);
158:
159: /**
160: * get Authentication Type parameter if set, null otherwise
161: */
162: URI getAuthenticationType();
163:
164: /**
165: * set KeyType parameter
166: */
167: void setKeyType(URI keytype) throws WSTrustException;
168:
169: /**
170: * get KeyType Parameter if set, null otherwise
171: */
172: URI getKeyType();
173:
174: /**
175: * set the KeySize parameter
176: */
177: void setKeySize(long size);
178:
179: /**
180: * get the KeySize parameter if specified, 0 otherwise
181: */
182: long getKeySize();
183:
184: /**
185: * set SignatureAlgorithm
186: */
187: void setSignatureAlgorithm(URI algorithm);
188:
189: /**
190: * get SignatureAlgorithm value if set, return default otherwise
191: */
192: URI getSignatureAlgorithm();
193:
194: /**
195: * set EncryptionAlgorithm
196: */
197: void setEncryptionAlgorithm(URI algorithm);
198:
199: /**
200: * get EncryptionAlgorithm value if set, return default otherwise
201: */
202: URI getEncryptionAlgorithm();
203:
204: /**
205: * set CanonicalizationAlgorithm
206: */
207: void setCanonicalizationAlgorithm(URI algorithm);
208:
209: /**
210: * get CanonicalizationAlgorithm value if set, return default otherwise
211: */
212: URI getCanonicalizationAlgorithm();
213:
214: /**
215: * Set the desired useKey settings for the requested token
216: */
217: void setUseKey(UseKey useKey);
218:
219: /**
220: * Get the desired useKey settings for the token if specified, null otherwise
221: */
222: UseKey getUseKey();
223:
224: /**
225: * Set the desired proofEncryption settings for the requested token
226: */
227: void setProofEncryption(ProofEncryption proofEncryption);
228:
229: /**
230: * Get the desired proofEncryption settings for the token if specified, null otherwise
231: */
232: ProofEncryption getProofEncryption();
233:
234: /**
235: * set ComputedKeyAlgorithm
236: */
237: void setComputedKeyAlgorithm(URI algorithm);
238:
239: /**
240: * get CanonicalizationAlgorithm value if set, return default otherwise
241: */
242: URI getComputedKeyAlgorithm();
243:
244: /**
245: * set Encryption
246: */
247: void setEncryption(Encryption enc);
248:
249: /**
250: * get Encryption value if set, return null otherwise
251: */
252: Encryption getEncryption();
253:
254: /**
255: * Set the Signature Algorithm to be used with the issued token
256: */
257: void setSignWith(URI algorithm);
258:
259: /**
260: * Get the Signature Algorithm to be used with the token if set, null otherwise
261: */
262: URI getSignWith();
263:
264: /**
265: * Set the Encryption Algorithm to be used with the issued token
266: */
267: void setEncryptWith(URI algorithm);
268:
269: /**
270: * Get the Encryption Algorithm to be used with the token if set, null otherwise
271: */
272: URI getEncryptWith();
273:
274: /**
275: * set the Delegate to which the issued token be delegated
276: */
277: void setDelegateTo(DelegateTo to);
278:
279: /**
280: * get the DelegateTo value if set, null otherwise
281: */
282: DelegateTo getDelegateTo();
283:
284: /**
285: * Set if the requested token be forwardable
286: */
287: void setForwardable(boolean flag);
288:
289: /**
290: * Get the value of the Forwardable flag
291: * NOTE: default value of this flag is true
292: */
293: boolean getForwardable();
294:
295: /**
296: * Set if the requested token be delegatable
297: */
298: void setDelegatable(boolean flag);
299:
300: /**
301: * Get the value of the Delegatable flag
302: * NOTE: default value of this flag is false
303: */
304: boolean getDelegatable();
305:
306: /**
307: * Set the desired policy settings for the requested token
308: */
309: void setPolicy(Policy policy);
310:
311: /**
312: * Get the desired policy settings for the token if specified, null otherwise
313: */
314: Policy getPolicy();
315:
316: /**
317: * Set the desired policyReference settings for the requested token
318: */
319: void setPolicyReference(PolicyReference policyRef);
320:
321: /**
322: * Get the desired policyReference settings for the token if specified, null otherwise
323: */
324: PolicyReference getPolicyReference();
325:
326: /**
327: * Get the AllowPostdating element for the token if specified, null otherwise
328: * NOTE: Although this is an issue with the WSTrust spec, leaving it here for now.
329: * This can be removed or modified later depending on the outcome of the issue.
330: */
331: AllowPostdating getAllowPostdating();
332:
333: /**
334: * Set the desired policyReference settings for the requested token
335: */
336: void setAllowPostdating(AllowPostdating allowPostDating);
337:
338: }
|