diff options
author | slewis | 2006-01-09 06:54:54 +0000 |
---|---|---|
committer | slewis | 2006-01-09 06:54:54 +0000 |
commit | ab190ca0e77c24aa332b547d87f2d6f60f1cc102 (patch) | |
tree | 7f3e4d012de8a1003af79df3b48b1ba2bb148d08 /framework/bundles/org.eclipse.ecf/schema | |
parent | c434395769cdf94f2174af9ac6f3c9a628896e67 (diff) | |
download | org.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')
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 'providers' of ECF connection factories. Once registered via this extension point, plugins can provide implementations of custom ISynchAsynchConnection instances via the ECF connection factory (<b>org.eclipse.ecf.core.comm.ConnectionFactory</b>).
-<p>Plugins using this extension point can define new implementation classes of the core ISynchAsynchConnection interface. When client requests are made to ECF to create <b>ISynchAsynchConnection</b> instances via the ConnectionFactory.makeSynchAsynchConnection() methods, requests to create instances of the appropriate type will be re-directed to the given extension.
+<p>Plugins using this extension point can define new implementation classes of the core ISynchAsynchConnection interface. When client requests are made to ECF to create <b>ISynchAsynchConnection</b> 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's an example implementation of this extension point:
<pre>
- public ISynchAsynchConnection makeInstance(ConnectionDescription description,
+ public ISynchAsynchConnection createInstance(ConnectionDescription description,
ISynchAsynchConnectionEventHandler handler, Class[] clazzes,
Object[] args) throws ConnectionInstantiationException {
try {
@@ -174,7 +174,7 @@ Here's an example implementation of this extension point: <meta.section type="apiInfo"/>
</appInfo>
<documentation>
- The API for this extension point is provided by the <b>org.eclipse.ecf.core.comm.ContainerFactory</b> static methods. Specifically, the 'makeSynchAsynchConnection' static methods are to be used by clients. The functionality provided by the extension point mechanism can be used at runtime via the <b>ConnectionFactory.addDescription(ConnectionDescription)</b> method. The available connection factories can be queried with the <b>ConnectionFactory.getDescriptions()</b> method.
+ The API for this extension point is provided by the <b>org.eclipse.ecf.core.comm.ContainerFactory</b> static methods. Specifically, the 'createSynchAsynchConnection' static methods are to be used by clients. The functionality provided by the extension point mechanism can be used at runtime via the <b>ConnectionFactory.addDescription(ConnectionDescription)</b> method. The available connection factories can be queried with the <b>ConnectionFactory.getDescriptions()</b> 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 <b>org.eclipse.ecf.core.provider.IContainerInstantiator.makeInstance()</b> method. Value of this element (if any) is used to indicate a default value for the given argument
+ Default argument to be passed to <b>org.eclipse.ecf.core.provider.IContainerInstantiator.createInstance()</b> 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 { }
</pre>
-In this example, the given class implements the <b>IContainerInstantiator</b>.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 <b>IContainer</b>, so that it can successfully be returned from makeInstance.
+In this example, the given class implements the <b>IContainerInstantiator</b>.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 <b>IContainer</b>, so that it can successfully be returned from createInstance.
<h3>Example Usage of Container by Clients</h3>
Clients that wish to use the 'foo' container implementation can do so simply by making the following call to create an <b>IContainer</b>:
<pre>
-IContainer newContainer = ContainerFactory.getDefault().makeContainer('foo');
+IContainer newContainer = ContainerFactory.getDefault().createContainer('foo');
// Further use of newContainer instance here
</pre>
@@ -199,7 +199,7 @@ IContainer newContainer = ContainerFactory.getDefault().makeContainer('foo& <meta.section type="apiInfo"/>
</appInfo>
<documentation>
- The API for this extension point is provided by the <b>org.eclipse.ecf.core.ContainerFactory</b> static methods. Specifically, the 'makeContainer' methods are to be used by clients. The functionality provided by the extension point mechanism can be used at runtime via the <b>ContainerFactory.addDescription(ContainerDescription)</b> method.
+ The API for this extension point is provided by the <b>org.eclipse.ecf.core.ContainerFactory</b> static methods. Specifically, the 'createContainer' methods are to be used by clients. The functionality provided by the extension point mechanism can be used at runtime via the <b>ContainerFactory.addDescription(ContainerDescription)</b> 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]);
}
}
</pre>
-In this example, the FooNamespace class implements the abstract <b>Namesapce</b>.makeInstance method by creating and returning a new instance of FooID, a class also defined by the extension plugin. This class must implement <b>ID</b>, so that it can successfully be returned from the Namespace.makeInstance call.
+In this example, the FooNamespace class implements the abstract <b>Namesapce</b>.createInstance method by creating and returning a new instance of FooID, a class also defined by the extension plugin. This class must implement <b>ID</b>, so that it can successfully be returned from the Namespace.createInstance call.
<h3>Example Usage of IDFactory by Clients</h3>
Clients that wish to use the 'testnamespace' Namespace implementation can do so simply by making the following call to create an <b>IDFactory</b>:
<pre>
-ID newID = IDFactory.getDefault().makeID("testnamespace","email@emailserver.com");
+ID newID = IDFactory.getDefault().createID("testnamespace","email@emailserver.com");
</pre>
Another example would be:
<pre>
-ID newID = IDFactory.getDefault().makeID(new URI("testnamespace:email@emailserver.com"));
+ID newID = IDFactory.getDefault().createID(new URI("testnamespace:email@emailserver.com"));
</pre>
</documentation>
</annotation>
@@ -137,7 +137,7 @@ ID newID = IDFactory.getDefault().makeID(new URI("testnamespace:email@email <meta.section type="apiInfo"/>
</appInfo>
<documentation>
- The client API for this extension point is provided by the <b>org.eclipse.ecf.core.IIDFactory.makeID</b> methods. A valid IIDFactory is provided by the by the static <b>org.eclipse.ecf.core.identityIDFactory.getDefault()</b> method.
+ The client API for this extension point is provided by the <b>org.eclipse.ecf.core.IIDFactory.createID</b> methods. A valid IIDFactory is provided by the by the static <b>org.eclipse.ecf.core.identityIDFactory.getDefault()</b> method.
</documentation>
</annotation>
@@ -151,7 +151,7 @@ ID newID = IDFactory.getDefault().makeID(new URI("testnamespace:email@email StringID -- A namespace of ID instances that are implemented by <b>org.eclipse.ecf.core.identity.StringID</b>
<p>Clients may use this namespace with calls to:
<pre>
-ID newID = org.eclipse.ecf.core.identity.IDFactory.makeStringID('idstringvalue');
+ID newID = org.eclipse.ecf.core.identity.IDFactory.createStringID('idstringvalue');
</pre>
</p>
</p>
@@ -159,7 +159,7 @@ ID newID = org.eclipse.ecf.core.identity.IDFactory.makeStringID('idstringva LongID -- A namespace of ID instances that are implemented by <b>org.eclipse.ecf.core.identity.LongID</b>
<p>Clients may use this namespace with calls to:
<pre>
-ID newID = org.eclipse.ecf.core.identity.IDFactory.makeLongID(2004L);
+ID newID = org.eclipse.ecf.core.identity.IDFactory.createLongID(2004L);
</pre>
</p>
</p>
@@ -167,7 +167,7 @@ ID newID = org.eclipse.ecf.core.identity.IDFactory.makeLongID(2004L); GUID -- A namespace of ID instances that are implemented by <b>org.eclipse.ecf.core.identity.GUID</b>
<p>Clients may use this namespace with calls to:
<pre>
-ID newID = org.eclipse.ecf.core.identity.IDFactory.makeGUID(16);
+ID newID = org.eclipse.ecf.core.identity.IDFactory.createGUID(16);
</pre>
</p>
</p>
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 <b>org.eclipse.ecf.core.provider.ISharedObjectInstantiator</b> 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 <b>not</b> 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 <b>org.eclipse.ecf.core.provider.ISharedObjectInstantiator.createInstance()</b> 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 <b>org.eclipse.ecf.core.SharedObjectFactory</b> static methods. Specifically, the 'createSharedObject' methods are to be used by clients. The functionality provided by the extension point mechanism can be used at runtime via the <b>SharedObjectFactory.addDescription(SharedObjectDescription)</b> 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> |