use of com.emc.vipr.model.catalog.OrderRestRep in project coprhd-controller by CoprHD.
the class Orders method resubmitOrder.
/**
* Resubmits an order, creating a new copy with the same parameters.
*
* @param orderId
* the order ID.
*/
public static void resubmitOrder(@Required String orderId) {
checkAuthenticity();
OrderRestRep order = OrderUtils.getOrder(uri(orderId));
try {
addParametersToFlash(order);
} catch (Exception e) {
Logger.error(e, MessagesUtils.get("order.submitFailedWithDetail", e.getMessage()));
flash.error(MessagesUtils.get("order.submitFailedWithDetail", e.getMessage()));
Common.handleError();
}
Services.showForm(order.getCatalogService().getId().toString());
}
use of com.emc.vipr.model.catalog.OrderRestRep in project coprhd-controller by CoprHD.
the class ScheduledOrders method itemsJson.
public static void itemsJson(@As(",") String[] ids) {
List<ScheduledOrderInfo> results = Lists.newArrayList();
if (ids != null && ids.length > 0) {
for (String id : ids) {
if (StringUtils.isNotBlank(id)) {
OrderRestRep order = OrderUtils.getOrder(uri(id));
if (order != null) {
Models.checkAccess(order.getTenant());
results.add(new ScheduledOrderInfo(order));
}
}
}
}
renderJSON(DataTablesSupport.toJson(results));
}
Aggregations