Manage Your Component Exchange

If your team develops custom components for visual applications and want the components to be available to all users in the Visual Builder Components tab, you'll need to first set up a component exchange. This chapter tells you how to set up the Component Exchange in Visual Builder.

What is a Component Exchange?

A component exchange is a repository of custom components available in VB Studio. You can use these components in your visual applications, such as web components and application templates. Many of the components provided by Oracle can be installed from a component exchange.

To integrate a component exchange with a instance, you provide the exchange's URL and credentials in the Tenant Settings. The exchange can be a private exchange in a VB Studio project or one of the exchanges maintained by Oracle.

If your organization develops or uses proprietary components, these components can be published to a private exchange hosted by a VB Studio project. For example, if you have a web component designed to be used in applications in your tenant, you can set up your own exchange and use it to distribute the component to developers in the tenant. Additionally, components provided by Oracle are automatically available from all private component exchanges.

Oracle maintains two component exchanges containing components validated by Oracle that are publicly available to all developers. If you don't have a private exchange but you want to give developers access to these Oracle components, you can add one of the following exchanges maintained by Oracle. If your instance is in the US, use the following details.

If your instance is in Europe, use the following details.

About Component Exchanges Hosted in VB Studio Projects

A VB Studio project can host a secure component exchange to store and distribute components only available to developers in the instance.

Each VB Studio project includes the component exchange 'compcatalog', which is the service used to access components stored in the project. The compcatalog service is provisioned by default with each project. Any project can be used to host an exchange if storage is enabled for the VB Studio instance. Component developers can use the service's APIs to publish components to the exchange.

To integrate a private exchange in a VB Studio project with a Visual Builder instance, an administrator specifies the URL for the project's compcatalog service and the credentials for a user that can access the project. The credentials used to connect to the exchange must be an owner or member of the VB Studio project hosting the exchange. All developers in the tenant use these credentials to connect to the exchange to get the components and application templates they want to use in their projects.

The URL for the project's compcatalog service has the following form: https://<hostname>/<org_id>/s/<project_id>/compcatalog/0.2.0/

In the URL, "compcatalog" is the exchange service and "0.2.0" is the API version of the service.

To determine the URL for the compcatalog service, you need to know the following details about the VB Studio project:

  • <hostname>. This is the VB Studio server where the project is hosted.
  • <org_id>. This is the organization (tenant) name.
  • <project_id>. This is a project identifier unique to the tenant. This is not the same as the project display name entered by the project owner and is not displayed in the VB Studio UI.

If you do not know the <project_id> for the project hosting the exchange, you can get it from the Git or Maven configuration, or by using the VB Studio Projects API. The following table describes how to get the <project_id>.

Method Steps
From a Git or Maven configuration
  1. In VB Studio, open the project and locate the Repositories tab on the project's Home Page.
  2. Expand the the Git or Maven section and copy the repository URL.

The Git repository URL will be similar to the following: https://{user_id}@{hostname}/{org_id}/s/my-org_testproject_5/scm/my-repo.git

The Maven repository URL will be similar to the following: http://{hostname}/{org_id}/s/my-org_testproject_5/maven/

In these examples, "my-org_testproject_5" is the project identifier. In this case, the URL for the 'compcatalog' service will be similar to https://{hostname}/my-org/s/my-org_testproject_5/compcatalog/0.2.0/

Using VB Studio Projects API

If you know the name of the project sharing your exchange instance, you can get the project metadata using a REST call to the VB Studio API.

For example, you can use cURL to send a REST call similar to the following:

curl -X GET -u '{username}:{password}'https://{hostname}/{org_id}/api/v2/projects/info/name:TestProject

The return should be similar to the following:

[
  {
    "organization":"my-org",
    "identifier":"my-org_testproject_5",
    "name":"TestProject",
    "urlId":"testproject",
    "description":null,
    "accessibility":"PRIVATE",
    "template":false,
    "state":"READY",
    "locked":false,
    "relation":{"membership":"OWNER","favorite":false}
  }
]

In this example, the identifier property in the return is the project identifier that is needed for the "compcatalog" service URL.

Add a Connection to a Component Exchange

When an instance is integrated with a component exchange, all developers using the instance can access and install components stored there.

After an exchange is added to the instance, all developers can use the Components tab in the Navigator to install and manage the components from the exchange that they want to use in their applications. When creating an application in the Create Application wizard, developers can also select any of the application templates that have been published to the exchange.

To add a connection to the Component Exchange:

  1. Open the instance’s Tenant Settings page.
  2. In the Component Exchange panel, enter the URL and credentials for the component exchange.

    Description of admin-settings-componentexchange.png follows
    Description of the illustration admin-settings-componentexchange.png

    If you are adding a connection to a private component exchange, it is recommended that the credentials you provide are for an administrator who is a member of the VB Studio project hosting the exchange or the project owner.