congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Pair.second
Code IndexAdd Tabnine to your IDE (free)

How to use
second
method
in
com.atlassian.jira.util.lang.Pair

Best Java code snippets using com.atlassian.jira.util.lang.Pair.second (Showing top 20 results out of 315)

origin: com.atlassian.jira/jira-api

public Option getChild()
{
  return this.options.second();
}
origin: com.atlassian.jira/jira-core

@edu.umd.cs.findbugs.annotations.SuppressWarnings(value="UG_SYNC_SET_UNSYNC_GET", justification="This is a valid unsynchronized getter")
public CurrentApplication getCurrentApplication()
{
  return cache.get().second();
}
origin: com.atlassian.jira/jira-core

@Override
public boolean isSnapshot()
{
  return parseVersion(getVersion()).second().toUpperCase().startsWith("-SNAPSHOT");
}
origin: com.atlassian.jira/jira-core

  @Override
  public void doWith(final Method method) throws IllegalArgumentException, IllegalAccessException
  {
    Option<Pair<String, Object>> pair = invoke(targetObject, method);
    for (Pair<String, Object> tuple : pair)
    {
      Object value = tuple.second();
      if (value instanceof Map)
      {
        //noinspection unchecked
        data.putAll((Map<String, Object>) value);
      }
      else
      {
        data.put(tuple.first(), value);
      }
    }
  }
},
origin: com.atlassian.jira/jira-core

@Override
public boolean isMilestone()
{
  return parseVersion(getVersion()).second().toLowerCase().startsWith("-m");
}
origin: com.atlassian.jira/jira-core

@Override
public boolean isRc()
{
  return parseVersion(getVersion()).second().toLowerCase().startsWith("-rc");
}
origin: com.atlassian.jira/jira-core

@Override
public boolean isBeta()
{
  return parseVersion(getVersion()).second().toLowerCase().startsWith("-beta");
}
origin: com.atlassian.jira/jira-core

/**
 * Converts the usernames into User objects using the given function.
 *
 * @param watchers a Pair of watcher count and watcher usernames
 * @param function a Function used for conversion
 * @return a Pair of watcher count and User object
 */
protected <T extends ApplicationUser> Pair<Integer, List<T>> convertUsers(final Pair<Integer, List<String>> watchers,
    final Function<String, T> function)
{
  return Pair.<Integer, List<T>>of(
      watchers.first(),
      copyOf(Iterables.transform(watchers.second(), function))
  );
}
origin: com.atlassian.jira/jira-core

private Iterable<NotificationRecipient> getWatchersRecipients(ApplicationUser remoteUser, Issue issue)
{
  return transform(watcherService.getWatchers(issue, remoteUser).getReturnedValue().second(), new UserToNotificationRecipientFunction());
}
origin: com.atlassian.jira/jira-core

  public void registerWith(final ComponentContainer.Scope defaultScope, final ComponentContainer container)
  {
    Assertions.stateTrue("must implement some interfaces", !implementing.isEmpty());

    //at first register under concrete implementation key with default adapter factory
    if(parameters.isEmpty())
      container.implementation(ComponentContainer.Scope.INTERNAL, concrete, concrete);
    else
      container.implementation(ComponentContainer.Scope.INTERNAL, concrete, concrete, parameters.toArray(new Parameter[parameters.size()]));

    final ComponentAdapter adapter = container.getComponentAdapter(concrete);
    for (Pair<Class<? super T>, ComponentContainer.Scope> pair : implementing)
    {
      ComponentAdapter delegatingAdapter = new KeyedDelegateComponentAdapter<T>(pair.first(), adapter);
      container.component(pair.second() != null ? pair.second() : defaultScope, delegatingAdapter);
    }

  }
}
origin: com.atlassian.jira/jira-core

@Override
public void doFilter(final ServletRequest servletRequest, final ServletResponse servletResponse, final FilterChain filterChain)
    throws IOException, ServletException
{
  Pair<ServletRequest, ServletResponse> debugWrapped = wrap(servletRequest, servletResponse);
  super.doFilter(debugWrapped.first(), debugWrapped.second(), filterChain);
}
origin: com.atlassian.jira/jira-core

  @Override
  public void apply(final Pair<String, ErrorCollection.Reason> error)
  {
    errors.addError(nameFieldName, authenticationContext.getI18nHelper().getText(error.first()), error.second());
  }
});
origin: com.atlassian.jira/jira-core

@Override
MigrationState migrate(MigrationState state, final boolean licenseSuppliedByUser)
{
  final Set<Group> sdAgentGroups = globalPermissionDao.groupsWithSdAgentPermission();
  final List<String> notMigratedGroups = new ArrayList<>();
  for (Group sdAgentGroup : sdAgentGroups)
  {
    Pair<MigrationState, Boolean> result = checkGroupAndMigrate(sdAgentGroup, state);
    if (!result.second())
    {
      notMigratedGroups.add(sdAgentGroup.getName());
    }
    state = result.first();
  }
  return state.withAfterSaveTask(() -> saveNotMigratedGroups(notMigratedGroups));
}
origin: com.atlassian.jira/jira-core

  @Override
  public void apply(final Pair<String, ErrorCollection.Reason> error)
  {
    errors.addError(nameFieldName, authenticationContext.getI18nHelper().getText(error.first()), error.second());
  }
});
origin: com.atlassian.jira/jira-core

@Override
public ServiceOutcome<List<ApplicationUser>> addWatcher(final Issue issue, final ApplicationUser remoteUser, final ApplicationUser watcher)
    throws WatchingDisabledException
{
  Pair<Boolean, String> canWatchIssue = canWatchIssue(issue, remoteUser, watcher);
  if (canWatchIssue.first().booleanValue())
  {
    watcherManager.startWatching(watcher, issue);
    return ServiceOutcomeImpl.ok(getCurrentWatchersFor(issue));
  }
  return ServiceOutcomeImpl.error(canWatchIssue.second());
}
origin: com.atlassian.jira/jira-core

@Override
public ServiceOutcome<List<ApplicationUser>> removeWatcher(final Issue issue, final ApplicationUser remoteUser, final ApplicationUser watcher)
    throws WatchingDisabledException
{
  Pair<Boolean, String> canUnwatchIssue = canUnwatchIssue(issue, remoteUser, watcher);
  if (canUnwatchIssue.first().booleanValue())
  {
    watcherManager.stopWatching(watcher, issue);
    return ServiceOutcomeImpl.ok(getCurrentWatchersFor(issue));
  }
  return ServiceOutcomeImpl.error(canUnwatchIssue.second());
}
origin: com.atlassian.jira/jira-rest-plugin

private WatchersBean buildBean(final Issue issue, final ApplicationUser callingUser)
{
  try
  {
    Pair<Integer, List<ApplicationUser>> watcherCountList = watcherService.getWatchers(issue, callingUser).get();
    List<UserJsonBean> watcherUserBeans = transform(watcherCountList.second(), toJson(callingUser));
    log.trace("Visible watchers on issue '{}': {}", issue.getKey(), watcherUserBeans);
    return WatchersBean.Builder.create()
        .self(selfLink(issue))
        .isWatching(watcherCountList.second().contains(callingUser))
        .watchers(watcherUserBeans)
        .watchCount(watcherCountList.first())
        .build();
  }
  catch (WatchingDisabledException e)
  {
    return null; // don't report any watcher info
  }
}
origin: com.atlassian.jira/jira-core

private Option<ErrorCollection> validateName(final String name, final Option<IssueType> issueTypeToUpdate)
{
  final Option<Pair<String, ErrorCollection.Reason>> nameValidation = constantsManager.validateName(name, issueTypeToUpdate);
  if (nameValidation.isDefined())
  {
    return errorCollection("name", nameValidation.get().first(), nameValidation.get().second());
  }
  return none();
}
origin: com.atlassian.jira/jira-core

@Override
public Unit get(final AttachmentGetData attachmentGetData)
{
  final Pair<InputStream, Effect<Object>> streamWithCloseHandler = resendingAttachmentStreamCreator
      .getInputStreamWithCloseHandler(attachmentGetData);
  final Effect<Object> cleanup = streamWithCloseHandler.second();
  try
  {
    final StoreAttachmentBean storeAttachmentBean = new StoreAttachmentBean.Builder(streamWithCloseHandler.first())
        .withSize(attachmentGetData.getSize())
        .withKey(attachmentKey)
        .build();
    store.putAttachment(storeAttachmentBean)
        .then(getFutureCallbackFromEffect(cleanup));
    return Unit.VALUE;
  }
  catch (final RuntimeException e)
  {
    cleanup.apply(Unit.VALUE);
    throw e;
  }
}
origin: com.atlassian.jira/jira-core

public ApplicationPropertiesServiceImpl(ApplicationPropertiesStore applicationPropertiesStore, EventPublisher eventPublisher, PermissionManager permissionManager, JiraAuthenticationContext authenticationContext, FeatureManager featureManager)
{
  this.applicationPropertiesStore = applicationPropertiesStore;
  this.eventPublisher = eventPublisher;
  this.permissionManager = permissionManager;
  this.authenticationContext = authenticationContext;
  this.featureManager = featureManager;
  this.featurePredicate = input -> {
    if (input.getMetadata().getRequiredFeatureKey() == null)
    {
      return true;
    }
    if (input.getMetadata().getRequiredFeatureKey().second())
    {
      return ApplicationPropertiesServiceImpl.this.featureManager.isEnabled(input.getMetadata().getRequiredFeatureKey().first());
    }
    else
    {
      return !ApplicationPropertiesServiceImpl.this.featureManager.isEnabled(input.getMetadata().getRequiredFeatureKey().first());
    }
  };
}
com.atlassian.jira.util.langPairsecond

Popular methods of Pair

  • first
  • nicePairOf
    A pair that does allows null values.
  • of
    By default we create a strict pair of non-null values.
  • strictPairOf
    A pair that doesn't allow null values.
  • <init>

Popular in Java

  • Making http requests using okhttp
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JButton (javax.swing)
  • JComboBox (javax.swing)
  • JList (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now