Skip to content

ow2-proactive/catalog-client

Repository files navigation

openapi-java-client

CatalogObjectEntity Catalog API

  • API version: 1.0"

  • Build date: 2024-02-12T10:49:33.729424-05:00[America/New_York]

The purpose of the catalog is to store ProActive objects.

A catalog is subdivided into buckets.

Each bucket manages zero, one or more versioned ProActive objects.

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven (3.8.3+)/Gradle (7.2+)

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>org.openapitools</groupId>
  <artifactId>openapi-java-client</artifactId>
  <version>1.0"</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

  repositories {
    mavenCentral()     // Needed if the 'openapi-java-client' jar has been published to maven central.
    mavenLocal()       // Needed if the 'openapi-java-client' jar has been published to the local maven repo.
  }

  dependencies {
     implementation "org.openapitools:openapi-java-client:1.0""
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/openapi-java-client-1.0".jar
  • target/lib/*.jar

Usage

To add a HTTP proxy for the API client, use ClientConfig:

import org.glassfish.jersey.apache.connector.ApacheConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
import org.ow2.proactive.catalog.client.*;
import org.ow2.proactive.catalog.client.api.BucketControllerApi;

...

ApiClient defaultClient = Configuration.getDefaultApiClient();
ClientConfig clientConfig = defaultClient.getClientConfig();
clientConfig.connectorProvider(new ApacheConnectorProvider());
clientConfig.property(ClientProperties.PROXY_URI, "http://proxy_url_here");
clientConfig.property(ClientProperties.PROXY_USERNAME, "proxy_username");
clientConfig.property(ClientProperties.PROXY_PASSWORD, "proxy_password");
defaultClient.setClientConfig(clientConfig);

BucketControllerApi apiInstance = new BucketControllerApi(defaultClient);

Getting Started

Please follow the installation instruction and execute the following Java code:

import org.ow2.proactive.catalog.client.*;
import org.ow2.proactive.catalog.client.auth.*;
import org.ow2.proactive.catalog.client.model.*;
import org.ow2.proactive.catalog.client.api.BucketControllerApi;

public class BucketControllerApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://trydev2.activeeon.com:8443/catalog");
        
        BucketControllerApi apiInstance = new BucketControllerApi(defaultClient);
        String sessionID = "sessionID_example"; // String | sessionID
        String owner = "owner_example"; // String | The name of the user who owns the Bucket
        String kind = "kind_example"; // String | The kind(s) of objects that buckets must contain.<br />Multiple kinds can be specified using comma separators
        String contentType = "contentType_example"; // String | The Content-Type of objects that buckets must contain
        String objectTag = "objectTag_example"; // String | The tag of objects that buckets must contain
        String associationStatus = "ALL"; // String | The buckets must contain objects which have the given job-planner association status.<br />Can be ALL, PLANNED, DEACTIVATED, FAILED or UNPLANNED.<br />ALL will filter objects which have an association with any status.<br />UNPLANNED will filter objects without any association.
        String objectName = "objectName_example"; // String | The name of objects that buckets must contain
        String bucketName = "bucketName_example"; // String | The bucket name contains the value of this parameter (case insensitive)
        String projectName = "projectName_example"; // String | Include only objects whose project name contains the given string.
        String lastCommitBy = "lastCommitBy_example"; // String | Include only objects whose last commit belong to the given user.
        Long lastCommitTimeGreater = 0L; // Long | Include only objects whose last commit time is greater than the given EPOCH time.
        Long lastCommitTimeLessThan = 0L; // Long | Include only objects whose last commit time is less than the given EPOCH time.
        String allBuckets = "false"; // String | If true, buckets without objects matching the filters will be returned with objectCount=0. Default is false
        try {
            List<BucketMetadata> result = apiInstance.callList(sessionID, owner, kind, contentType, objectTag, associationStatus, objectName, bucketName, projectName, lastCommitBy, lastCommitTimeGreater, lastCommitTimeLessThan, allBuckets);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling BucketControllerApi#callList");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://trydev2.activeeon.com:8443/catalog

Class Method HTTP request Description
BucketControllerApi callList GET /buckets Lists the buckets
BucketControllerApi cleanEmpty DELETE /buckets Delete the empty buckets
BucketControllerApi create POST /buckets Creates a new bucket
BucketControllerApi delete DELETE /buckets/{bucketName} Delete an empty bucket
BucketControllerApi getMetadata GET /buckets/{bucketName} Gets a bucket's metadata by ID
BucketControllerApi updateBucketOwner PUT /buckets/{bucketName} Update bucket owner
BucketGrantControllerApi createBucketGrantForAGroup POST /buckets/{bucketName}/grant/group Create a new user group grant access for a bucket
BucketGrantControllerApi createBucketGrantForAUser POST /buckets/{bucketName}/grant/user Create a new user grant access for a bucket
BucketGrantControllerApi deleteAllBucketGrantsAssignedToABucket DELETE /buckets/{bucketName}/grant Delete all grants assigned to a bucket
BucketGrantControllerApi deleteAllGrantsForABucketAndItsObjects DELETE /buckets/{bucketName}/grant/all Delete all grants associated with a bucket and all objects contained in this bucket
BucketGrantControllerApi deleteBucketGrantForAGroup DELETE /buckets/{bucketName}/grant/group Delete a group grant access for a bucket
BucketGrantControllerApi deleteBucketGrantForAUser DELETE /buckets/{bucketName}/grant/user Delete a user grant access for a bucket
BucketGrantControllerApi getAllGrantsForABucket GET /buckets/{bucketName}/grant Get all grants associated with a bucket
BucketGrantControllerApi getAllGrantsForABucketAndItsObjects GET /buckets/{bucketName}/grant/all Get all grants associated with a bucket and all objects contained in this bucket
BucketGrantControllerApi updateBucketGrantForAGroup PUT /buckets/{bucketName}/grant/group Update the access type of an existing group bucket grant
BucketGrantControllerApi updateBucketGrantForAUser PUT /buckets/{bucketName}/grant/user Update the access type of an existing user bucket grant
CatalogObjectCallGraphControllerApi getCallGraph GET /buckets/call-graph Get the call graph of all catalog objects in a PDF report
CatalogObjectCallGraphControllerApi getCallGraphForSelectedObjects GET /buckets/call-graph/selected/{bucketName} Get the call graph of selected catalog objects in a bucket
CatalogObjectControllerApi create1 POST /buckets/{bucketName}/resources Creates a new catalog object
CatalogObjectControllerApi delete1 DELETE /buckets/{bucketName}/resources/{name} Delete a catalog object
CatalogObjectControllerApi exportCatalogObjects POST /buckets/{bucketName}/resources/export Export catalog objects as a plain zip archive or a ProActive Catalog Package
CatalogObjectControllerApi get GET /buckets/{bucketName}/resources/{name} Gets a catalog object's metadata by IDs
CatalogObjectControllerApi getDependencies GET /buckets/{bucketName}/resources/{name}/dependencies Gets dependencies (dependsOn and calledBy) of a catalog object
CatalogObjectControllerApi getRaw1 GET /buckets/{bucketName}/resources/{name}/raw Gets the raw content of the last revision of a catalog object
CatalogObjectControllerApi importCatalogObjects POST /buckets/{bucketName}/resources/import Import an archive, either a plain zip or a ProActive Catalog package
CatalogObjectControllerApi list1 GET /buckets/{bucketName}/resources Lists catalog objects metadata
CatalogObjectControllerApi listCatalogObjectNameReference GET /buckets/references Lists catalog object name references by kind and Content-Type
CatalogObjectControllerApi listContentTypes GET /buckets/content-types Lists all Content-Types for all objects
CatalogObjectControllerApi listKinds GET /buckets/kinds Lists all kinds for all objects
CatalogObjectControllerApi listObjectTags GET /buckets/tags Lists all tags values for all objects stored in the catalog
CatalogObjectControllerApi updateObjectMetadata PUT /buckets/{bucketName}/resources/{name} Update a catalog object metadata, like kind, Content-Type, project name and tags
CatalogObjectGrantControllerApi createCatalogObjectGrantForAGroup POST /buckets/{bucketName}/resources/{catalogObjectName}/grant/group Create a new group grant for a catalog object
CatalogObjectGrantControllerApi createCatalogObjectGrantForAUser POST /buckets/{bucketName}/resources/{catalogObjectName}/grant/user Create a new user grant for a catalog object
CatalogObjectGrantControllerApi deleteAllCatalogObjectGrants DELETE /buckets/{bucketName}/resources/{catalogObjectName}/grant Delete all grant associated with a catalog object
CatalogObjectGrantControllerApi deleteCatalogObjectGrantForAGroup DELETE /buckets/{bucketName}/resources/{catalogObjectName}/grant/group Delete a user group grant access for a catalog object
CatalogObjectGrantControllerApi deleteCatalogObjectGrantForAUser DELETE /buckets/{bucketName}/resources/{catalogObjectName}/grant/user Delete a user grant access for a catalog object
CatalogObjectGrantControllerApi getAllCreatedCatalogObjectGrantsByAdmins GET /buckets/{bucketName}/resources/{catalogObjectName}/grant Get all grants associated with a catalog object
CatalogObjectGrantControllerApi updateCatalogObjectGrantForAGroup PUT /buckets/{bucketName}/resources/{catalogObjectName}/grant/group Update a user group grant access for a catalog object
CatalogObjectGrantControllerApi updateCatalogObjectGrantForAUser PUT /buckets/{bucketName}/resources/{catalogObjectName}/grant/user Update a user grant access for a catalog object
CatalogObjectReportControllerApi getReport GET /buckets/report Get list of catalog objects in a PDF report file
CatalogObjectReportControllerApi getReportForSelectedObjects POST /buckets/report/selected/{bucketName} Get list of selected catalog objects in a PDF report file
CatalogObjectRevisionControllerApi create2 POST /buckets/{bucketName}/resources/{name}/revisions Creates a new catalog object revision
CatalogObjectRevisionControllerApi get1 GET /buckets/{bucketName}/resources/{name}/revisions/{commitTimeRaw} Gets a specific revision
CatalogObjectRevisionControllerApi getRaw GET /buckets/{bucketName}/resources/{name}/revisions/{commitTimeRaw}/raw Gets the raw content of a specific revision
CatalogObjectRevisionControllerApi list2 GET /buckets/{bucketName}/resources/{name}/revisions Lists a catalog object revisions
CatalogObjectRevisionControllerApi restore PUT /buckets/{bucketName}/resources/{name}/revisions/{commitTimeRaw} Restore a catalog object revision
GraphqlControllerApi executeOperation POST /graphql

Documentation for Models

Documentation for Authorization

Endpoints do not require authorization.

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages