Tabnine Logo
Label.<init>
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: com.atlassian.jira/jira-api

  public Label create(String labelName) {
    return new Label(null, null, null, labelName);
  }
}
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
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 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

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

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.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.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));
    }
  }
}
com.atlassian.jira.issue.labelLabel<init>

Popular methods of Label

  • getLabel
  • getId

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
  • getContentResolver (Context)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JComboBox (javax.swing)
  • Top plugins for WebStorm
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