Search in sources :

Example 1 with PropertyChange

use of com.thinkbiganalytics.metadata.api.event.feed.PropertyChange in project kylo by Teradata.

the class JcrFeedProvider method mergeFeedProperties.

@Override
public Map<String, Object> mergeFeedProperties(ID feedId, Map<String, Object> properties) {
    JcrFeed feed = (JcrFeed) getFeed(feedId);
    List<String> securityGroupNames = new ArrayList<>();
    for (Object o : feed.getSecurityGroups()) {
        HadoopSecurityGroup securityGroup = (HadoopSecurityGroup) o;
        securityGroupNames.add(securityGroup.getName());
    }
    Map<String, Object> merged = feed.mergeProperties(properties);
    PropertyChange change = new PropertyChange(feed.getId().getIdValue(), feed.getCategory().getSystemName(), feed.getSystemName(), securityGroupNames, feed.getProperties(), properties);
    this.metadataEventService.notify(new FeedPropertyChangeEvent(change));
    return merged;
}
Also used : HadoopSecurityGroup(com.thinkbiganalytics.metadata.api.security.HadoopSecurityGroup) PropertyChange(com.thinkbiganalytics.metadata.api.event.feed.PropertyChange) ArrayList(java.util.ArrayList) JcrObject(com.thinkbiganalytics.metadata.modeshape.common.JcrObject) FeedPropertyChangeEvent(com.thinkbiganalytics.metadata.api.event.feed.FeedPropertyChangeEvent)

Aggregations

FeedPropertyChangeEvent (com.thinkbiganalytics.metadata.api.event.feed.FeedPropertyChangeEvent)1 PropertyChange (com.thinkbiganalytics.metadata.api.event.feed.PropertyChange)1 HadoopSecurityGroup (com.thinkbiganalytics.metadata.api.security.HadoopSecurityGroup)1 JcrObject (com.thinkbiganalytics.metadata.modeshape.common.JcrObject)1 ArrayList (java.util.ArrayList)1