diff options
Diffstat (limited to 'branches/sca-equinox/modules/policy-logging/src/main')
3 files changed, 8 insertions, 9 deletions
diff --git a/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicy.java b/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicy.java index 731b2d8d62..b9ae619d11 100644 --- a/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicy.java +++ b/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicy.java @@ -22,7 +22,6 @@ import java.util.logging.Level; import javax.xml.namespace.QName;
-import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.policy.Policy;
/**
@@ -32,7 +31,9 @@ import org.apache.tuscany.sca.policy.Policy; * @version $Rev$ $Date$
*/
public class JDKLoggingPolicy implements Policy {
- private static final QName JDK_LOGGING_POLICY_QNAME = new QName(Constants.SCA10_TUSCANY_NS, "jdkLogger");
+ static final String SCA10_NS = "http://www.osoa.org/xmlns/sca/1.0";
+ static final String SCA10_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.0";
+ private static final QName JDK_LOGGING_POLICY_QNAME = new QName(SCA10_TUSCANY_NS, "jdkLogger");
private String loggerName;
private String resourceBundleName;
diff --git a/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyInterceptor.java b/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyInterceptor.java index 58a6d21ee7..9a21f1e559 100644 --- a/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyInterceptor.java +++ b/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyInterceptor.java @@ -25,7 +25,6 @@ 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; @@ -40,7 +39,7 @@ import org.apache.tuscany.sca.policy.PolicySet; */ public class JDKLoggingPolicyInterceptor implements Interceptor { public static final String loggingPolicy = "JDKLoggingPolicy"; - public static final QName policySetQName = new QName(Constants.SCA10_TUSCANY_NS, loggingPolicy); + public static final QName policySetQName = new QName(JDKLoggingPolicy.SCA10_TUSCANY_NS, loggingPolicy); private Logger logger = null; private Invoker next; diff --git a/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyProcessor.java b/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyProcessor.java index 55e14736d1..5fd7a37a26 100644 --- a/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyProcessor.java +++ b/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyProcessor.java @@ -28,7 +28,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; @@ -42,7 +41,7 @@ import org.apache.tuscany.sca.monitor.Monitor; * @version $Rev$ $Date$ */ public class JDKLoggingPolicyProcessor implements StAXArtifactProcessor<JDKLoggingPolicy> { - private static final QName JDK_LOGGING_POLICY_QNAME = new QName(Constants.SCA10_TUSCANY_NS, "jdkLogger"); + private static final QName JDK_LOGGING_POLICY_QNAME = new QName(JDKLoggingPolicy.SCA10_TUSCANY_NS, "jdkLogger"); private static final String LOG_LEVEL = "logLevel"; private static final String RESOURCE_BUNDLE = "resourceBundle"; private static final String USE_PARENT_HANDLERS = "useParentHandlers"; @@ -68,7 +67,7 @@ public class JDKLoggingPolicyProcessor implements StAXArtifactProcessor<JDKLoggi case START_ELEMENT : { name = reader.getName(); if ( name.equals(JDK_LOGGING_POLICY_QNAME) ) { - String loggerName = reader.getAttributeValue(null, Constants.NAME); + String loggerName = reader.getAttributeValue(null, "name"); policy.setLoggerName(loggerName); } else if ( LOG_LEVEL.equals(name.getLocalPart()) ) { policy.setLogLevel(Level.parse(reader.getElementText())); @@ -102,10 +101,10 @@ public class JDKLoggingPolicyProcessor implements StAXArtifactProcessor<JDKLoggi writer.writeStartElement(prefix, JDK_LOGGING_POLICY_QNAME.getLocalPart(), JDK_LOGGING_POLICY_QNAME.getNamespaceURI()); - writer.writeNamespace("tuscany", Constants.SCA10_TUSCANY_NS); + writer.writeNamespace("tuscany", JDKLoggingPolicy.SCA10_TUSCANY_NS); if (policy.getLoggerName() != null) { - writer.writeAttribute(Constants.NAME, policy.getLoggerName()); + writer.writeAttribute("name", policy.getLoggerName()); } if ( policy.getLogLevel() != null ) { writer.writeStartElement(prefix, |