Skip to content

chloegugli/catalog

 
 

Repository files navigation

ProActive Catalog

Build Status Coverage Status

The goal of the catalog is to store ProActive objects. It is the catalog for general purpose.

The stored objects in the catalog could be:

  • rule for PCW service
  • workflows
  • selection script
  • Proactive pre/post task
  • objects for authentication service
  • any kind of other objects

Catalog contains a set of objects organized into buckets with versioning capabilities.

A single Bucket can store multiple kinds of objects

Building and deploying

You can build a WAR file as follows:

$ gradle clean build war

Then, you can directly deploy the service with embedded Tomcat:

$ java -jar build/libs/catalog-X.Y.Z-SNAPSHOT.war

The WAR file produced by Gradle can also be deployed in the embedded Jetty container started by an instance of ProActive Server.

Samples

Available resources can be listed and tested with Swagger:

http://localhost:8080/swagger

Below are some REST invocations using HTTPie.

Bucket resource

Creating a new bucket named test:

$ http -f POST http://localhost:8080/buckets name=test

Getting information about bucket with identifier 1:

$ http http://localhost:8080/buckets/1

Listing available buckets:

$ http http://localhost:8080/buckets

Listing available buckets targeting page 42:

$ http http://localhost:8080/buckets?page=42

Object resource

REST actions related to existing objects apply to the latest revision of the identified object.

Adding a new object in bucket with identifier 1:

$ http -f POST http://localhost:8080/buckets/1/objects file@/path/to/object.xml

Getting object metadata for object with identifier 1 in bucket with id 1:

$ http http://localhost:8080/buckets/1/objects/1

Fetching object XML payload for object with identifier 1 in bucket with id 1:

$ http http://localhost:8080/buckets/1/objects/1?alt=xml

Listing objects managed by bucket with identifier 1:

$ http http://localhost:8080/buckets/1/objects

object revision resource

Adding a new object revision for object with identifier 1 in bucket with id 1:

$ http -f POST http://localhost:8080/buckets/1/objects/1/revisions file@/path/to/object.xml

Getting object metadata for object with identifier 1 and revision 1 in bucket with id 1:

$ http http://localhost:8080/buckets/1/objects/1/revisions/1

Fetching object XML payload for object with identifier 1 and revision 1 in bucket with id 1:

$ http http://localhost:8080/buckets/1/objects/1/revisions/1?alt=xml

Listing all revisions for object with identifier 1:

$ http http://localhost:8080/buckets/1/objects/1/revisions

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 91.9%
  • CSS 4.9%
  • JavaScript 2.8%
  • Other 0.4%