use of com.emc.vipr.model.catalog.OrderRestRep in project coprhd-controller by CoprHD.
the class CatalogApi method runCatalogService.
private static void runCatalogService(String serviceId) {
params.checkAndParse();
OrderCreateParam order = createAndValidateOrder(serviceId);
OrderRestRep submittedOrder = getCatalogClient().orders().submit(order);
renderApi(newOrderInfo(submittedOrder));
}
use of com.emc.vipr.model.catalog.OrderRestRep in project coprhd-controller by CoprHD.
the class OrdersApi method order.
public static void order(String orderId) {
OrderRestRep order = getCatalogClient().orders().get(uri(orderId));
renderApi(newOrderInfo(order));
}
use of com.emc.vipr.model.catalog.OrderRestRep in project coprhd-controller by CoprHD.
the class OrdersApi method bulkOrders.
public static void bulkOrders(BulkIdParam param) {
if (param == null || param.getIds().size() > DEFAULT_MAX_BULK_SIZE) {
badRequest();
}
List<OrderInfo> orders = Lists.newArrayList();
for (OrderRestRep order : getCatalogClient().orders().getByIds(param.getIds())) {
// NOSONAR
// ("Suppressing Sonar violation of Possible null pointer dereference of param. In the previous if condition it is already taken care of the case when param is null hence recheck is not required.")
checkPermissions(order);
orders.add(newOrderInfo(order));
}
renderApi(orders);
}
use of com.emc.vipr.model.catalog.OrderRestRep in project coprhd-controller by CoprHD.
the class OrdersApi method updateTags.
public static void updateTags(String orderId, TagAssignment assignment) {
updateOrderTags(uri(orderId), assignment);
OrderRestRep order = getOrder(orderId);
renderApi(newOrderInfo(order));
}
use of com.emc.vipr.model.catalog.OrderRestRep in project coprhd-controller by CoprHD.
the class OrdersApi method retrieveTags.
public static void retrieveTags(String orderId) {
OrderRestRep order = getOrder(orderId);
Tags tags = ApiMapperUtils.getTags(order);
renderApi(tags);
}
Aggregations