diff options
Diffstat (limited to '')
11 files changed, 23 insertions, 34 deletions
diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationPolicy.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationPolicy.java index 14bff2dca6..eb0da76acf 100644 --- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationPolicy.java +++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationPolicy.java @@ -20,7 +20,6 @@ package org.apache.tuscany.sca.policy.authentication.basic; import javax.xml.namespace.QName; -import org.apache.tuscany.sca.assembly.xml.Constants; import org.apache.tuscany.sca.policy.Policy; /** @@ -30,7 +29,9 @@ import org.apache.tuscany.sca.policy.Policy; * @version $Rev$ $Date$ */ public class BasicAuthenticationPolicy implements Policy { - public static final QName BASIC_AUTHENTICATION_POLICY_QNAME = new QName(Constants.SCA10_TUSCANY_NS, "basicAuthentication"); + private static final String SCA10_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.0"; + + public static final QName BASIC_AUTHENTICATION_POLICY_QNAME = new QName(SCA10_TUSCANY_NS, "basicAuthentication"); public static final String BASIC_AUTHENTICATION_USERNAME = "username"; public static final String BASIC_AUTHENTICATION_PASSWORD = "password"; diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationPolicyProcessor.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationPolicyProcessor.java index f85889ea21..0b3dfd5539 100644 --- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationPolicyProcessor.java +++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationPolicyProcessor.java @@ -21,14 +21,11 @@ package org.apache.tuscany.sca.policy.authentication.basic; import static javax.xml.stream.XMLStreamConstants.END_ELEMENT; import static javax.xml.stream.XMLStreamConstants.START_ELEMENT; -import java.util.logging.Level; - import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; -import org.apache.tuscany.sca.assembly.xml.Constants; import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; import org.apache.tuscany.sca.contribution.processor.ContributionWriteException; @@ -42,7 +39,8 @@ import org.apache.tuscany.sca.monitor.Monitor; * @version $Rev$ $Date$ */ public class BasicAuthenticationPolicyProcessor implements StAXArtifactProcessor<BasicAuthenticationPolicy> { - + private static final String SCA10_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.0"; + private static final String USER_NAME = "userName"; private static final String PASSWORD = "password"; @@ -97,7 +95,7 @@ public class BasicAuthenticationPolicyProcessor implements StAXArtifactProcessor writer.writeStartElement(prefix, getArtifactType().getLocalPart(), getArtifactType().getNamespaceURI()); - writer.writeNamespace("tuscany", Constants.SCA10_TUSCANY_NS); + writer.writeNamespace("tuscany", SCA10_TUSCANY_NS); if ( policy.getUserName() != null ) { writer.writeStartElement(prefix, diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationReferencePolicyInterceptor.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationReferencePolicyInterceptor.java index 83b1d20e9e..c0ed282276 100644 --- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationReferencePolicyInterceptor.java +++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationReferencePolicyInterceptor.java @@ -18,19 +18,12 @@ */ package org.apache.tuscany.sca.policy.authentication.basic; -import java.util.logging.ConsoleHandler; -import java.util.logging.Handler; -import java.util.logging.Level; -import java.util.logging.Logger; - import javax.xml.namespace.QName; -import org.apache.tuscany.sca.assembly.xml.Constants; import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.invocation.Interceptor; import org.apache.tuscany.sca.invocation.Invoker; import org.apache.tuscany.sca.invocation.Message; -import org.apache.tuscany.sca.policy.Policy; import org.apache.tuscany.sca.policy.PolicySet; /** @@ -40,7 +33,8 @@ import org.apache.tuscany.sca.policy.PolicySet; * @version $Rev$ $Date$ */ public class BasicAuthenticationReferencePolicyInterceptor implements Interceptor { - public static final QName policySetQName = new QName(Constants.SCA10_TUSCANY_NS, "wsBasicAuthentication"); + private static final String SCA10_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.0"; + public static final QName policySetQName = new QName(SCA10_TUSCANY_NS, "wsBasicAuthentication"); private Invoker next; private Operation operation; diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationServicePolicyInterceptor.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationServicePolicyInterceptor.java index 1b8ceb1515..6c0f7d48d0 100644 --- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationServicePolicyInterceptor.java +++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationServicePolicyInterceptor.java @@ -21,7 +21,6 @@ package org.apache.tuscany.sca.policy.authentication.basic; import javax.xml.namespace.QName; -import org.apache.tuscany.sca.assembly.xml.Constants; import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.invocation.Interceptor; import org.apache.tuscany.sca.invocation.Invoker; @@ -35,7 +34,8 @@ import org.apache.tuscany.sca.policy.PolicySet; * @version $Rev$ $Date$ */ public class BasicAuthenticationServicePolicyInterceptor implements Interceptor { - public static final QName policySetQName = new QName(Constants.SCA10_TUSCANY_NS, "wsBasicAuthentication"); + private static final String SCA10_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.0"; + public static final QName policySetQName = new QName(SCA10_TUSCANY_NS, "wsBasicAuthentication"); private Invoker next; private Operation operation; diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicy.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicy.java index d58fa51256..dfb6fee180 100644 --- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicy.java +++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicy.java @@ -24,7 +24,6 @@ import java.util.List; import javax.xml.namespace.QName; -import org.apache.tuscany.sca.assembly.xml.Constants; import org.apache.tuscany.sca.policy.Policy; /** @@ -33,7 +32,9 @@ import org.apache.tuscany.sca.policy.Policy; * @version $Rev$ $Date$ */ public class AuthorizationPolicy implements Policy { - public static final QName NAME = new QName(Constants.SCA10_NS, "authorization"); + private final static String SCA10_NS = "http://www.osoa.org/xmlns/sca/1.0"; + // private final static String SCA10_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.0"; + public static final QName NAME = new QName(SCA10_NS, "authorization"); public static enum AcessControl { permitAll, denyAll, allow diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicyProcessor.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicyProcessor.java index 6e5d453bd9..d78c0fc2e3 100644 --- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicyProcessor.java +++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicyProcessor.java @@ -37,7 +37,6 @@ import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; import org.apache.tuscany.sca.monitor.Problem.Severity; -import org.apache.tuscany.sca.monitor.impl.ProblemImpl; /** * diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicy.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicy.java index 8f848ef06a..e4c4794c52 100644 --- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicy.java +++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicy.java @@ -21,7 +21,6 @@ package org.apache.tuscany.sca.policy.identity; import javax.xml.namespace.QName; -import org.apache.tuscany.sca.assembly.xml.Constants; import org.apache.tuscany.sca.policy.Policy; /** @@ -30,7 +29,8 @@ import org.apache.tuscany.sca.policy.Policy; * @version $Rev$ $Date$ */ public class SecurityIdentityPolicy implements Policy { - public static final QName NAME = new QName(Constants.SCA10_NS, "securityIdentity"); + private final static String SCA10_NS = "http://www.osoa.org/xmlns/sca/1.0"; + public static final QName NAME = new QName(SCA10_NS, "securityIdentity"); private boolean useCallerIdentity; diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicyProcessor.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicyProcessor.java index 8a84d244f2..0ccda91364 100644 --- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicyProcessor.java +++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicyProcessor.java @@ -35,7 +35,6 @@ import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; import org.apache.tuscany.sca.monitor.Problem.Severity; -import org.apache.tuscany.sca.monitor.impl.ProblemImpl; /** * diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicy.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicy.java index f41d36194a..e1ef32f36c 100644 --- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicy.java +++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicy.java @@ -21,7 +21,6 @@ package org.apache.tuscany.sca.policy.security.jaas; import javax.xml.namespace.QName;
-import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.policy.Policy;
/**
@@ -29,7 +28,8 @@ import org.apache.tuscany.sca.policy.Policy; * @version $Rev$ $Date$
*/
public class JaasAuthenticationPolicy implements Policy {
- public static final QName NAME = new QName(Constants.SCA10_TUSCANY_NS, "jaasAuthentication");
+ private static final String SCA10_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.0";
+ public static final QName NAME = new QName(SCA10_TUSCANY_NS, "jaasAuthentication");
private String configurationName = "other";
private String callbackHandlerClassName;
diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyHandler.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyHandler.java index b7736fa817..edff316700 100644 --- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyHandler.java +++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyHandler.java @@ -23,7 +23,6 @@ import javax.security.auth.callback.CallbackHandler; import javax.security.auth.login.LoginContext;
import javax.xml.namespace.QName;
-import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.policy.PolicySet;
import org.apache.tuscany.sca.policy.util.PolicyHandler;
@@ -34,7 +33,8 @@ import org.apache.tuscany.sca.policy.util.PolicyHandler; */
public class JaasAuthenticationPolicyHandler implements PolicyHandler {
private static final String jaasPolicy = "JaasPolicy";
- public static final QName policySetQName = new QName(Constants.SCA10_TUSCANY_NS, jaasPolicy);
+ private static final String SCA10_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.0";
+ public static final QName policySetQName = new QName(SCA10_TUSCANY_NS, jaasPolicy);
private PolicySet applicablePolicySet = null;
public void setUp(Object... context) {
diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyProcessor.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyProcessor.java index 69534f59b1..7466001035 100644 --- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyProcessor.java +++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyProcessor.java @@ -26,7 +26,6 @@ import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; -import org.apache.tuscany.sca.assembly.xml.Constants; import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; import org.apache.tuscany.sca.contribution.processor.ContributionWriteException; @@ -37,7 +36,6 @@ import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; import org.apache.tuscany.sca.monitor.Problem.Severity; -import org.apache.tuscany.sca.monitor.impl.ProblemImpl; /** * @@ -46,10 +44,9 @@ import org.apache.tuscany.sca.monitor.impl.ProblemImpl; public class JaasAuthenticationPolicyProcessor implements StAXArtifactProcessor<JaasAuthenticationPolicy> { private static final QName JAAS_AUTHENTICATION_POLICY_QNAME = JaasAuthenticationPolicy.NAME; private static final String callbackHandler = "callbackHandler"; - public static final QName CALLBACK_HANDLER_QNAME = new QName(Constants.SCA10_TUSCANY_NS, - callbackHandler); - public static final QName CONFIGURATION_QNAME = new QName(Constants.SCA10_TUSCANY_NS, - "configurationName"); + private static final String SCA10_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.0"; + public static final QName CALLBACK_HANDLER_QNAME = new QName(SCA10_TUSCANY_NS, callbackHandler); + public static final QName CONFIGURATION_QNAME = new QName(SCA10_TUSCANY_NS, "configurationName"); private Monitor monitor; public QName getArtifactType() { @@ -122,7 +119,7 @@ public class JaasAuthenticationPolicyProcessor implements StAXArtifactProcessor< writer.writeStartElement(prefix, JAAS_AUTHENTICATION_POLICY_QNAME.getLocalPart(), JAAS_AUTHENTICATION_POLICY_QNAME.getNamespaceURI()); - writer.writeNamespace("tuscany", Constants.SCA10_TUSCANY_NS); + writer.writeNamespace("tuscany", SCA10_TUSCANY_NS); writer.writeEndElement(); |