com.atlassian.streams.api.common.Option.none()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(134)

本文整理了Java中com.atlassian.streams.api.common.Option.none()方法的一些代码示例,展示了Option.none()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Option.none()方法的具体详情如下:
包路径:com.atlassian.streams.api.common.Option
类名称:Option
方法名:none

Option.none介绍

暂无

代码示例

代码示例来源:origin: com.atlassian.streams/streams-confluence-plugin

@Override
public Option<Html> renderSummaryAsHtml(StreamsEntry entry)
{
  return none();
}

代码示例来源:origin: com.atlassian.streams/streams-jira-plugin

@Override
  public Option<Html> renderSummaryAsHtml(StreamsEntry entry)
  {
    return none();
  }
}

代码示例来源:origin: com.atlassian.streams/streams-jira-plugin

@Override
public Option<Html> renderSummaryAsHtml(StreamsEntry entry)
{
  return none();
}

代码示例来源:origin: com.atlassian.streams/streams-jira-plugin

public JiraActivityItem(final Issue issue, final String displaySummary, final Pair<ActivityObjectType, ActivityVerb> activity,
    final ChangeHistory changeHistory)
{
  this.issue = checkNotNull(issue, "issue");
  this.displaySummary = checkNotNull(displaySummary, "initialSummary");
  this.activity = checkNotNull(activity, "activity");
  this.changeHistory = some(checkNotNull(changeHistory, "changeHistory"));
  comment = none();
  date = changeHistory.getTimePerformed();
  initialDescription = none();
}

代码示例来源:origin: com.atlassian.streams/streams-confluence-plugin

public Option<ContributorQuery> apply(String username)
  {
    if (isBlank(username))
    {
      return none();
    }
    return some(new ContributorQuery(username));
  }
}

代码示例来源:origin: com.atlassian.streams/streams-crucible-plugin

private Option<Predicate<String>> containsIssueKeys(Iterable<String> issueKeys)
{
  if (isEmpty(issueKeys))
  {
    return none();
  }
  return some(containsAnyIssueKey(issueKeys));
}

代码示例来源:origin: com.atlassian.streams/streams-jira-plugin

private Option<String> getResolution(JiraActivityItem item)
  {
    for (GenericValue changeItem : getChangeItems(item))
    {
      if (RESOLUTION.equalsIgnoreCase(changeItem.getString("field")))
      {
        return helper.getNewChangeItemNameTranslation(changeItem);
      }
    }
    return none();
  }
}

代码示例来源:origin: com.atlassian.streams/streams-confluence-plugin

@Override
public ActivityItem newActivityItem(SpaceDescription space, boolean isCreationEvent)
{
  return new SpaceActivityItem(space,
      isCreationEvent,
      ImmutableList.of(activityObjectFactory.newActivityObject(space)),
      none(ActivityObject.class),
      spaceRendererFactory.newInstance(space));
}

代码示例来源:origin: com.atlassian.streams/streams-testing

@Test
public void assertThatUserViewPermissionIsUnknownWhenProjectDoesNotExist()
{
  setProjectExists(PROJECT_ENTITY_KEY, false);
  assertThat(provider.getCurrentUserViewPermission(getProjectEntityIdentifier(PROJECT_ENTITY_KEY)),
        equalTo(none(Boolean.class)));
}

代码示例来源:origin: com.atlassian.streams/streams-testing

@Test
public void assertThatUserEditPermissionIsUnknownWhenProjectDoesNotExist()
{
  setProjectExists(PROJECT_ENTITY_KEY, false);
  assertThat(provider.getCurrentUserEditPermission(getProjectEntityIdentifier(PROJECT_ENTITY_KEY)),
        equalTo(none(Boolean.class)));
}

代码示例来源:origin: com.atlassian.streams/streams-confluence-plugin

public Option<String> getSpaceKey()
{
  if (entity instanceof SpaceContentEntityObject)
  {
    return option(((SpaceContentEntityObject) entity.getLatestVersion()).getSpaceKey());
  }
  else
  {
    return none();
  }
}

代码示例来源:origin: com.atlassian.streams/streams-crucible-plugin

@Override
public Option<String> getFilterKey(EntityIdentifier identifier)
{
  if (identifier.getType().equals(project().iri()))
  {
    return some(PROJECT_KEY);
  }
  return none();
}

代码示例来源:origin: com.atlassian.streams/streams-crucible-plugin

@Override
public Option<URI> getEntityURI(EntityIdentifier identifier)
{
  if (identifier.getType().equals(project().iri()))
  {
    return some(URI.create(applicationProperties.getBaseUrl() + PROJECT_URL_PREFIX + identifier.getValue()));
  }
  return none();
}

代码示例来源:origin: com.atlassian.streams/streams-jira-plugin

private Option<Html> getDescription(Issue issue)
  {
    String newValueString = changeItem.getString("newstring");
    if (!isBlank(newValueString))
    {
      return option(helper.renderIssueFieldValue(issue, DESCRIPTION, newValueString)).flatMap(trimHtmlToNone());
    }
    return none();
  }
}

代码示例来源:origin: com.atlassian.streams/streams-confluence-plugin

public Option<String> getSpaceKey()
{
  if (attachment.getSpace() != null)
  {
    return option(attachment.getSpace().getKey());
  }
  else
  {
    return none();
  }
}

代码示例来源:origin: com.atlassian.streams/streams-jira-plugin

@Override
public Option<URI> getEntityURI(EntityIdentifier identifier)
{
  if (identifier.getType().equals(project().iri())
    || identifier.getType().equals(issue().iri()))
  {
    return some(URI.create(applicationProperties.getBaseUrl() + BROWSE + identifier.getValue()));
  }
  return none();
}

代码示例来源:origin: com.atlassian.streams/streams-crucible-plugin

@Override
public StreamsFeed call() throws Exception
{
  Iterable<StreamsEntry> entries = getCrucibleEntries(request);
  Iterable<StreamsEntry> sortedEntries = byPostedDate().sortedCopy(entries);
  return new StreamsFeed(i18nResolver.getText("streams.feed.crucible.title"),
              take(request.getMaxResults(), sortedEntries), none(String.class));
}

代码示例来源:origin: com.atlassian.streams/streams-fisheye-plugin

public Option<Html> apply(SummaryItem item)
  {
    if (item.getFileRevisionCount() > 0)
    {
      return some(new Html(i18nResolver.getText("streams.item.fisheye.more.files." +
            item.getState().toString().toLowerCase(),
          item.getFileRevisionCount())));
    }
    return none();
  }
}

代码示例来源:origin: com.atlassian.streams/streams-crucible-plugin

private Option<ActivityObjectType> type(StreamsCrucibleActivityItem activityItem)
{
  if (!SUPPORTED_ACTIONS.contains(activityItem.getLogAction()))
  {
    return none();
  }
  if (COMMENT_ADDED.equals(activityItem.getLogAction()))
  {
    return some(comment());
  }
  return some(review());
}

代码示例来源:origin: com.atlassian.streams/streams-jira-plugin

public Option<Pair<Comment, Html>> get()
  {
    if (!item.getComment().isDefined())
    {
      return none();
    }
    return some(pair(item.getComment().get(), item.getComment().map(commentRenderer).get()));
  }
});

相关文章