JBossWS SVN: r17816 - in stack/cxf/trunk/modules: testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-07-26 06:34:01 -0400 (Fri, 26 Jul 2013)
New Revision: 17816
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/policy/Constants.java
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceImpl.java
Log:
[JBWS-3648] Adding a convenient constant interface to allow code completition in IDE when using @PolicySets
Added: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/policy/Constants.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/policy/Constants.java (rev 0)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/policy/Constants.java 2013-07-26 10:34:01 UTC (rev 17816)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.cxf.extensions.policy;
+
+
+/**
+ * Some JBossWS-CXF stack policy extension constants
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 26-Jul-2013
+ *
+ */
+public interface Constants
+{
+ public static final String AsymmetricBinding_X509v1_TripleDesRsa15_EncryptBeforeSigning_ProtectTokens_POLICY_SET = "AsymmetricBinding_X509v1_TripleDesRsa15_EncryptBeforeSigning_ProtectTokens";
+ public static final String AsymmetricBinding_X509v1_GCM256OAEP_ProtectTokens_POLICY_SET = "AsymmetricBinding_X509v1_GCM256OAEP_ProtectTokens";
+ public static final String WS_SP_EX2121_SSL_UT_Supporting_Token_POLICY_SET = "WS-SP-EX2121_SSL_UT_Supporting_Token";
+ public static final String WS_SP_EX213_WSS10_UT_Mutual_Auth_X509_Sign_Encrypt_POLICY_SET = "WS-SP-EX213_WSS10_UT_Mutual_Auth_X509_Sign_Encrypt";
+ public static final String WS_SP_EX214_WSS11_User_Name_Cert_Sign_Encrypt_POLICY_SET = "WS-SP-EX214_WSS11_User_Name_Cert_Sign_Encrypt";
+ public static final String WS_SP_EX221_WSS10_Mutual_Auth_X509_Sign_Encrypt_POLICY_SET = "WS-SP-EX221_WSS10_Mutual_Auth_X509_Sign_Encrypt";
+ public static final String WS_SP_EX222_WSS10_Mutual_Auth_X509_Sign_Encrypt_POLICY_SET = "WS-SP-EX222_WSS10_Mutual_Auth_X509_Sign_Encrypt";
+ public static final String WS_SP_EX223_WSS11_Anonymous_X509_Sign_Encrypt_POLICY_SET = "WS-SP-EX223_WSS11_Anonymous_X509_Sign_Encrypt";
+ public static final String WS_SP_EX224_WSS11_Mutual_Auth_X509_Sign_Encrypt_POLICY_SET = "WS-SP-EX224_WSS11_Mutual_Auth_X509_Sign_Encrypt";
+ public static final String WS_RM_Policy_spec_example_POLICY_SET = "WS-RM_Policy_spec_example";
+ public static final String WS_Addressing_POLICY_SET = "WS-Addressing";
+}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceImpl.java 2013-07-26 10:01:25 UTC (rev 17815)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceImpl.java 2013-07-26 10:34:01 UTC (rev 17816)
@@ -26,6 +26,7 @@
import org.apache.cxf.annotations.EndpointProperties;
import org.apache.cxf.annotations.EndpointProperty;
import org.jboss.ws.api.annotation.PolicySets;
+import org.jboss.wsf.stack.cxf.extensions.policy.Constants;
@WebService(
portName = "AnnotatedSecurityServicePort",
@@ -42,7 +43,7 @@
@EndpointProperty(key = "ws-security.callback-handler", value = "org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback")
}
)
-@PolicySets("AsymmetricBinding_X509v1_GCM256OAEP_ProtectTokens")
+(a)PolicySets(Constants.AsymmetricBinding_X509v1_GCM256OAEP_ProtectTokens_POLICY_SET)
public class AnnotatedServiceImpl implements AnnotatedServiceIface
{
public String sayHello()