summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/modules/definitions/src
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-10-14 20:05:45 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-10-14 20:05:45 +0000
commit3b85574e96c0845a49c76a8798dbe2cc3a2a96f7 (patch)
treec9b79cf8d347bf83ba8384fb18928359e0cf3589 /branches/sca-equinox/modules/definitions/src
parent8330f72816dd0da822a8f784026b358ac70cb6b9 (diff)
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
Diffstat (limited to 'branches/sca-equinox/modules/definitions/src')
-rw-r--r--branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefaultDefinitionsFactory.java32
-rw-r--r--branches/sca-equinox/modules/definitions/src/main/java/org/apache/tuscany/sca/definitions/DefinitionsFactory.java31
-rw-r--r--branches/sca-equinox/modules/definitions/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.DefinitionsFactory17
3 files changed, 80 insertions, 0 deletions
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