io.github.jsoagger.core.business.cloud.operations.appversion.SetAppVersionInstalledOperation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsoagger-corebusiness-cloud-operations Show documentation
Show all versions of jsoagger-corebusiness-cloud-operations Show documentation
JSoagger core business cloud operation
The newest version!
/**
*
*/
package io.github.jsoagger.core.business.cloud.operations.appversion;
import java.util.function.Consumer;
import com.google.gson.JsonObject;
import io.github.jsoagger.core.business.cloud.services.utils.CloudServicesLocator;
import io.github.jsoagger.core.bridge.operation.IOperation;
import io.github.jsoagger.core.bridge.operation.IOperationResult;
/**
* @author Ramilafananana VONJISOA
* @mailto [email protected]
* @date 2019
*/
public class SetAppVersionInstalledOperation implements IOperation {
/* (non-Javadoc)
* @see io.github.jsoagger.core.bridge.operation.IOperation#doOperation(com.google.gson.JsonObject, java.util.function.Consumer, java.util.function.Consumer)
*/
@Override
public void doOperation(JsonObject query, Consumer resultHandler,
Consumer exHandler) {
try {
if(query == null) throw new NullPointerException("Query can not be null");
IOperationResult result = CloudServicesLocator.appVersionApi.setInstalled(query);
resultHandler.accept(result);
}
catch (Exception e) {
if(exHandler != null) exHandler.accept(e);
}
}
}