From 69f2050e34ee05b93e3141cb7b13ab0e072bc340 Mon Sep 17 00:00:00 2001 From: rfeng Date: Tue, 14 Oct 2008 22:06:31 +0000 Subject: Remove SCA prefix from Defintions model git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@704715 13f79535-47bb-0310-9956-ffa450edef68 --- .../SecurityPolicyDefinitionsProvider.java | 26 +++++++++++----------- ...apache.tuscany.sca.provider.DefinitionsProvider | 19 ++++++++++++++++ ...che.tuscany.sca.provider.SCADefinitionsProvider | 19 ---------------- 3 files changed, 32 insertions(+), 32 deletions(-) create mode 100644 branches/sca-equinox/modules/policy-security/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.DefinitionsProvider delete mode 100644 branches/sca-equinox/modules/policy-security/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider (limited to 'branches/sca-equinox/modules/policy-security') diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/SecurityPolicyDefinitionsProvider.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/SecurityPolicyDefinitionsProvider.java index cfe856e0f2..b58b9bb874 100644 --- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/SecurityPolicyDefinitionsProvider.java +++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/SecurityPolicyDefinitionsProvider.java @@ -27,29 +27,29 @@ import java.security.PrivilegedAction; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; import org.apache.tuscany.sca.core.ExtensionPointRegistry; -import org.apache.tuscany.sca.definitions.SCADefinitions; -import org.apache.tuscany.sca.definitions.util.SCADefinitionsUtil; -import org.apache.tuscany.sca.provider.SCADefinitionsProvider; -import org.apache.tuscany.sca.provider.SCADefinitionsProviderException; +import org.apache.tuscany.sca.definitions.Definitions; +import org.apache.tuscany.sca.definitions.util.DefinitionsUtil; +import org.apache.tuscany.sca.provider.DefinitionsProvider; +import org.apache.tuscany.sca.provider.DefinitionsProviderException; /** * Provider for Policy Intents and PolicySet definitions related to security * * @version $Rev$ $Date$ */ -public class SecurityPolicyDefinitionsProvider implements SCADefinitionsProvider { +public class SecurityPolicyDefinitionsProvider implements DefinitionsProvider { private static final String tuscanyDefinitionsFile = "org/apache/tuscany/sca/policy/security/tuscany_definitions.xml"; private String definitionsFile = "org/apache/tuscany/sca/policy/security/definitions.xml"; URLArtifactProcessor urlArtifactProcessor = null; public SecurityPolicyDefinitionsProvider(ExtensionPointRegistry registry) { URLArtifactProcessorExtensionPoint documentProcessors = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - urlArtifactProcessor = (URLArtifactProcessor)documentProcessors.getProcessor(SCADefinitions.class); + urlArtifactProcessor = (URLArtifactProcessor)documentProcessors.getProcessor(Definitions.class); } - public SCADefinitions getSCADefinition() throws SCADefinitionsProviderException { - SCADefinitions scaDefns = null; - SCADefinitions tuscanyDefns = null; + public Definitions getDefinitions() throws DefinitionsProviderException { + Definitions scaDefns = null; + Definitions tuscanyDefns = null; try { // Allow privileged access to load resource. Requires RuntimePermssion in security policy. URL definitionsFileUrl = AccessController.doPrivileged(new PrivilegedAction() { @@ -60,7 +60,7 @@ public class SecurityPolicyDefinitionsProvider implements SCADefinitionsProvider URI uri = new URI(definitionsFile); - scaDefns = (SCADefinitions)urlArtifactProcessor.read(null, + scaDefns = (Definitions)urlArtifactProcessor.read(null, uri, definitionsFileUrl); @@ -71,15 +71,15 @@ public class SecurityPolicyDefinitionsProvider implements SCADefinitionsProvider }); uri = new URI(definitionsFile); - tuscanyDefns = (SCADefinitions)urlArtifactProcessor.read(null, + tuscanyDefns = (Definitions)urlArtifactProcessor.read(null, uri, definitionsFileUrl); - SCADefinitionsUtil.aggregateSCADefinitions(tuscanyDefns, scaDefns); + DefinitionsUtil.aggregate(tuscanyDefns, scaDefns); return scaDefns; } catch ( Exception e ) { - throw new SCADefinitionsProviderException(e); + throw new DefinitionsProviderException(e); } } diff --git a/branches/sca-equinox/modules/policy-security/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.DefinitionsProvider b/branches/sca-equinox/modules/policy-security/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.DefinitionsProvider new file mode 100644 index 0000000000..790424df6b --- /dev/null +++ b/branches/sca-equinox/modules/policy-security/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.DefinitionsProvider @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Implementation class for SCA Definitions Providers +org.apache.tuscany.sca.policy.security.SecurityPolicyDefinitionsProvider \ No newline at end of file diff --git a/branches/sca-equinox/modules/policy-security/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider b/branches/sca-equinox/modules/policy-security/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider deleted file mode 100644 index 790424df6b..0000000000 --- a/branches/sca-equinox/modules/policy-security/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProvider +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Implementation class for SCA Definitions Providers -org.apache.tuscany.sca.policy.security.SecurityPolicyDefinitionsProvider \ No newline at end of file -- cgit v1.2.3