public static List<RequestResourceFilter> filtersFromEntity (RequestEntity entity) {
    List<RequestResourceFilter> resourceFilters = null;

    Collection<RequestResourceFilterEntity> resourceFilterEntities = entity.getResourceFilterEntities();
    if (resourceFilterEntities != null) {
      resourceFilters = new ArrayList<>();
      for (RequestResourceFilterEntity resourceFilterEntity : resourceFilterEntities) {
        RequestResourceFilter resourceFilter =
          new RequestResourceFilter(
            resourceFilterEntity.getServiceName(),
            resourceFilterEntity.getComponentName(),
            getHostsList(resourceFilterEntity.getHosts()));
        resourceFilters.add(resourceFilter);
      }
    }

    return resourceFilters;
  }
@param entity  the request entity
@return a list of {@link RequestResourceFilter} from the entity, or {@code null}
       if none are defined
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/Request.java