Approach | 28 |Pros | 29 |Cons | 30 |
---|---|---|
Native approach | 35 |
36 |
|
41 |
42 |
|
48 |
Plugin approach | 51 |
52 |
|
56 |
57 |
|
62 |
65 | Adapter approach | 66 |
67 |
|
72 |
73 |
|
78 |
In older versions of this tutorial and Bugzilla adapter, we defined many individual servlets in the application's web.xml
file; now, the OSLC4J Bugzilla adapter uses JAX-RS to handle URLs, requests, and resources.
2 | 3 |
4 | 5 | Open Services for Lifecycle Collaboration (OSLC) is an initiative to define standards that enable easier and more effective integrations between the many tools that software and product developers use. OSLC is a different approach to tool integration that seeks to integrate the resources managed by those tools into the web of data. OSLC uses variety of web integration patterns, which are all either based on or complementary to what the World Wide Web Consortium (W3C) calls [Linked Data](http://www.w3.org/standards/semanticweb/data). 6 | 7 | To learn more about core OSLC concepts and architectural underpinnings, read the [OSLC Primer](https://open-services.net/resources/oslc-primer). We'll be implementing many of these core resources and services in this tutorial. 8 | 9 | For more information on the value of integrating with open protocols, read our whitepaper ["The Case for Open Services"](https://archive.open-services.net/resources/whitepapers/the-case-for-open-services/). 10 | 11 | Next: [Downloading and starting the sample applications](running_the_examples) 12 | 13 | -------------------------------------------------------------------------------- /_harp/integrating_products_with_oslc/running_the_examples.md: -------------------------------------------------------------------------------- 1 | ## Running the example applications 2 | 3 | This section explains how to setup the development environment to run the OSLC4J Bugzilla Adapter and the NinaCRM example application. 4 | 5 | ## Environment Setup 6 | 7 | Make sure your environment is set up for Lyo development as instructed on [Eclipse Setup for Lyo-based Development](../eclipse_lyo/eclipse-setup-for-lyo-based-development). The tutorial requires JDK 8 to be used. The code may run on JDK 11 with the warnings, and certain parts may fail to run on JDK 17 as of 2022-05. 8 | 9 | ## Bugzilla Setup 10 | 11 | Unless you have a Bugzilla system (with admin access) you can integrate against, you need to setup a running [Bugzilla system using Docker](https://hub.docker.com/r/smarx008/bugzilla-dev-lyo) for the purposes of this tutorial. 12 | 13 | 1. [Set up your Docker environment](https://docs.docker.com/get-started/). This is beyond the scope of this tutorial. You should be able to use [Rancher Desktop](https://rancherdesktop.io/) as well. 14 | 15 | 1. Launch the Bugzilla container that will be destroyed once you stop it: 16 | ```bash 17 | docker run --rm -p 80:80 --name bugzilla-dev smarx008/bugzilla-dev-lyo 18 | ``` 19 | 20 | 1. You can now browse to the Bugzilla homepage at http://localhost/bugzilla and use `admin:password` as admin credentials. 21 | 22 | ## Importing the tutorial projects into Eclipse 23 | 24 | The [Lyo documentation](https://github.com/eclipse/lyo.docs) Git repository contains the necessary code for this tutorial, while https://github.com/OSLC/lyo-adaptor-ninacrm contains the sample application, NinaCRM, which is used to demonstrate how a 3rd-party tool would integrate with a newly developed OSLC Server. **The finished OSLC Server can be found under [OSLC/lyo-adaptor-bugzilla](https://github.com/OSLC/lyo-adaptor-bugzilla)** 25 | 26 | 1. Clone the [Lyo documentation](https://github.com/eclipse/lyo.docs) Git repository 27 | 1. In Eclipse, open the Git Repositories view. (**Window** → **Show View** → **Other**, search for `Git repo` and click **OK**.) 28 | 2. Click **Clone a Git Repository**. 29 | 3. In the Clone Git Repository window, in the **URI** field paste the following [https://github.com/eclipse/lyo.docs](https://github.com/eclipse/lyo.docs). The **Host** and **Repository** fields will autofill. Leave the **Username** and **Password** fields empty. 30 | 4. Click **Next**. 31 | 5. On the Branch Selection page, select **master** and click **Next**. 32 | 6. For the **Destination**, select a folder for the files or accept the default of your Eclipse workspace. 33 | 7. Click **Finish**. `lyo.docs` will appear in the Git Repositories view. 34 | 35 | 2. Next, import the tutorial projects into Eclipse 36 | 1. In Eclipse, switch to the Java perspective. (**Window** → **Perspective** → **Open Perspective** → **Java**) 37 | 1. Open the Project Explorer view. (**Window** → **Show View** → **Project Explorer**) 38 | 1. Select **File** → **Import...** 39 | 1. In the Import dialog that appears select **Maven** → **Existing Maven Projects**, and click **Next**. 40 | 1. Browse to the root directory of the recently cloned git repository. 41 | 1. Select the project **./lyo.docs/lyo-rest-workshop/Lab6** from the `lyo.docs` repo and click **Finish**. 42 | 1. Repeat the steps above for the **./lyo-adaptor-ninacrm** project from the `lyo-adaptor-ninacrm` repo. 43 | 44 | ## Configuring the Bugzilla adapter 45 | 46 | Configure the Bugzilla adapter to point to your Bugzilla application. 47 | 48 | 1. In the Project Explorer view, find and edit the file `src/main/resources/bugz.properties` in the Lab6 project. 49 | 1. Edit the `bugzilla_uri` property to the URL of your Bugzilla server. If you’re using the Bugzilla docker container, it will be: 50 | `bugzilla_uri=http://localhost/bugzilla` 51 | 1. For the `admin` property, provide your Bugzilla user ID. 52 | 1. Save `bugz.properties`. 53 | 54 | ## Update the applications 55 | 56 | Update the project configurations for the projects. 57 | 58 | 1. In Eclipse, open the Package Explorer view. (**Window** → **Show View** → **Package Explorer**) 59 | 2. In the Package Explorer view, select the following packages: 60 | 61 | * **ninacrm** 62 | * **oslc4j-bugzilla-sample-lab6** 63 | 64 | 3. Right-click and select **Maven** → **Update Project**. 65 | 4. In the Update Maven Project window, verify that those projects are selected and click **OK**. 66 | 67 | ## Running the sample applications 68 | 69 | ### Starting the OSLC4J Bugzilla adapter: 70 | 71 | 1. In the Package Explorer view, expand **Lab6**. 72 | 2. Find the file **pom.xml** 73 | 3. Right-click on **pom.xml** and select **Run as** → **Maven Build...**. 74 | 4. Enter **jetty:run** in the **Goals** field. 75 | 5. Select **Run** 76 | 77 | This will start the application. You will see a lot of messages in the Console view. The application will be running when you see this: 78 | 79 | [INFO] Started Jetty Server 80 | [INFO] Starting scanner at interval of 5 seconds. 81 | 82 | In your web browser navigate to the OSLC Catalog at [http://localhost:8080/OSLC4JBugzilla/services/catalog/singleton](http://localhost:8080/OSLC4JBugzilla/services/catalog/singleton) 83 | 84 | Log in with your Bugzilla user ID and password. 85 | 86 | ### Starting NinaCRM 87 | 88 | 1. In the Package Explorer view, expand **ninacrm**. 89 | 2. Find the file **pom.xml** 90 | 3. Right-click on **pom.xml** and select **Run as** → **Maven Build...**. 91 | 4. Enter **jetty:run** in the **Goals** field. 92 | 5. Select **Run** 93 | 94 | This will start the application. You will see a lot of messages in the Console view. The application will be running when you see this: 95 | 96 | [INFO] Started Jetty Server 97 | [INFO] Starting scanner at interval of 5 seconds. 98 | 99 | 100 | When the server starts, in your web browser navigate to [http://localhost:8181/ninacrm](http://localhost:8181/ninacrm) to see the NinaCRM example. 101 | 102 | Next: [Part 1, turning Bugzilla into a provider of the Change Management OSLC specification](implementing_an_oslc_provider/1_0_implementing_a_provider) 103 | -------------------------------------------------------------------------------- /_harp/iotp-adaptor-sample.md: -------------------------------------------------------------------------------- 1 | iotp-adaptor is a partial implementation of an OSLC adapter for IBM Watson IoT Platform resources developed using eclipse/Lyo Designer. This adaptor provides an example of how to build an OSLC adaptor using [Lyo Designer](https://github.com/eclipse/lyo.designer/wiki), and how to customize the generated adaptor to expose Watson IoT Platform resources through OSLC capabilities and enable integration with IBM's jazz.net based [Continuous Engineering](https://jazz.net/products/continuous-engineering-solution/) solution. 2 | 3 | The [iotp-adaptor project](https://github.com/OSLC/iotp-adaptor) provides source code for a subset of [IBM Rational Engineering Lifecycle Manager](https://jazz.net/products/rational-engineering-lifecycle-manager/) (CE) version 6.0.6. The intent of providing this source code and documentation is help others who are developing OSLC integrations with IBM offerings. The [Developer Guide](./iotp_adaptor/developer-guide) provides the additional information you need to integrate OSLC clients and servers with the IBM jazz-based applications. This includes: 4 | 5 | * Providing a rootservices document for discovering server discovery capabilities 6 | * Establishing Consumer/Friend relationships using OAuth to allow servers to interact 7 | * Creating project area artifact container associations to enable linking between jazz.net CE tools and OSLC resources provided by adaptors 8 | * What link types are available in each of the applications based on the chosen artifact container association 9 | * Specific integration requirements of each CE application (RDNG, RTC and RQM) that you need to know to get the integrations working 10 | 11 | [iotp-adaptor User Guide](./iotp_adaptor/userGuide/user-guide) is a simple user's guide for installing, configuring, administering and using iotp-adapter with the CE tools. 12 | 13 | [iotp-adaptor Developer Guide](./iotp_adaptor/developer-guide) provides the complete documentation on how the server was developed. 14 | 15 | ## What is an Adaptor? 16 | 17 | Developing integrations using OSLC follows a number of common patterns: 18 | 19 | * **Facade** - OSLC native implementation in the tool or through a plugin using tool’s extensibility mechanisms - very tool specific 20 | * **Mediator** - OSLC adapter for the tool (tool responsible for storage) - using Lyo Designer, factors out all OSLC capabilities and requires only implementation of connector manager. 21 | * **Data mining** - into common OSLC manager (e.g. Rational Design Manager, MID Smartfacts) can result in data redundancy and ETL overhead 22 | * **Synchronization** - of common or overlapping data between tools - limited traceability and impact analysis (e.g., Tasktop Integration Hub) 23 | 24 | An OSLC adaptor (or adapter) follows the Mediator pattern. The adaptor can be quite simple: providing only OSLC capabilities and delegating all user management, persistence and user interaction to the integrated tools. Or the adaptor can be quite complex: providing OSLC capabilities on one or more adapted data sources, but also providing an integration hub with its own storage facilities, user management and UI in order to support integrations that are not possible or appropriate to implement in the individual tools. 25 | 26 | This range of adaptors represents a continuum between enabling and supporting integration. Enabling integration is primarily about providing OSLC capabilities on data sources in order to link resources across tools. These OSLC capabilities or services include: 27 | 28 | * **CRUD operations** - on resources using RDF resource representations (provides predictable resource formats, rich semantics, and goos support for links) 29 | * **Service discovery** - ServiceProviderCatalog, ServiceProvicers (containers of managed resources), Services that describe what OSLC capabilities are provided on what resources 30 | * **Query Capability** – persistent independent query capability for integration 31 | * **Delegated dialogs** – to allow an application to create and select resources in another application for the purpose of establishing links 32 | * **Resource preview** – to provide icons and labels in order to view a link to a resource managed by another tool 33 | * **Tracked Resource Sets** – in order to efficiently contribute data from many data sources into a single repository for cross-tool views, queries and reporting 34 | 35 | Providing these capabilities enables the integration of OSLC based clients and servers. But supporting integration can go beyond simple enabling of links to establishing and maintaining the meaning of the links, and the ability to automate workflow based on link semantics. 36 | 37 | iotp-adaptor is a simple OSLC adaptor that has no persistence of its own and does no user management. Login is delegated to the IBM Watson IoT Platform using your IBM Cloud credentials. All resources are stored in the Watson IoT Platform, and all links between the CE tools and the IoT Platform resources are stored in the CE tools repositories. 38 | 39 | Lyo Designer does generate a Web application that uses OSLC discovery to provide a "debug" interface on the OSLC representations of the IoT Platform resources. See [Generated Debug Web App](./iotp_adaptor/userGuide/debug-interface) for details. This generated Web application could be extended to provide additional UI and integration capabilities that could compliment the Watson IoT Platform UI. However this is not necessary in this case because the Watson IoT Platform already provides a sufficient Web UI. 40 | 41 | Other adaptors may need additional UI, workflow scripting and other capabilities. Lyo Designer can be used to create a starting point for such applications. 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /_harp/iotp_adaptor/_data.json: -------------------------------------------------------------------------------- 1 | { 2 | "developer-guide": { 3 | "title": "Developer Guide", 4 | "parent_uri": "../iotp-adaptor-sample.html" 5 | }, 6 | "environment-setup": { 7 | "title": "eclipse environment setup", 8 | "parent_uri": "../iotp-adaptor-sample.html" 9 | }, 10 | "toolchain-model": { 11 | "title": "The toolchain model", 12 | "parent_uri": "../iotp-adaptor-sample.html" 13 | }, 14 | "code-generator": { 15 | "title": "Generating the server code", 16 | "parent_uri": "../iotp-adaptor-sample.html" 17 | }, 18 | "exploring-the-code" : { 19 | "title": "Exploring the generated code", 20 | "parent_uri": "../iotp-adaptor-sample.html" 21 | }, 22 | "ssl-support": { 23 | "title": "https and SSL support", 24 | "parent_uri": "../iotp-adaptor-sample.html" 25 | }, 26 | "authentication": { 27 | "title": "Authentication", 28 | "parent_uri": "../iotp-adaptor-sample.html" 29 | }, 30 | "rootservices": { 31 | "title": "Creating the rootservices document", 32 | "parent_uri": "../iotp-adaptor-sample.html" 33 | }, 34 | "consumer-friend": { 35 | "title": "Connecting Servers", 36 | "parent_uri": "../iotp-adaptor-sample.html" 37 | }, 38 | "artifact-container-associations": { 39 | "title": "Artifact Container Associations", 40 | "parent_uri": "../iotp-adaptor-sample.html" 41 | }, 42 | "dialogs": { 43 | "title": "Updating generated dialogs", 44 | "parent_uri": "../iotp-adaptor-sample.html" 45 | }, 46 | "implement-domain-class": { 47 | "title": "Implementing a Domain Class", 48 | "parent_uri": "../iotp-adaptor-sample.html" 49 | }, 50 | "trs-provider": { 51 | "title": "Implementing a TRS Provider", 52 | "parent_uri": "../iotp-adaptor-sample.html" 53 | }, 54 | "junit-tests": { 55 | "title": "JUnit Tests", 56 | "parent_uri": "../iotp-adaptor-sample.html" 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /_harp/iotp_adaptor/_harp.json: -------------------------------------------------------------------------------- 1 | { 2 | "globals": { 3 | "org_name": "Open Services for Lifecycle Collaboration", 4 | "org_abbr": "OSLC", 5 | "site_name": "Developer Guide" 6 | } 7 | } -------------------------------------------------------------------------------- /_harp/iotp_adaptor/artifact-container-associations.md: -------------------------------------------------------------------------------- 1 | # Artifact Container Associations 2 | 3 | OSLC discovery allows a client application to discover the services provided by and OSLC server application. Discovery capabilities include: 4 | 5 | * Service Provider Catalog: a list of Service Providers provided by the server. Jazz-apps obtain links to service provider catalogs using the rootservices document (an OSLC extension) 6 | * Service Provider: a container of managed resources accessed through OSLC capabilities. Jazz-app service providers correspond to project areas, the container of managed resources. 7 | * Services: includes creation factory, query capability, delegated creation and selection dialog and resource preview service URLs as shown below 8 | 9 |  10 | 11 | Jazz-apps initiate discovery by adding a friend application. This provides a link to the app's rootservices document which specifies the information needed to establish client/server interactions including: 12 | 13 | * Service provider catalogs using oalc_rm:rmServiceProviders, oslc_cm:cmServiceProviders, oslc_am:amServiceProviders for Requirement, Change Request and Architecture Management service providers 14 | * OAuth URLs required to establish OAuth authentication between OSLC client and server applications 15 | * TRS providers 16 | 17 | But this isn't enough to be able to create links between resources managed by a server's service providers. Artifact container associations are used to configure a project area for connections with service providers or project areas in another application. This is used in the client applications selection/creation dialog to allow user to select application and artifact container that has the resource to link to or create, based on the chosen link type. The association describes the relationship i.e. what kind of links can exist between resources managed by the client and server . So when you create a specific link type, the list is scoped based on the associations for that type of relationship. 18 | 19 | For iotp-adaptor, the organization as the service provider and users configure the project area to organization association because they are both the unit of user login and authentication. 20 | 21 | Table 1. Associations and links by application 22 | 23 | | Application Name | Associations | Links | 24 | | ---------------- | ------------ | ------ | 25 | | Change and Configuration Management | Provides: Implementation Requests