Tabnine Logo
ProjectService.getProjectById
Code IndexAdd Tabnine to your IDE (free)

How to use
getProjectById
method
in
com.atlassian.jira.bc.project.ProjectService

Best Java code snippets using com.atlassian.jira.bc.project.ProjectService.getProjectById (Showing top 7 results out of 315)

origin: com.atlassian.jira/jira-gadgets-plugin

  @Override
  public Project apply(@Nullable final String input)
  {
    Long id = new Long(input);
    ProjectService.GetProjectResult projectResult = projectService.getProjectById(user, id);
    if (projectResult.isValid())
    {
      return projectResult.getProject();
    }
    return null;
  }
});
origin: com.atlassian.jira/jira-rest-plugin

public ProjectService.GetProjectResult getGetProjectByIdOrKey(final ApplicationUser user, final String projectIdOrKey)
{
  return isProjectId(projectIdOrKey)
      ? projectService.getProjectById(user, Long.parseLong(projectIdOrKey))
      : projectService.getProjectByKey(user, projectIdOrKey);
}
origin: com.atlassian.jira/jira-rest-plugin

private Project getProject(final ApplicationUser user, final Long id)
{
  return throw404WhenInvalid(projectService.getProjectById(user, id)).getProject();
}
origin: com.atlassian.jira/jira-rest-plugin

private Project getProject(ApplicationUser user, Long id)
{
  ProjectService.GetProjectResult projectResult = projectService.getProjectById(user, id);
  if (projectResult.isValid())
  {
    return projectResult.getProject();
  }
  else
  {
    return throwFourOhFour(projectResult.getErrorCollection());
  }
}
origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin

Project retrieveProjectById(Long id, User user) throws RemoteException
{
  final com.atlassian.jira.bc.project.ProjectService.GetProjectResult result = projectService.getProjectById(user, id);
  if (!result.isValid())
  {
    throw new RemoteValidationException("Error retrieving project with id '" + id + "':", result.getErrorCollection());
  }
  else
  {
    return result.getProject();
  }
}
origin: com.atlassian.jira/jira-rest-plugin

private Project getProject(ProjectComponent component)
{
  ProjectService.GetProjectResult projectResult = projectService.getProjectById(authContext.getUser(), component.getProjectId());
  if (!projectResult.isValid())
  {
    throw new NotFoundWebException(ErrorCollection.of(projectResult.getErrorCollection()));
  }
  return projectResult.getProject();
}
private Project getProjectForAdmin(ProjectComponent component)
origin: com.atlassian.jira/jira-gadgets-plugin

projectResult = projectService.getProjectById(user, operand.getLongValue());
com.atlassian.jira.bc.projectProjectServicegetProjectById

Javadoc

Used to retrieve a com.atlassian.jira.project.Project object by id. This method returns a com.atlassian.jira.bc.project.ProjectService.GetProjectResult. The project will be null if no project for the id specified can be found, or if the user making the request does not have the BROWSE project permission for the project. In both of these cases, the errorCollection in the result object will contain an appropriate error message.

Popular methods of ProjectService

  • getProjectByKey
    Used to retrieve a com.atlassian.jira.project.Project object by key. This method returns a com.atlas
  • deleteProject
    Deletes the project provided by the deleteProjectValidationResult. There's a number of steps involve
  • getProjectByKeyForAction
    Used to retrieve a com.atlassian.jira.project.Project object by key providing the user can perform t
  • updateProject
    Using the validation result from #validateUpdateProject(User,String,String,String,String,String,Long
  • validateDeleteProject
    Validation to delete a project is quite straightforward. The user must have global admin rights and
  • validateUpdateProject
    Validates updating a project's details. The project is looked up by the key provided. If no project
  • createProject
    Using the validation result from #validateCreateProject(ApplicationUser,ProjectCreationData) a new p
  • getAllProjectsForAction
    Used to retrieve a list of com.atlassian.jira.project.Project objects. This method returns a com.atl
  • getProjectByIdForAction
    Used to retrieve a com.atlassian.jira.project.Project object by id providing the user can perform th
  • updateProjectSchemes
    Updates the project schemes for a particular project, given a validation result and project to updat
  • validateCreateProject
    This method needs to be called before creating a project to ensure all parameters are correct. There
  • validateUpdateProjectSchemes
    If the scheme ids are not null or -1 (-1 is often used to reset schemes), then an attempt will be ma
  • validateCreateProject,
  • validateUpdateProjectSchemes,
  • getAllProjects,
  • getMaximumKeyLength,
  • getMaximumNameLength,
  • isValidProjectKey,
  • updateProjectType

Popular in Java

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • JCheckBox (javax.swing)
  • JList (javax.swing)
  • Top Vim 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