From 3b85574e96c0845a49c76a8798dbe2cc3a2a96f7 Mon Sep 17 00:00:00 2001 From: rfeng Date: Tue, 14 Oct 2008 20:05:45 +0000 Subject: Add a factory for SCA Definitions and restrict the export-package git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@704653 13f79535-47bb-0310-9956-ffa450edef68 --- branches/sca-equinox/modules/definitions/pom.xml | 5 +++- .../sca/definitions/DefaultDefinitionsFactory.java | 32 ++++++++++++++++++++++ .../sca/definitions/DefinitionsFactory.java | 31 +++++++++++++++++++++ ...ache.tuscany.sca.definitions.DefinitionsFactory | 17 ++++++++++++ 4 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefaultDefinitionsFactory.java create mode 100644 branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefinitionsFactory.java create mode 100644 branches/sca-equinox/modules/definitions/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.DefinitionsFactory (limited to 'branches/sca-equinox/modules/definitions') diff --git a/branches/sca-equinox/modules/definitions/pom.xml b/branches/sca-equinox/modules/definitions/pom.xml index 8e6d0cfebb..e2935c1590 100644 --- a/branches/sca-equinox/modules/definitions/pom.xml +++ b/branches/sca-equinox/modules/definitions/pom.xml @@ -60,7 +60,10 @@ ${tuscany.version} org.apache.tuscany.sca.definitions ${pom.name} - org.apache.tuscany.sca.definitions* + + org.apache.tuscany.sca.definitions, + org.apache.tuscany.sca.definitions.util + diff --git a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefaultDefinitionsFactory.java b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefaultDefinitionsFactory.java new file mode 100644 index 0000000000..8b1df067ba --- /dev/null +++ b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefaultDefinitionsFactory.java @@ -0,0 +1,32 @@ +/* + * 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. + */ +package org.apache.tuscany.sca.definitions; + +import org.apache.tuscany.sca.definitions.impl.SCADefinitionsImpl; + +/** + * Default Implementation of DefinitionsFactory + */ +public class DefaultDefinitionsFactory implements DefinitionsFactory { + + public SCADefinitions createDefinitions() { + return new SCADefinitionsImpl(); + } + +} diff --git a/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefinitionsFactory.java b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefinitionsFactory.java new file mode 100644 index 0000000000..8f9fa3f075 --- /dev/null +++ b/branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefinitionsFactory.java @@ -0,0 +1,31 @@ +/* + * 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. + */ +package org.apache.tuscany.sca.definitions; + +/** + * Factory interface to create SCA definitions model + * + */ +public interface DefinitionsFactory { + /** + * Create an instance of SCA definitions + * @return a new instance of SCA definitions + */ + SCADefinitions createDefinitions(); +} diff --git a/branches/sca-equinox/modules/definitions/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.DefinitionsFactory b/branches/sca-equinox/modules/definitions/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.DefinitionsFactory new file mode 100644 index 0000000000..521d94f518 --- /dev/null +++ b/branches/sca-equinox/modules/definitions/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.DefinitionsFactory @@ -0,0 +1,17 @@ +# 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. +org.apache.tuscany.sca.definitions.DefaultDefinitionsFactory \ No newline at end of file -- cgit v1.2.3