Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

COSMOS Design 208274

Revision as of 17:25, 22 January 2008 by David whiteman.us.ibm.com (Talk | contribs) ('''Change History''')

Create a data manager toolkit that will allow adopters to easily register and use a data provider inside COSMOS framework

This is the design document for bugzilla 208274.

Change History

Name: Date: Revised Sections:
Mark Weitzel and Hubert Leung 11/7/2007
  • Initial version
Martin Simmonds 1/18/2008
  • Initial design details of project wizard
David Whiteman 1/22/2008
  • Added rest of design template
  • Added screen mockups

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 Data Manager project

File/New/Cosmos/

  • Projects
    • Create Data Manager Project
      • Creates org.eclipse.cosmos.*mdrname.mdr project
      • Creates org.eclipse.cosmos.*mdrname.mdr.test junit project
      • Creates Activator.java
      • Creates *mdrnameMdr.java
      • Creates Junit test *mdrnameTest.java
      • Create config.proprties
      • Create domainEPR.xml
      • Create MANIFEST.MF
      • Creates Plug-in Dependencies
        • org.apache.xerces_2.8.0*
        • org.apache.xml.resolver*
        • muse-complete-2.2.0.jar
        • org.eclipse.osgi_3.3.2.R33x*
        • org.eclipse.cosmos.common
        • org.eclipse.dc.cmdbf.services
        • org.eclipse.dc.dataManager
        • org.eclipse.dc.mdr
        • org.eclipse.dc.mdr.common
        • org.eclipse.cosmos.management.common
        • org.eclipse.cosmos.samples.cmdbf.services


Create Data Manager Project Wizard.

When the 'Create Data Manager' project wizard is launched, the following properties can be set:

  1. MdrName
  2. Resource_ID
  3. Display Name
  4. Description
  5. Deployment target (Tomcat/OSGI)
  6. Whether a CMDBf query service or registration service (or both) is to be implemented


Data Manager Project Details:

Activator.java

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

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 *MdrnameDataManager();
	}

}

*MdrnameDataManager.java

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

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