Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "COSMOS Design 208274"

(COSMOS Toolkit/SDK)
(COSMOS Toolkit/SDK)
Line 17: Line 17:
 
* Decide on project multiplicity, e.g. one for client, one for server etc...
 
* Decide on project multiplicity, e.g. one for client, one for server etc...
 
* What other things are available, e.g. STP or WTP may have annotations for web services.
 
* What other things are available, e.g. STP or WTP may have annotations for web services.
 +
 +
<br><br>
 +
==Initial Design==
 +
 +
'''To create a new MDR'''
 +
 +
'''File/New/Cosmos/'''
 +
 +
Projects
 +
Create MDR Project
 +
<ol>
 +
<li> Creates org.eclips.cosmos.*mdrname.mdr project
 +
<li> Creates org.eclips.cosmos.*mdrname.mdr.test junit project
 +
<li> Creates Activator.java
 +
<li> Creates *mdrnameMdr.java
 +
<li> Creates Junit test *mdrnameTest.java
 +
<li> Create config.proprties
 +
<li> Create domainEPR.xml
 +
<li> Create MANIFEST.MF
 +
 +
 +
<li> Creates Plug-in Dependencies
 +
<ol>
 +
<li> org.apache.xerces_2.8.0*
 +
<li> org.apache.xml.resolver*
 +
<li> muse-complete-2.2.0.jar
 +
<li> org.eclipse.osgi_3.3.2.R33x*
 +
<li> org.eclipse.cosmos.common
 +
<li> org.eclipse.dc.cmdbf.services
 +
<li> org.eclipse.dc.dataManager
 +
<li> org.eclipse.dc.mdr
 +
<li> org.eclipse.dc.mdr.common
 +
<li> org.eclipse.cosmos.management.common
 +
<li> org.eclipse.cosmos.samples.cmdbf.services
 +
</ol>
 +
</ol>
 +
 +
 +
 +
'''Create Mdr Properties Wizard.'''
 +
 +
When the 'Create Mdr' wizard is launched, the following properties can be set:
 +
<ol>
 +
<li>MdrName
 +
<li>Resouce_ID
 +
<li>Display Name
 +
<li>Description
 +
<li>Management Domain EPR file name
 +
<li>Machine and port
 +
<li>Deployment target (Tomcat/OSGI)
 +
</ol>
 +
 +
 +
'''Mdr Project Details:'''
 +
 +
Activator.java
 +
<pre>
 +
package org.eclipse.cosmos.*mdrname.mdr;
 +
 +
import org.eclipse.cosmos.dc.dataManager.api.IDataManager;
 +
import org.eclipse.cosmos.dc.dataManager.impl.AbstractDataManagerActivator;
 +
 +
public class Activator extends AbstractDataManagerActivator {
 +
 +
@Override
 +
protected IDataManager getDataManagerInstance() {
 +
return new *MdrnameMdr();
 +
}
 +
 +
}
 +
</pre>
 +
 +
'''*MdrnameMdr.java'''
 +
<pre>
 +
package org.eclipse.cosmos.*mdrname.mdr;
 +
 +
import org.eclipse.cosmos.dc.cmdbf.services.query.service.IQueryHandlerFactory;
 +
import org.eclipse.cosmos.dc.dataManager.api.IDataManager;
 +
import org.eclipse.cosmos.dc.mdr.api.IMdrQuery;
 +
import org.eclipse.cosmos.dc.mdr.impl.AbstractMdr;
 +
import org.eclipse.cosmos.dc.mgmt.annotations.ManagedResource;
 +
import org.eclipse.cosmos.samples.cmdbf.services.query.ICMDBfSampleConstants;
 +
import org.eclipse.cosmos.samples.cmdbf.services.query.QueryHandlerFactory;
 +
import org.eclipse.cosmos.samples.cmdbf.services.query.XMLRepository;
 +
 +
@ManagedResource
 +
public class *MdrnameMdr extends AbstractMdr implements IDataManager, IMdrQuery
 +
{
 +
public ExampleMdr()
 +
{
 +
}
 +
 +
@Override
 +
public IQueryHandlerFactory getQueryHandlerFactory()
 +
{
 +
return QueryHandlerFactory.getInstance();
 +
}
 +
 +
}
 +
</pre>
 +
 +
'''config.properties'''
 +
<pre>
 +
RESOURCE_ID=Example
 +
DISPLAY_NAME=MDR Example
 +
DESCRIPTION=An example of an MDR
 +
MGMT_DOMAIN_EPR_FILE=META-INF/domainEPR.xml
 +
</pre>
 +
 +
'''domainEPR.xml'''
 +
<pre>
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
 +
    <wsa:Address>http://localhost:8080/cosmos/services/domain</wsa:Address>
 +
</wsa:EndpointReference>
 +
</pre>
 +
 +
'''MANIFEST.MF'''
 +
<pre>
 +
Manifest-Version: 1.0
 +
Bundle-ManifestVersion: 2
 +
Bundle-Name: Example MDR
 +
Bundle-SymbolicName: org.eclipse.cosmos.*mdrname.mdr
 +
Bundle-Version: 1.0.0
 +
Bundle-Activator: org.eclipse.cosmos.*mdrname.mdr.Activator
 +
Import-Package: org.osgi.framework;version="1.3.0"
 +
Require-Bundle: org.eclipse.cosmos.dc.mdr,
 +
org.apache.xerces,
 +
org.eclipse.cosmos.common,
 +
org.eclipse.cosmos.dc.cmdbf.services,
 +
org.apache.muse.complete,
 +
org.eclipse.cosmos.samples.cmdbf.services
 +
Export-Package: org.eclipse.cosmos.*mdrname.mdr
 +
</pre>
 +
  
  
  
 
[[Category:COSMOS_Bugzilla_Designs]]
 
[[Category:COSMOS_Bugzilla_Designs]]

Revision as of 08:23, 18 January 2008

WIP

https://bugs.eclipse.org/bugs/show_bug.cgi?id=208274

COSMOS Toolkit/SDK

  • Development environment - install a number of plugins into eclipse workbench
  • Include examples and documentation on how to extend the COSMOS framework.
  • Developers will create extensions to the COSMOS framework in the eclipse workbench environment.
  • Testing environment: WSDM Tooling allows the launching of endpoints within eclipse
  • Export the end result into deployment enviroment
    • J2EE, OSGi
    • Server component
    • Client component


Design Considerations

  • Decide on project multiplicity, e.g. one for client, one for server etc...
  • What other things are available, e.g. STP or WTP may have annotations for web services.



Initial Design

To create a new MDR

File/New/Cosmos/

Projects Create MDR Project

  1. Creates org.eclips.cosmos.*mdrname.mdr project
  2. Creates org.eclips.cosmos.*mdrname.mdr.test junit project
  3. Creates Activator.java
  4. Creates *mdrnameMdr.java
  5. Creates Junit test *mdrnameTest.java
  6. Create config.proprties
  7. Create domainEPR.xml
  8. Create MANIFEST.MF
  9. Creates Plug-in Dependencies
    1. org.apache.xerces_2.8.0*
    2. org.apache.xml.resolver*
    3. muse-complete-2.2.0.jar
    4. org.eclipse.osgi_3.3.2.R33x*
    5. org.eclipse.cosmos.common
    6. org.eclipse.dc.cmdbf.services
    7. org.eclipse.dc.dataManager
    8. org.eclipse.dc.mdr
    9. org.eclipse.dc.mdr.common
    10. org.eclipse.cosmos.management.common
    11. org.eclipse.cosmos.samples.cmdbf.services


Create Mdr Properties Wizard.

When the 'Create Mdr' wizard is launched, the following properties can be set:

  1. MdrName
  2. Resouce_ID
  3. Display Name
  4. Description
  5. Management Domain EPR file name
  6. Machine and port
  7. Deployment target (Tomcat/OSGI)


Mdr Project Details:

Activator.java

package org.eclipse.cosmos.*mdrname.mdr;

import org.eclipse.cosmos.dc.dataManager.api.IDataManager;
import org.eclipse.cosmos.dc.dataManager.impl.AbstractDataManagerActivator;

public class Activator extends AbstractDataManagerActivator {

	@Override
	protected IDataManager getDataManagerInstance() {
		return new *MdrnameMdr();
	}

}

*MdrnameMdr.java

package org.eclipse.cosmos.*mdrname.mdr;

import org.eclipse.cosmos.dc.cmdbf.services.query.service.IQueryHandlerFactory;
import org.eclipse.cosmos.dc.dataManager.api.IDataManager;
import org.eclipse.cosmos.dc.mdr.api.IMdrQuery;
import org.eclipse.cosmos.dc.mdr.impl.AbstractMdr;
import org.eclipse.cosmos.dc.mgmt.annotations.ManagedResource;
import org.eclipse.cosmos.samples.cmdbf.services.query.ICMDBfSampleConstants;
import org.eclipse.cosmos.samples.cmdbf.services.query.QueryHandlerFactory;
import org.eclipse.cosmos.samples.cmdbf.services.query.XMLRepository;

@ManagedResource
public class *MdrnameMdr extends AbstractMdr implements IDataManager, IMdrQuery 
{	
	public ExampleMdr() 
	{
	}

	@Override
	public IQueryHandlerFactory getQueryHandlerFactory() 
	{
		return QueryHandlerFactory.getInstance();
	}

}

config.properties

RESOURCE_ID=Example
DISPLAY_NAME=MDR Example
DESCRIPTION=An example of an MDR
MGMT_DOMAIN_EPR_FILE=META-INF/domainEPR.xml

domainEPR.xml

<?xml version="1.0" encoding="UTF-8"?>
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:Address>http://localhost:8080/cosmos/services/domain</wsa:Address>
</wsa:EndpointReference>

MANIFEST.MF

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Example MDR
Bundle-SymbolicName: org.eclipse.cosmos.*mdrname.mdr
Bundle-Version: 1.0.0
Bundle-Activator: org.eclipse.cosmos.*mdrname.mdr.Activator
Import-Package: org.osgi.framework;version="1.3.0"
Require-Bundle: org.eclipse.cosmos.dc.mdr,
 org.apache.xerces,
 org.eclipse.cosmos.common,
 org.eclipse.cosmos.dc.cmdbf.services,
 org.apache.muse.complete,
 org.eclipse.cosmos.samples.cmdbf.services
Export-Package: org.eclipse.cosmos.*mdrname.mdr

Back to the top