Search in sources :

Example 26 with FeedManagerTemplate

use of com.thinkbiganalytics.metadata.api.template.FeedManagerTemplate in project kylo by Teradata.

the class FeedModelTransform method setFeedMetadataRegisteredTemplate.

/**
 * Set the FeedMetadata.registeredTemplate with the template data
 * @param domain the domain JcrFeed
 * @param feed the FeedMetata REST object
 */
public void setFeedMetadataRegisteredTemplate(@Nonnull final Feed domain, FeedMetadata feed) {
    FeedManagerTemplate template = domain.getTemplate();
    if (template != null) {
        RegisteredTemplate registeredTemplate = templateModelTransform.DOMAIN_TO_REGISTERED_TEMPLATE.apply(template);
        feed.setRegisteredTemplate(registeredTemplate);
        feed.setTemplateId(registeredTemplate.getId());
        feed.setTemplateName(registeredTemplate.getTemplateName());
    }
}
Also used : RegisteredTemplate(com.thinkbiganalytics.feedmgr.rest.model.RegisteredTemplate) FeedManagerTemplate(com.thinkbiganalytics.metadata.api.template.FeedManagerTemplate)

Aggregations

FeedManagerTemplate (com.thinkbiganalytics.metadata.api.template.FeedManagerTemplate)26 RegisteredTemplate (com.thinkbiganalytics.feedmgr.rest.model.RegisteredTemplate)10 Feed (com.thinkbiganalytics.metadata.api.feed.Feed)10 Category (com.thinkbiganalytics.metadata.api.category.Category)7 MetadataRepositoryException (com.thinkbiganalytics.metadata.modeshape.MetadataRepositoryException)5 AllowedActions (com.thinkbiganalytics.security.action.AllowedActions)5 Principal (java.security.Principal)5 FeedMetadata (com.thinkbiganalytics.feedmgr.rest.model.FeedMetadata)4 FeedSummary (com.thinkbiganalytics.feedmgr.rest.model.FeedSummary)3 UIFeed (com.thinkbiganalytics.feedmgr.rest.model.UIFeed)3 UserFieldDescriptor (com.thinkbiganalytics.metadata.api.extension.UserFieldDescriptor)3 HadoopSecurityGroup (com.thinkbiganalytics.metadata.api.security.HadoopSecurityGroup)3 ArrayList (java.util.ArrayList)3 Nonnull (javax.annotation.Nonnull)3 Stopwatch (com.google.common.base.Stopwatch)2 ImmutableMap (com.google.common.collect.ImmutableMap)2 Sets (com.google.common.collect.Sets)2 HadoopAuthorizationService (com.thinkbiganalytics.datalake.authorization.service.HadoopAuthorizationService)2 DefaultTag (com.thinkbiganalytics.discovery.model.DefaultTag)2 CreateFeedBuilder (com.thinkbiganalytics.feedmgr.nifi.CreateFeedBuilder)2