Overview
JSoagger Bridge regroups oparations for loading data from backend services or legacy services. JSoagger Bridge contains as many operations as exposed REST service in JSoagger Service.
It uses OkHttp to consume remote REST services.
Example
A promote lifecyle operation
public class PromoteOperation implements IOperation {
/**
* Constructor
*/
public PromoteOperation() {
super();
}
/**
* @{inheritedDoc}
*/
@Override
public void doOperation(JsonObject params,
Consumer<IOperationResult> resultHandler,
Consumer<Throwable> exHandler) {
try {
IOperationResult result = CloudServicesLocator.lifecycleManagedApi.promote(params);
resultHandler.accept(result);
}
catch (Exception e) {
exHandler.accept(e);
}
}
}
And LifecyleManagedApi cloud services REST call:
public IOperationResult promote(JsonObject query) {
try {
String oid = query.get("fullId").getAsString();
String byPathUrl = rootUrl.concat(String.format(PROMOTE_URL, oid));
IOperationResult result = doPost(query, byPathUrl, SingleResult.class);
return result;
}
catch (Exception e) {
return IOperationResult.getGeneralSingleResultError();
}
}
Project
Contributing
Please read [CONTRIBUTING.md] for details on our code of conduct, and the process for submitting pull requests to us.
Authors
- rmvonji - Initial work - JSoagger
- Contact - yvonjisoa@nexitia.com
Licence
This project is licensed under Apache Licence V2.