All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.jsoagger.core.business.cloud.operations.productcatalog.GetObjectCatalogRootCategoriesOperation Maven / Gradle / Ivy

The newest version!
/**
 *
 */
package io.github.jsoagger.core.business.cloud.operations.productcatalog;

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
 *
 */
public class GetObjectCatalogRootCategoriesOperation implements IOperation {

  /**
   * @{inheritedDoc}
   */
  @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.objectCatalogApi.getObjectCatalogRootCategories(query);
      resultHandler.accept(result);
    }
    catch (Exception e) {
      if(exHandler != null) exHandler.accept(e);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy