Codota Logo
ProjectService.getProjectByKey
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
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

final ProjectService.GetProjectResult projectResult = projectService.getProjectByKey(authenticationContext.getUser(), projectKey);
if (!projectResult.isValid())
origin: com.atlassian.streams/streams-jira-plugin

  public Option<Object> apply(String key)
  {
    ApplicationUser loggedInUser = jiraAuthenticationContext.getLoggedInUser();

    ProjectService.GetProjectResult projectByKey = projectService.getProjectByKey(loggedInUser, key);

    Option<Object> option;
    if (projectByKey.isValid())
    {
      option = Option.<Object>some(projectByKey.getProject());
    }
    else
    {
      option = Option.none();
    }

    return option;
  }
}
origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin

/**
 * Retrieve a single project, throwing an exception if the user has no permissions.
 */
Project retrieveProjectByKey(String projectKey, User user)
    throws RemoteException
{
  try
  {
    final com.atlassian.jira.bc.project.ProjectService.GetProjectResult result = projectService.getProjectByKey(user, projectKey);
    if (!result.isValid())
    {
      throw new RemoteValidationException("Error retrieving project with key '" + projectKey + "':", result.getErrorCollection());
    }
    else
    {
      return result.getProject();
    }
  }
  catch (DataAccessException e)
  {
    throw new RemoteException("Error retrieving project: " + projectKey, e);
  }
}
origin: com.atlassian.jira/jira-gadgets-plugin

if (operand.getStringValue() != null)
  projectResult = projectService.getProjectByKey(user, operand.getStringValue());
com.atlassian.jira.bc.projectProjectServicegetProjectByKey

Javadoc

Used to retrieve a com.atlassian.jira.project.Project object by key. This method returns a com.atlassian.jira.bc.project.ProjectService.GetProjectResult. The project will be null if no project for the key 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

  • deleteProject
    Deletes the project provided by the deleteProjectValidationResult. There's a number of steps involve
  • getProjectById
    Used to retrieve a com.atlassian.jira.project.Project object by id. This method returns a com.atlass
  • 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

  • Making http requests using okhttp
  • getExternalFilesDir (Context)
  • getResourceAsStream (ClassLoader)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • Runner (org.openjdk.jmh.runner)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now