Search in sources :

Example 1 with OrderFilter

use of com.emc.sa.api.mapper.OrderFilter 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

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