Search in sources :

Example 1 with OrderAndParams

use of com.emc.storageos.db.client.model.uimodels.OrderAndParams in project coprhd-controller by CoprHD.

the class OrderService method queryBulkResourceReps.

@Override
public OrderBulkRep queryBulkResourceReps(List<URI> ids) {
    List<OrderRestRep> orderRestReps = new ArrayList<OrderRestRep>();
    List<OrderAndParams> ordersAndParams = orderManager.getOrdersAndParams(ids);
    for (OrderAndParams orderAndParams : ordersAndParams) {
        orderRestReps.add(OrderMapper.map(orderAndParams.getOrder(), orderAndParams.getParameters()));
    }
    OrderBulkRep rep = new OrderBulkRep(orderRestReps);
    return rep;
}
Also used : OrderAndParams(com.emc.storageos.db.client.model.uimodels.OrderAndParams) ArrayList(java.util.ArrayList) OrderBulkRep(com.emc.vipr.model.catalog.OrderBulkRep) OrderRestRep(com.emc.vipr.model.catalog.OrderRestRep)

Example 2 with OrderAndParams

use of com.emc.storageos.db.client.model.uimodels.OrderAndParams in project coprhd-controller by CoprHD.

the class OrderService method queryFilteredBulkResourceReps.

@Override
public OrderBulkRep queryFilteredBulkResourceReps(List<URI> ids) {
    OrderFilter filter = new OrderFilter(getUserFromContext(), _permissionsHelper);
    List<OrderRestRep> orderRestReps = new ArrayList<OrderRestRep>();
    List<OrderAndParams> ordersAndParams = orderManager.getOrdersAndParams(ids);
    for (OrderAndParams orderAndParams : ordersAndParams) {
        if (filter.isAccessible(orderAndParams.getOrder())) {
            orderRestReps.add(OrderMapper.map(orderAndParams.getOrder(), orderAndParams.getParameters()));
        }
    }
    return new OrderBulkRep(orderRestReps);
}
Also used : OrderAndParams(com.emc.storageos.db.client.model.uimodels.OrderAndParams) ArrayList(java.util.ArrayList) OrderBulkRep(com.emc.vipr.model.catalog.OrderBulkRep) OrderRestRep(com.emc.vipr.model.catalog.OrderRestRep) OrderFilter(com.emc.sa.api.mapper.OrderFilter)

Aggregations

OrderAndParams (com.emc.storageos.db.client.model.uimodels.OrderAndParams)2 OrderBulkRep (com.emc.vipr.model.catalog.OrderBulkRep)2 OrderRestRep (com.emc.vipr.model.catalog.OrderRestRep)2 ArrayList (java.util.ArrayList)2 OrderFilter (com.emc.sa.api.mapper.OrderFilter)1