Search in sources :

Example 11 with DefaultTag

use of com.thinkbiganalytics.discovery.model.DefaultTag in project kylo by Teradata.

the class FeedTestUtil method getCreateFeedRequest.

public static FeedMetadata getCreateFeedRequest(FeedCategory category, ImportTemplate template, String name, String inputProcessorType, List<NifiProperty> properties) throws Exception {
    FeedMetadata feed = new FeedMetadata();
    feed.setFeedName(name);
    feed.setSystemFeedName(name.toLowerCase());
    feed.setCategory(category);
    feed.setTemplateId(template.getTemplateId());
    feed.setTemplateName(template.getTemplateName());
    feed.setDescription("Created by functional test");
    feed.setInputProcessorType(inputProcessorType);
    feed.setProperties(properties);
    FeedSchedule schedule = new FeedSchedule();
    schedule.setConcurrentTasks(1);
    schedule.setSchedulingPeriod("15 sec");
    schedule.setSchedulingStrategy("TIMER_DRIVEN");
    feed.setSchedule(schedule);
    feed.setDataOwner("Marketing");
    List<Tag> tags = new ArrayList<>();
    tags.add(new DefaultTag("users"));
    tags.add(new DefaultTag("registrations"));
    feed.setTags(tags);
    User owner = new User();
    owner.setSystemName("dladmin");
    owner.setDisplayName("Data Lake Admin");
    Set<String> groups = new HashSet<>();
    groups.add("admin");
    groups.add("user");
    owner.setGroups(groups);
    feed.setOwner(owner);
    return feed;
}
Also used : User(com.thinkbiganalytics.security.rest.model.User) FeedSchedule(com.thinkbiganalytics.feedmgr.rest.model.FeedSchedule) FeedMetadata(com.thinkbiganalytics.feedmgr.rest.model.FeedMetadata) ArrayList(java.util.ArrayList) DefaultTag(com.thinkbiganalytics.discovery.model.DefaultTag) Tag(com.thinkbiganalytics.discovery.schema.Tag) DefaultTag(com.thinkbiganalytics.discovery.model.DefaultTag) HashSet(java.util.HashSet)

Aggregations

DefaultTag (com.thinkbiganalytics.discovery.model.DefaultTag)11 Tag (com.thinkbiganalytics.discovery.schema.Tag)8 FeedMetadata (com.thinkbiganalytics.feedmgr.rest.model.FeedMetadata)7 ArrayList (java.util.ArrayList)6 User (com.thinkbiganalytics.security.rest.model.User)5 FeedCategory (com.thinkbiganalytics.feedmgr.rest.model.FeedCategory)4 NifiProperty (com.thinkbiganalytics.nifi.rest.model.NifiProperty)4 JsonNode (com.fasterxml.jackson.databind.JsonNode)3 EntityVersionDifference (com.thinkbiganalytics.feedmgr.rest.model.EntityVersionDifference)3 FeedSchedule (com.thinkbiganalytics.feedmgr.rest.model.FeedSchedule)3 FeedVersions (com.thinkbiganalytics.feedmgr.rest.model.FeedVersions)3 FieldPolicy (com.thinkbiganalytics.policy.rest.model.FieldPolicy)3 HashSet (java.util.HashSet)3 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)2 Field (com.thinkbiganalytics.discovery.schema.Field)2 EntityDifference (com.thinkbiganalytics.feedmgr.rest.model.EntityDifference)2 EntityVersion (com.thinkbiganalytics.feedmgr.rest.model.EntityVersion)2 FeedSummary (com.thinkbiganalytics.feedmgr.rest.model.FeedSummary)2 RegisteredTemplate (com.thinkbiganalytics.feedmgr.rest.model.RegisteredTemplate)2 UserProperty (com.thinkbiganalytics.feedmgr.rest.model.UserProperty)2