protected static Feed getFeed(String feedName, Map<String, Object> propertyMap) {
    Map<String, String> properties = new HashMap<>();
    for ( Map.Entry<String, Object> entry : propertyMap.entrySet()) {
      String property = entry.getKey();
      String category = PropertyHelper.getPropertyCategory(property);
      if (category.equals(FEED_PROPERTIES_PROPERTY_ID)) {
        properties.put(PropertyHelper.getPropertyName(property), (String) entry.getValue());
      }
    }

    return new Feed(
        feedName,
        (String) propertyMap.get(FEED_DESCRIPTION_PROPERTY_ID),
        (String) propertyMap.get(FEED_STATUS_PROPERTY_ID),
        (String) propertyMap.get(FEED_SCHEDULE_PROPERTY_ID),
        (String) propertyMap.get(FEED_SOURCE_CLUSTER_NAME_PROPERTY_ID),
        (String) propertyMap.get(FEED_SOURCE_CLUSTER_START_PROPERTY_ID),
        (String) propertyMap.get(FEED_SOURCE_CLUSTER_END_PROPERTY_ID),
        (String) propertyMap.get(FEED_SOURCE_CLUSTER_LIMIT_PROPERTY_ID),
        (String) propertyMap.get(FEED_SOURCE_CLUSTER_ACTION_PROPERTY_ID),
        (String) propertyMap.get(FEED_TARGET_CLUSTER_NAME_PROPERTY_ID),
        (String) propertyMap.get(FEED_TARGET_CLUSTER_START_PROPERTY_ID),
        (String) propertyMap.get(FEED_TARGET_CLUSTER_END_PROPERTY_ID),
        (String) propertyMap.get(FEED_TARGET_CLUSTER_LIMIT_PROPERTY_ID),
        (String) propertyMap.get(FEED_TARGET_CLUSTER_ACTION_PROPERTY_ID),
        properties);
  }
Get a new feed object from the given name and map of properties.

@param feedName     the feed name
@param propertyMap  the properties

@return a new feed
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/FeedResourceProvider.java