001: /*
002: * The contents of this file are subject to the terms
003: * of the Common Development and Distribution License
004: * (the License). You may not use this file except in
005: * compliance with the License.
006: *
007: * You can obtain a copy of the license at
008: * https://glassfish.dev.java.net/public/CDDLv1.0.html.
009: * See the License for the specific language governing
010: * permissions and limitations under the License.
011: *
012: * When distributing Covered Code, include this CDDL
013: * Header Notice in each file and include the License file
014: * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
015: * If applicable, add the following below the CDDL Header,
016: * with the fields enclosed by brackets [] replaced by
017: * you own identifying information:
018: * "Portions Copyrighted [year] [name of copyright owner]"
019: *
020: * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
021: */
022:
023: package com.sun.xml.ws.security.opt.api.keyinfo;
024:
025: import com.sun.xml.ws.security.opt.api.EncryptedKey;
026: import com.sun.xml.ws.security.opt.crypto.dsig.keyinfo.KeyInfo;
027: import java.security.Key;
028:
029: /**
030: *
031: * Class to store results from TokenBuilder. Stores the various key information
032: * @author K.Venugopal@sun.com
033: */
034: public class BuilderResult {
035: private Key dataProtectionKey = null;
036: private Key keyProtectionKey = null;
037: private KeyInfo keyInfo = null;
038: private EncryptedKey encryptedKey = null;
039: private String dpKID = "";
040:
041: /** Creates a new instance of BuilderResult */
042: public BuilderResult() {
043: }
044:
045: /**
046: *
047: * @return the data protection key
048: */
049: public Key getDataProtectionKey() {
050: return dataProtectionKey;
051: }
052:
053: /**
054: *
055: * @param dataProtectionKey set the data protection key
056: */
057: public void setDataProtectionKey(final Key dataProtectionKey) {
058: this .dataProtectionKey = dataProtectionKey;
059: }
060:
061: /**
062: *
063: * @return the key protection key
064: */
065: public Key getKeyProtectionKey() {
066: return keyProtectionKey;
067: }
068:
069: /**
070: *
071: * @param keyProtectionKey store the key protection key
072: */
073: public void setKeyProtectionKey(final Key keyProtectionKey) {
074: this .keyProtectionKey = keyProtectionKey;
075: }
076:
077: /**
078: *
079: * @return the stored keyInfo
080: */
081: public KeyInfo getKeyInfo() {
082: return keyInfo;
083: }
084:
085: /**
086: *
087: * @param keyInfo store the keyInfo from <CODE>TokenBuilder</CODE>
088: */
089: public void setKeyInfo(final KeyInfo keyInfo) {
090: this .keyInfo = keyInfo;
091: }
092:
093: /**
094: *
095: * @return the encryptedKey
096: */
097: public EncryptedKey getEncryptedKey() {
098: return encryptedKey;
099: }
100:
101: /**
102: *
103: * @param encryptedKey store the encryptedKey for Signature or Encryption
104: */
105: public void setEncryptedKey(final EncryptedKey encryptedKey) {
106: this .encryptedKey = encryptedKey;
107: }
108:
109: public void setDPTokenId(final String id) {
110: this .dpKID = id;
111: }
112:
113: public String getDPTokenId() {
114: return dpKID;
115: }
116: }
|