com.atlassian.jira.project.Project.getId()方法的使用及代码示例

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

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

Project.getId介绍

暂无

代码示例

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

@Override
  public Long apply(final Project project)
  {
    return project.getId();
  }
};

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

@Nonnull
public Long getProjectId()
{
  return project.getId();
}

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

@Nonnull
public Long getProjectId()
{
  return project.getId();
}

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

@Nonnull
public Long getProjectId()
{
  return project.getId();
}

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

@Override
  public boolean apply(@Nullable final Project input)
  {
    return input != null && projectIds.contains(input.getId());
  }
}));

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

/**
   * @return the project ID
   */
  @Nonnull
  public Long getId()
  {
    return getProject().getId();
  }
}

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

public Long getSelectedProjectId()
{
  final Project project = getSelectedProjectObject();
  return project == null ? null : project.getId();
}

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

/**
 * Converts list of issue type ids to {@link com.atlassian.jira.issue.context.IssueContext IssueContexts}.
 *
 * @param project          The project (may be null).
 * @param issueTypeIds     Type ids as strings, eg. ["3", "4"]. May be null or empty.
 * @return a list of issue contexts, never null
 */
public static List<IssueContext> convertToIssueContexts(final Project project, final List<String> issueTypeIds)
{
  final Long projectId = project == null ? null : project.getId();
  return convertToIssueContexts(projectId, issueTypeIds);
}

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

/**
 * Set project by its user-visible name ("Test Project" etc). Equivalent to {@link #setProjectId}.
 */
public void setProjectName(String projectName)
{
  Project project = projectManager.getProjectObjByName(projectName);
  if (project != null) this.projectId = project.getId();
}

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

@Override
public List<Version> getVersions(Project project)
{
  return getVersions(project.getId());
}

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

/**
 * @return the project ID
 */
@Nonnull
public Long getId()
{
  return getProject().getId();
}

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

@Override
public void setSchemeForProject(Project project, Long schemeId)
{
  // remove any existing association
  nodeAssociationStore.removeAssociationsFromSource(ISSUE_SECURITY_SCHEME_ASSOCIATION, project.getId());
  // Add new association if not null
  if (schemeId != null)
    nodeAssociationStore.createAssociation(ISSUE_SECURITY_SCHEME_ASSOCIATION, project.getId(), schemeId);
  flushProjectSchemes();
}

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

@Override
@Nullable
public FieldConfigScheme getRelevantConfigScheme(final Project project, final ConfigurableField field)
{
  final Long projectId = project == null ? null : project.getId();
  return getRelevantConfigScheme(projectId, field.getId());
}

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

public void mapProjects(final SimpleProjectImportIdMapper projectMapper)
{
  // Create a Map from the name to the ID for the objects in the current System.
  final Map<String, String> nameToIdMap = new HashMap<String, String>();
  for (final Project project : projectManager.getProjectObjects())
  {
    nameToIdMap.put(project.getKey(), project.getId().toString());
  }
  // Use this name-id map to add automatic mappings to our ProjectImportIdMapper
  autopopulateMapper(projectMapper, nameToIdMap);
}

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

public void setSelectedProject(Project project)
  {
    if (project == null)
    {
      setSelectedProjectId(null);
    }
    else
    {
      setSelectedProjectId(project.getId());
    }
  }
}

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

public Collection<ProjectComponent> getComponents()
{
  try
  {
    return projectComponentManager.findAllForProject(getProject().getId());
  }
  catch (GenericEntityException e)
  {
    return Collections.EMPTY_LIST;
  }
}

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

Set<ProjectIssueTypeContext> getContextsForProject(final ApplicationUser searcher, final Project project)
{
  if (project == null || !permissionManager.hasPermission(BROWSE_PROJECTS, project, searcher))
  {
    return Collections.emptySet();
  }
  else
  {
    return Collections.<ProjectIssueTypeContext>singleton(new ProjectIssueTypeContextImpl(new ProjectContextImpl(project.getId()), AllIssueTypesContext.INSTANCE));
  }
}

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

@Override
public Collection<Version> getVersionsArchived(final Project project)
{
  final Iterable<Version> versions = versionStore.getVersionsByProject(project.getId());
  return filterVersions(versions, isArchived());
}

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

@Override
public Set<CustomField> getAvailableCustomFields(final ApplicationUser remoteUser, final Issue issue) throws FieldException
{
  final Project project = issue.getProjectObject();
  // TODO: Do we really want to do this null check? It was just copied from the old GenericValue version of this method.
  final List<Long> projectList = (project == null) ? Collections.<Long>emptyList() : CollectionBuilder.list(project.getId());
  return getAvailableCustomFieldsWithScope(remoteUser, projectList, CollectionBuilder.list(issue.getIssueTypeId()));
}

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

private long[] getProjectIssuesFromLucene() throws SearchException
{
  final ProjectIssueCollector issueCollector = new ProjectIssueCollector();
  final JqlClauseBuilder builder = JqlQueryBuilder.newBuilder().where().project(project.getId());
  searchProvider.searchOverrideSecurity(builder.buildQuery(), (ApplicationUser) null, issueCollector);
  return issueCollector.getIssueIds();
}

相关文章