Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2006-01-09 06:54:54 +0000
committerslewis2006-01-09 06:54:54 +0000
commitab190ca0e77c24aa332b547d87f2d6f60f1cc102 (patch)
tree7f3e4d012de8a1003af79df3b48b1ba2bb148d08 /framework/bundles/org.eclipse.ecf/schema
parentc434395769cdf94f2174af9ac6f3c9a628896e67 (diff)
downloadorg.eclipse.ecf-ab190ca0e77c24aa332b547d87f2d6f60f1cc102.tar.gz
org.eclipse.ecf-ab190ca0e77c24aa332b547d87f2d6f60f1cc102.tar.xz
org.eclipse.ecf-ab190ca0e77c24aa332b547d87f2d6f60f1cc102.zip
Added shared object factory extension point and test classes
Diffstat (limited to 'framework/bundles/org.eclipse.ecf/schema')
-rw-r--r--framework/bundles/org.eclipse.ecf/schema/connectionFactory.exsd8
-rw-r--r--framework/bundles/org.eclipse.ecf/schema/containerFactory.exsd10
-rw-r--r--framework/bundles/org.eclipse.ecf/schema/namespace.exsd16
-rw-r--r--framework/bundles/org.eclipse.ecf/schema/sharedObjectFactory.exsd176
4 files changed, 193 insertions, 17 deletions
diff --git a/framework/bundles/org.eclipse.ecf/schema/connectionFactory.exsd b/framework/bundles/org.eclipse.ecf/schema/connectionFactory.exsd
index dfc5e3a79..1fd6fb9d8 100644
--- a/framework/bundles/org.eclipse.ecf/schema/connectionFactory.exsd
+++ b/framework/bundles/org.eclipse.ecf/schema/connectionFactory.exsd
@@ -7,7 +7,7 @@
</appInfo>
<documentation>
This extension allows plugins to register themselves as &apos;providers&apos; of ECF connection factories. Once registered via this extension point, plugins can provide implementations of custom ISynchAsynchConnection instances via the ECF connection factory (&lt;b&gt;org.eclipse.ecf.core.comm.ConnectionFactory&lt;/b&gt;).
-&lt;p&gt;Plugins using this extension point can define new implementation classes of the core ISynchAsynchConnection interface. When client requests are made to ECF to create &lt;b&gt;ISynchAsynchConnection&lt;/b&gt; instances via the ConnectionFactory.makeSynchAsynchConnection() methods, requests to create instances of the appropriate type will be re-directed to the given extension.
+&lt;p&gt;Plugins using this extension point can define new implementation classes of the core ISynchAsynchConnection interface. When client requests are made to ECF to create &lt;b&gt;ISynchAsynchConnection&lt;/b&gt; instances via the ConnectionFactory.createSynchAsynchConnection() methods, requests to create instances of the appropriate type will be re-directed to the given extension.
</documentation>
</annotation>
@@ -77,7 +77,7 @@
<element name="defaultargument">
<annotation>
<documentation>
- Default argument to be passed to makeInstance method. Value of this element (if any) is used to provide a default value for the given argument
+ Default argument to be passed to createInstance method. Value of this element (if any) is used to provide a default value for the given argument
</documentation>
</annotation>
<complexType>
@@ -139,7 +139,7 @@
Here&apos;s an example implementation of this extension point:
&lt;pre&gt;
- public ISynchAsynchConnection makeInstance(ConnectionDescription description,
+ public ISynchAsynchConnection createInstance(ConnectionDescription description,
ISynchAsynchConnectionEventHandler handler, Class[] clazzes,
Object[] args) throws ConnectionInstantiationException {
try {
@@ -174,7 +174,7 @@ Here&apos;s an example implementation of this extension point:
<meta.section type="apiInfo"/>
</appInfo>
<documentation>
- The API for this extension point is provided by the &lt;b&gt;org.eclipse.ecf.core.comm.ContainerFactory&lt;/b&gt; static methods. Specifically, the &apos;makeSynchAsynchConnection&apos; static methods are to be used by clients. The functionality provided by the extension point mechanism can be used at runtime via the &lt;b&gt;ConnectionFactory.addDescription(ConnectionDescription)&lt;/b&gt; method. The available connection factories can be queried with the &lt;b&gt;ConnectionFactory.getDescriptions()&lt;/b&gt; method.
+ The API for this extension point is provided by the &lt;b&gt;org.eclipse.ecf.core.comm.ContainerFactory&lt;/b&gt; static methods. Specifically, the &apos;createSynchAsynchConnection&apos; static methods are to be used by clients. The functionality provided by the extension point mechanism can be used at runtime via the &lt;b&gt;ConnectionFactory.addDescription(ConnectionDescription)&lt;/b&gt; method. The available connection factories can be queried with the &lt;b&gt;ConnectionFactory.getDescriptions()&lt;/b&gt; method.
</documentation>
</annotation>
diff --git a/framework/bundles/org.eclipse.ecf/schema/containerFactory.exsd b/framework/bundles/org.eclipse.ecf/schema/containerFactory.exsd
index b4bc9fde5..c84fcb987 100644
--- a/framework/bundles/org.eclipse.ecf/schema/containerFactory.exsd
+++ b/framework/bundles/org.eclipse.ecf/schema/containerFactory.exsd
@@ -81,7 +81,7 @@
<element name="defaultargument">
<annotation>
<documentation>
- Default argument to be passed to &lt;b&gt;org.eclipse.ecf.core.provider.IContainerInstantiator.makeInstance()&lt;/b&gt; method. Value of this element (if any) is used to indicate a default value for the given argument
+ Default argument to be passed to &lt;b&gt;org.eclipse.ecf.core.provider.IContainerInstantiator.createInstance()&lt;/b&gt; method. Value of this element (if any) is used to indicate a default value for the given argument
</documentation>
</annotation>
<complexType>
@@ -170,7 +170,7 @@ public class FooInstantiator implements IContainerInstantiator {
public FooInstantiator() {
super();
}
- public IContainer makeInstance(ContainerDescription description, Class[] argTypes, Object[] args)
+ public IContainer createInstance(ContainerDescription description, Class[] argTypes, Object[] args)
throws ContainerInstantiationException {
// Create/return instance of FooContainer
// Note that FooContainer class must
@@ -180,14 +180,14 @@ public class FooInstantiator implements IContainerInstantiator {
}
&lt;/pre&gt;
-In this example, the given class implements the &lt;b&gt;IContainerInstantiator&lt;/b&gt;.makeInstance method by creating and returning a new instance of FooInstantiator, a class also defined in the extension plugin. As noted in the code, this class must implement &lt;b&gt;IContainer&lt;/b&gt;, so that it can successfully be returned from makeInstance.
+In this example, the given class implements the &lt;b&gt;IContainerInstantiator&lt;/b&gt;.createInstance method by creating and returning a new instance of FooInstantiator, a class also defined in the extension plugin. As noted in the code, this class must implement &lt;b&gt;IContainer&lt;/b&gt;, so that it can successfully be returned from createInstance.
&lt;h3&gt;Example Usage of Container by Clients&lt;/h3&gt;
Clients that wish to use the &apos;foo&apos; container implementation can do so simply by making the following call to create an &lt;b&gt;IContainer&lt;/b&gt;:
&lt;pre&gt;
-IContainer newContainer = ContainerFactory.getDefault().makeContainer(&apos;foo&apos;);
+IContainer newContainer = ContainerFactory.getDefault().createContainer(&apos;foo&apos;);
// Further use of newContainer instance here
&lt;/pre&gt;
@@ -199,7 +199,7 @@ IContainer newContainer = ContainerFactory.getDefault().makeContainer(&apos;foo&
<meta.section type="apiInfo"/>
</appInfo>
<documentation>
- The API for this extension point is provided by the &lt;b&gt;org.eclipse.ecf.core.ContainerFactory&lt;/b&gt; static methods. Specifically, the &apos;makeContainer&apos; methods are to be used by clients. The functionality provided by the extension point mechanism can be used at runtime via the &lt;b&gt;ContainerFactory.addDescription(ContainerDescription)&lt;/b&gt; method.
+ The API for this extension point is provided by the &lt;b&gt;org.eclipse.ecf.core.ContainerFactory&lt;/b&gt; static methods. Specifically, the &apos;createContainer&apos; methods are to be used by clients. The functionality provided by the extension point mechanism can be used at runtime via the &lt;b&gt;ContainerFactory.addDescription(ContainerDescription)&lt;/b&gt; method.
</documentation>
</annotation>
diff --git a/framework/bundles/org.eclipse.ecf/schema/namespace.exsd b/framework/bundles/org.eclipse.ecf/schema/namespace.exsd
index 1031d90dc..3c4736129 100644
--- a/framework/bundles/org.eclipse.ecf/schema/namespace.exsd
+++ b/framework/bundles/org.eclipse.ecf/schema/namespace.exsd
@@ -109,25 +109,25 @@ import org.eclipse.ecf.core.identity.Namespace;
public class FooNamespace extends
org.eclipse.ecf.core.identity.Namespace {
- public ID makeInstance(Class[] argTypes, Object[] args)
+ public ID createInstance(Class[] argTypes, Object[] args)
throws IDInstantiationException {
return new FooID((String) args[0]);
}
}
&lt;/pre&gt;
-In this example, the FooNamespace class implements the abstract &lt;b&gt;Namesapce&lt;/b&gt;.makeInstance method by creating and returning a new instance of FooID, a class also defined by the extension plugin. This class must implement &lt;b&gt;ID&lt;/b&gt;, so that it can successfully be returned from the Namespace.makeInstance call.
+In this example, the FooNamespace class implements the abstract &lt;b&gt;Namesapce&lt;/b&gt;.createInstance method by creating and returning a new instance of FooID, a class also defined by the extension plugin. This class must implement &lt;b&gt;ID&lt;/b&gt;, so that it can successfully be returned from the Namespace.createInstance call.
&lt;h3&gt;Example Usage of IDFactory by Clients&lt;/h3&gt;
Clients that wish to use the &apos;testnamespace&apos; Namespace implementation can do so simply by making the following call to create an &lt;b&gt;IDFactory&lt;/b&gt;:
&lt;pre&gt;
-ID newID = IDFactory.getDefault().makeID(&quot;testnamespace&quot;,&quot;email@emailserver.com&quot;);
+ID newID = IDFactory.getDefault().createID(&quot;testnamespace&quot;,&quot;email@emailserver.com&quot;);
&lt;/pre&gt;
Another example would be:
&lt;pre&gt;
-ID newID = IDFactory.getDefault().makeID(new URI(&quot;testnamespace:email@emailserver.com&quot;));
+ID newID = IDFactory.getDefault().createID(new URI(&quot;testnamespace:email@emailserver.com&quot;));
&lt;/pre&gt;
</documentation>
</annotation>
@@ -137,7 +137,7 @@ ID newID = IDFactory.getDefault().makeID(new URI(&quot;testnamespace:email@email
<meta.section type="apiInfo"/>
</appInfo>
<documentation>
- The client API for this extension point is provided by the &lt;b&gt;org.eclipse.ecf.core.IIDFactory.makeID&lt;/b&gt; methods. A valid IIDFactory is provided by the by the static &lt;b&gt;org.eclipse.ecf.core.identityIDFactory.getDefault()&lt;/b&gt; method.
+ The client API for this extension point is provided by the &lt;b&gt;org.eclipse.ecf.core.IIDFactory.createID&lt;/b&gt; methods. A valid IIDFactory is provided by the by the static &lt;b&gt;org.eclipse.ecf.core.identityIDFactory.getDefault()&lt;/b&gt; method.
</documentation>
</annotation>
@@ -151,7 +151,7 @@ ID newID = IDFactory.getDefault().makeID(new URI(&quot;testnamespace:email@email
StringID -- A namespace of ID instances that are implemented by &lt;b&gt;org.eclipse.ecf.core.identity.StringID&lt;/b&gt;
&lt;p&gt;Clients may use this namespace with calls to:
&lt;pre&gt;
-ID newID = org.eclipse.ecf.core.identity.IDFactory.makeStringID(&apos;idstringvalue&apos;);
+ID newID = org.eclipse.ecf.core.identity.IDFactory.createStringID(&apos;idstringvalue&apos;);
&lt;/pre&gt;
&lt;/p&gt;
&lt;/p&gt;
@@ -159,7 +159,7 @@ ID newID = org.eclipse.ecf.core.identity.IDFactory.makeStringID(&apos;idstringva
LongID -- A namespace of ID instances that are implemented by &lt;b&gt;org.eclipse.ecf.core.identity.LongID&lt;/b&gt;
&lt;p&gt;Clients may use this namespace with calls to:
&lt;pre&gt;
-ID newID = org.eclipse.ecf.core.identity.IDFactory.makeLongID(2004L);
+ID newID = org.eclipse.ecf.core.identity.IDFactory.createLongID(2004L);
&lt;/pre&gt;
&lt;/p&gt;
&lt;/p&gt;
@@ -167,7 +167,7 @@ ID newID = org.eclipse.ecf.core.identity.IDFactory.makeLongID(2004L);
GUID -- A namespace of ID instances that are implemented by &lt;b&gt;org.eclipse.ecf.core.identity.GUID&lt;/b&gt;
&lt;p&gt;Clients may use this namespace with calls to:
&lt;pre&gt;
-ID newID = org.eclipse.ecf.core.identity.IDFactory.makeGUID(16);
+ID newID = org.eclipse.ecf.core.identity.IDFactory.createGUID(16);
&lt;/pre&gt;
&lt;/p&gt;
&lt;/p&gt;
diff --git a/framework/bundles/org.eclipse.ecf/schema/sharedObjectFactory.exsd b/framework/bundles/org.eclipse.ecf/schema/sharedObjectFactory.exsd
new file mode 100644
index 000000000..ae4db994f
--- /dev/null
+++ b/framework/bundles/org.eclipse.ecf/schema/sharedObjectFactory.exsd
@@ -0,0 +1,176 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.ecf">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.ecf" id="sharedObjectFactory" name="ECF Container Factory"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="sharedObjectFactory" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="sharedObjectFactory">
+ <complexType>
+ <sequence>
+ <element ref="defaultargument" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="property" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The class implementing the sharedObjectFactory extension point. The given class must implement the &lt;b&gt;org.eclipse.ecf.core.provider.ISharedObjectInstantiator&lt;/b&gt; interface
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ An optional name for the extension. If no name is explicitly provided by the extension, the sharedObjectFactory class name is used as the name. Note that this name must &lt;b&gt;not&lt;/b&gt; conflict with any other name in the ECF SharedObjectFactory in order to be successfully registered. Care should therefore be taken in selection of a name such that it does not conflict with other pre-existing names for this factory implementations
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="defaultargument">
+ <annotation>
+ <documentation>
+ Default argument to be passed to &lt;b&gt;org.eclipse.ecf.core.provider.ISharedObjectInstantiator.createInstance()&lt;/b&gt; method. Value of this element (if any) is used to indicate a default value for the given argument
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="type" type="string">
+ <annotation>
+ <documentation>
+ The fully qualified type of the default argument
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="value" type="string">
+ <annotation>
+ <documentation>
+ The value for the default argument
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ An optional name for the defaultargument element
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="property">
+ <annotation>
+ <documentation>
+ Property (name,value) associated with SharedObjectDescription
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ The name of the property
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="value" type="string" use="required">
+ <annotation>
+ <documentation>
+ The value of the property
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ 0.6.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ The API for this extension point is provided by the &lt;b&gt;org.eclipse.ecf.core.SharedObjectFactory&lt;/b&gt; static methods. Specifically, the &apos;createSharedObject&apos; methods are to be used by clients. The functionality provided by the extension point mechanism can be used at runtime via the &lt;b&gt;SharedObjectFactory.addDescription(SharedObjectDescription)&lt;/b&gt; method.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Copyright (c) 2004 Composent, Inc. and others.
+All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: Composent, Inc. - initial API and implementation
+ </documentation>
+ </annotation>
+
+</schema>

Back to the top