@Test public void getTagTest() { Feed feed = new Feed(); feed.setName("raw-logs"); WorkflowNameBuilder<Feed> builder = new WorkflowNameBuilder<Feed>(feed); Tag tag = builder.getWorkflowTag("IVORY_FEED_RETENTION_raw-logs"); Assert.assertEquals(tag, Tag.RETENTION); tag = builder.getWorkflowTag("IVORY_FEED_raw-logs"); Assert.assertNull(tag); tag = builder.getWorkflowTag("IVORY_FEED_REPLICATION_raw-logs_corp1"); Assert.assertEquals(tag, Tag.REPLICATION); }
public Tag getWorkflowTag(String workflowName) { return WorkflowName.getTagAndSuffixes(entity, workflowName) == null ? null : WorkflowName.getTagAndSuffixes(entity, workflowName).first; }
WorkflowNameBuilder { public Tag getWorkflowTag(String workflowName) { return WorkflowName.getTagAndSuffixes(entity, workflowName) == null ? null : WorkflowName.getTagAndSuffixes(entity, workflowName).first; } }
WorkflowNameBuilder { public Tag getWorkflowTag(String workflowName) { return WorkflowName.getTagAndSuffixes(entity, workflowName) == null ? null : WorkflowName.getTagAndSuffixes(entity, workflowName).first; } WorkflowNameBuilder(T entity); }
WorkflowNameBuilder { public Tag getWorkflowTag(String workflowName) { return WorkflowName.getTagAndSuffixes(entity, workflowName) == null ? null : WorkflowName.getTagAndSuffixes(entity, workflowName).first; } WorkflowNameBuilder(T entity); void setTag(Tag tag); void setSuffixes(List<String> suffixes); WorkflowName getWorkflowName(); Tag getWorkflowTag(String workflowName); String getWorkflowSuffixes(String workflowName); }
WorkflowNameBuilder { public Tag getWorkflowTag(String workflowName) { return WorkflowName.getTagAndSuffixes(entity, workflowName) == null ? null : WorkflowName.getTagAndSuffixes(entity, workflowName).first; } WorkflowNameBuilder(T entity); void setTag(Tag tag); void setSuffixes(List<String> suffixes); WorkflowName getWorkflowName(); Tag getWorkflowTag(String workflowName); String getWorkflowSuffixes(String workflowName);  }