Tabnine Logo
Label
Code IndexAdd Tabnine to your IDE (free)

How to use
Label
in
com.atlassian.jira.issue.label

Best Java code snippets using com.atlassian.jira.issue.label.Label (Showing top 20 results out of 315)

origin: com.atlassian.jira/jira-core

  @Override
  public String apply(Label from)
  {
    return from.getLabel();
  }
});
origin: com.atlassian.jira/jira-api

  public Label create(String labelName) {
    return new Label(null, null, null, labelName);
  }
}
origin: com.atlassian.jira/jira-rest-plugin

  public LabelListStruct addLabel(Label label)
  {
    labels.add(new LabelStruct(label.getId(), label.getLabel()));
    return this;
  }
}
origin: com.atlassian.jira/jira-core

  @Override
  public String apply(Label from)
  {
    return from.getLabel();
  }
});
origin: com.atlassian.jira/jira-api

@Override
public Object getValueFromLuceneField(String documentValue)
{
  if (StringUtils.isEmpty(documentValue) || FieldIndexer.LABELS_NO_VALUE_INDEX_VALUE.equals(documentValue))
  {
    return null;
  }
  else
  {
    return new Label(null, null, documentValue);
  }
}
origin: com.atlassian.jira/jira-core

  @Override
  public String apply(Label from)
  {
    return from.getLabel();
  }
}));
origin: com.atlassian.jira/jira-core

public Set<Label> getLabels()
{
  @SuppressWarnings("unchecked")
  final List<String> fields = getMultipleValuesFromField(IssueFieldConstants.LABELS);
  final List<Label> labels = new ArrayList<Label>();
  for (String field : fields)
  {
    labels.add(new Label(null, getId(), field));
  }
  Collections.sort(labels, LabelComparator.INSTANCE);
  return Collections.unmodifiableSet(new LinkedHashSet<Label>(labels));
}
origin: com.atlassian.jira/jira-core

@Override
public String getStringFromSingularObject(final Label singularObject)
{
  if (singularObject == null)
  {
    return null;
  }
  return singularObject.getLabel();
}
origin: com.atlassian.jira/jira-core

@Override
protected Object getRelevantParams(final Map<String, String[]> params)
{
  String[] value = params.get(getId());
  if (value != null && value.length > 0)
  {
    final Set<Label> labels = new LinkedHashSet<Label>();
    for (String labelString : value)
    {
      labels.add(new Label(null, null, labelString));
    }
    return labels;
  }
  else
  {
    return Collections.<Label>emptySet();
  }
}
origin: com.atlassian.jira/jira-core

  public String apply(Label label)
  {
    return label.getLabel();
  }
}
origin: com.atlassian.jira/jira-core

public void populateParamsFromString(final Map<String, Object> fieldValuesHolder, final String stringValue, final Issue issue)
    throws FieldValidationException
{
  final String[] labels = StringUtils.split(stringValue, SEPARATOR_CHAR);
  if(labels != null)
  {
    final Set<Label> labelSet = new LinkedHashSet<Label>();
    for (String label : labels)
    {
      labelSet.add(new Label(null, issue.getId(), label));
    }
    fieldValuesHolder.put(getId(), labelSet);
  }
}
origin: com.atlassian.jira/jira-core

  @Override
  public String get(final Label input)
  {
    return input.getLabel();
  }
}));
origin: com.atlassian.jira/jira-core

public String getViewHtml(final FieldLayoutItem fieldLayoutItem, final Action action, final Issue issue, final Object value, final Map displayParameters)
{
  final Map<String, Object> velocityParameters = getVelocityParams(fieldLayoutItem, action, issue, displayParameters);
  velocityParameters.put("canEdit", Boolean.FALSE);
  Set<Label> labels = (value instanceof Set ? (Set<Label>)value : CollectionBuilder.<Label>newBuilder(new Label(null, issue.getId(), (String)value)).asHashSet() );
  velocityParameters.put("labels", labels);
  velocityParameters.put("fieldId", "label");
  velocityParameters.put("i18n", authenticationContext.getI18nHelper());
  velocityParameters.put("labelUtil", getLabelUtil());
  return renderTemplate("labels-view.vm", velocityParameters);
}
origin: com.atlassian.cpji/cpji-jira-plugin

@Override
protected String convertToString(final Label value)
{
  return value.getLabel();
}
origin: com.atlassian.jira/jira-core

  public Label get(final GenericValue input)
  {
    return new Label(input.getLong(ID), input.getLong(ISSUE_ID),
        input.getLong(CUSTOM_FIELD_ID), input.getString(LABEL));
  }
}
origin: com.atlassian.cpji/cpji-jira-plugin

  public String apply(final Label from) {
    return from.getLabel();
  }
});
origin: com.atlassian.jira/jira-core

@Override
public Label getSingularObjectFromString(final String string) throws FieldValidationException
{
  if (string == null)
  {
    return null;
  }
  final int labelLength = StringUtils.length(string.trim());
  if (LabelParser.isValidLabelName(string) && labelLength <= LabelParser.MAX_LABEL_LENGTH)
  {
    return new Label(null, null, string);
  }
  else
  {
    if (labelLength > LabelParser.MAX_LABEL_LENGTH)
    {
      throw new FieldValidationException(authContext.getI18nHelper().getText("label.service.error.label.toolong", string));
    }
    else
    {
      throw new FieldValidationException(authContext.getI18nHelper().getText("label.service.error.label.invalid", string));
    }
  }
}
origin: com.atlassian.jira/jira-core

  public String getIndexedValue(final Label label)
  {
    if(lowerCasing)
    {
      return label.getLabel().toLowerCase();
    }
    else
    {
      return label.getLabel();
    }
  }
}
origin: com.atlassian.jira/jira-core

private boolean containsLabel(final String label, final Set<Label> labels)
{
  for (Label issueLabel : labels)
  {
    if (issueLabel.getLabel().equals(label))
    {
      return true;
    }
  }
  return false;
}
origin: com.atlassian.jira/jira-api

  public int compare(final Label label1, final Label label2)
  {
    if (label1 == null && label2 == null)
    {
      return 0;
    }

    if (label1 == null)
    {
      return 1;
    }

    if (label2 == null)
    {
      return -1;
    }

    return label1.getLabel().compareTo(label2.getLabel());
  }
}
com.atlassian.jira.issue.labelLabel

Javadoc

Represents a Label for an issue

Most used methods

  • getLabel
  • <init>
  • getId

Popular in Java

  • Updating database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Path (java.nio.file)
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • JButton (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top plugins for Android Studio
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