001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 2006 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.modules.websvc.wsitmodelext.security.tokens;
043:
044: import javax.xml.namespace.QName;
045: import java.util.HashSet;
046: import java.util.Set;
047:
048: /**
049: *
050: * @author Martin Grebac
051: */
052: public enum TokensQName {
053: WSSKERBEROSV5APREQTOKEN11(
054: createSecurityPolicyQName("WssKerberosV5ApReqToken11")), //NOI18N
055: WSSGSSKERBEROSV5APREQTOKEN11(
056: createSecurityPolicyQName("WssGssKerberosV5ApReqToken11")), //NOI18N
057:
058: WSSX509V1TOKEN10(createSecurityPolicyQName("WssX509V1Token10")), //NOI18N
059: WSSX509V3TOKEN10(createSecurityPolicyQName("WssX509V3Token10")), //NOI18N
060: WSSX509PKCS7TOKEN10(
061: createSecurityPolicyQName("WssX509Pkcs7Token10")), //NOI18N
062: WSSX509PKIPATHV1TOKEN10(
063: createSecurityPolicyQName("WssX509PkiPathV1Token10")), //NOI18N
064: WSSX509V1TOKEN11(createSecurityPolicyQName("WssX509V1Token11")), //NOI18N
065: WSSX509V3TOKEN11(createSecurityPolicyQName("WssX509V3Token11")), //NOI18N
066: WSSX509PKCS7TOKEN11(
067: createSecurityPolicyQName("WssX509Pkcs7Token11")), //NOI18N
068: WSSX509PKIPATHV1TOKEN11(
069: createSecurityPolicyQName("WssX509PkiPathV1Token11")), //NOI18N
070:
071: REQUIREKEYIDENTIFIERREFERENCE(
072: createSecurityPolicyQName("RequireKeyIdentifierReference")), //NOI18N
073: REQUIREISSUERSERIALREFERENCE(
074: createSecurityPolicyQName("RequireIssuerSerialReference")), //NOI18N
075: REQUIREEMBEDDEDTOKENREFERENCE(
076: createSecurityPolicyQName("RequireEmbeddedTokenReference")), //NOI18N
077: REQUIRETHUMBPRINTREFERENCE(
078: createSecurityPolicyQName("RequireThumbprintReference")), //NOI18N
079: REQUIREEXTERNALURIREFERENCE(
080: createSecurityPolicyQName("RequireExternalUriReference")), //NOI18N
081: SC10SECURITYCONTEXTTOKEN(
082: createSecurityPolicyQName("SC10SecurityContextToken")), //NOI18N
083:
084: REQUIREINTERNALREFERENCE(
085: createSecurityPolicyQName("RequireInternalReference")), //NOI18N
086: REQUIREEXTERNALREFERENCE(
087: createSecurityPolicyQName("RequireExternalReference")), //NOI18N
088: REQUIREDERIVEDKEYS(createSecurityPolicyQName("RequireDerivedKeys")), //NOI18N
089: ISSUER(createSecurityPolicyQName("Issuer")), //NOI18N
090:
091: WSSUSERNAMETOKEN10(createSecurityPolicyQName("WssUsernameToken10")), //NOI18N
092: WSSUSERNAMETOKEN11(createSecurityPolicyQName("WssUsernameToken11")), //NOI18N
093:
094: WSSSAMLV10TOKEN10(createSecurityPolicyQName("WssSamlV10Token10")), //NOI18N
095: WSSSAMLV11TOKEN10(createSecurityPolicyQName("WssSamlV11Token10")), //NOI18N
096: WSSSAMLV10TOKEN11(createSecurityPolicyQName("WssSamlV10Token11")), //NOI18N
097: WSSSAMLV11TOKEN11(createSecurityPolicyQName("WssSamlV11Token11")), //NOI18N
098: WSSSAMLV20TOKEN11(createSecurityPolicyQName("WssSamlV20Token11")), //NOI18N
099:
100: WSSRELV10TOKEN10(createSecurityPolicyQName("WssRelV10Token10")), //NOI18N
101: WSSRELV20TOKEN10(createSecurityPolicyQName("WssRelV20Token10")), //NOI18N
102: WSSRELV10TOKEN11(createSecurityPolicyQName("WssRelV10Token11")), //NOI18N
103: WSSRELV20TOKEN11(createSecurityPolicyQName("WssRelV20Token11")), //NOI18N
104:
105: INCLUDETOKENATTRIBUTE(createSecurityPolicyQName("IncludeToken")), //NOI18N
106:
107: USERNAMETOKEN(createSecurityPolicyQName("UsernameToken")), //NOI18N
108: X509TOKEN(createSecurityPolicyQName("X509Token")), //NOI18N
109: KERBEROSTOKEN(createSecurityPolicyQName("KerberosToken")), //NOI18N
110: SPNEGOCONTEXTTOKEN(createSecurityPolicyQName("SpnegoContextToken")), //NOI18N
111: SECURITYCONTEXTTOKEN(
112: createSecurityPolicyQName("SecurityContextToken")), //NOI18N
113: SECURECONVERSATIONTOKEN(
114: createSecurityPolicyQName("SecureConversationToken")), //NOI18N
115: PROTECTIONTOKEN(createSecurityPolicyQName("ProtectionToken")), //NOI18N
116: TRANSPORTTOKEN(createSecurityPolicyQName("TransportToken")), //NOI18N
117: SUPPORTINGTOKENS(createSecurityPolicyQName("SupportingTokens")), //NOI18N
118: SIGNEDSUPPORTINGTOKENS(
119: createSecurityPolicyQName("SignedSupportingTokens")), //NOI18N
120: ENDORSINGSUPPORTINGTOKENS(
121: createSecurityPolicyQName("EndorsingSupportingTokens")), //NOI18N
122: SIGNEDENDORSINGSUPPORTINGTOKENS(
123: createSecurityPolicyQName("SignedEndorsingSupportingTokens")), //NOI18N
124: SIGNATURETOKEN(createSecurityPolicyQName("SignatureToken")), //NOI18N
125: ENCRYPTIONTOKEN(createSecurityPolicyQName("EncryptionToken")), //NOI18N
126: INITIATORTOKEN(createSecurityPolicyQName("InitiatorToken")), //NOI18N
127: RECIPIENTTOKEN(createSecurityPolicyQName("RecipientToken")), //NOI18N
128: SAMLTOKEN(createSecurityPolicyQName("SamlToken")), //NOI18N
129: RELTOKEN(createSecurityPolicyQName("RelToken")), //NOI18N
130: HTTPSTOKEN(createSecurityPolicyQName("HttpsToken")), //NOI18N
131: ISSUEDTOKEN(createSecurityPolicyQName("IssuedToken")); //NOI18N
132:
133: public static final String SECPOLICY_UTILITY = "http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"; //NOI18N
134: public static final String SECPOLICY_UTILITY_NS_PREFIX = "sp"; //NOI18N
135:
136: public static QName createSecurityPolicyQName(String localName) {
137: return new QName(SECPOLICY_UTILITY, localName,
138: SECPOLICY_UTILITY_NS_PREFIX);
139: }
140:
141: TokensQName(QName name) {
142: qName = name;
143: }
144:
145: public QName getQName() {
146: return qName;
147: }
148:
149: private static Set<QName> qnames = null;
150:
151: public static Set<QName> getQNames() {
152: if (qnames == null) {
153: qnames = new HashSet<QName>();
154: for (TokensQName wq : values()) {
155: qnames.add(wq.getQName());
156: }
157: }
158: return qnames;
159: }
160:
161: private final QName qName;
162:
163: }
|