congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ProjectService.getProjectByKeyForAction
Code IndexAdd Tabnine to your IDE (free)

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

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

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

public ProjectService.GetProjectResult getGetProjectForActionByIdOrKey(final ApplicationUser user, final String projectIdOrKey, final ProjectAction action)
{
  return isProjectId(projectIdOrKey)
      ? projectService.getProjectByIdForAction(user, Long.parseLong(projectIdOrKey), action)
      : projectService.getProjectByKeyForAction(user, projectIdOrKey, action);
}
origin: com.atlassian.jira/jira-core

private ProjectService.GetProjectResult getProjectResult()
{
  if (result == null && hasKey())
  {
    result = service.getProjectByKeyForAction(authCtx.getUser(), projectKey, EDIT_PROJECT_CONFIG);
  }
  return result;
}
origin: com.atlassian.jira/jira-core

final ProjectService.GetProjectResult projectResult = projectService.getProjectByKeyForAction(authenticationContext.getUser(), projectKey, ProjectAction.EDIT_PROJECT_CONFIG);
origin: com.atlassian.labs.hipchat/hipchat-for-jira-plugin

@Override
public void doGet(final HttpServletRequest request,
         final HttpServletResponse response) throws IOException, ServletException {
  final Matcher matcher = PATTERN.matcher(request.getPathInfo());
  if (matcher.matches()) {
    String projectKey = matcher.group(1);
    final ApplicationUser user = authenticationContext.getUser();
    ProjectService.GetProjectResult result = projectService.getProjectByKeyForAction(user,
                                             projectKey,
                                             ProjectAction.EDIT_PROJECT_CONFIG);
    if (result.isValid()) {
      Project project = result.getProject();
      final Map<String, Object> context = velocityParamFactory.getDefaultVelocityParams(MapBuilder.<String, Object>newBuilder()
                                                    .add("project",
                                                       project)
                                                    .add(POST_FUNCTIONS_KEY_NAME,
                                                       getHipChatPostFunctions(
                                                           project))
                                                    .add(HAS_HIP_CHAT_API_TOKEN,
                                                       hasHipChatApiToken())
                                                    .toMap(),
                                               authenticationContext
      );
      // The content-type needs to be set so that Sitemesh will decorate responses generated by Velocity correctly.
      response.setContentType("text/html; charset=UTF-8");
      renderer.render("templates/hip-chat-notifications.vm", context, response.getWriter());
    }
  }
}
origin: com.atlassian.jira/jira-rest-plugin

projectService.getProjectByKeyForAction(authContext.getUser(), projectKey, VIEW_PROJECT);
origin: com.atlassian.jira/jira-rest-plugin

ProjectService.GetProjectResult getResult = projectService.getProjectByKeyForAction(user, bean.getProject(),
    ProjectAction.EDIT_PROJECT_CONFIG);
if (!getResult.isValid())
origin: com.atlassian.jira/jira-rest-plugin

    projectService.getProjectByKeyForAction(user, bean.getProject(), ProjectAction.EDIT_PROJECT_CONFIG);
if (!getResult.isValid())
com.atlassian.jira.bc.projectProjectServicegetProjectByKeyForAction

Javadoc

Used to retrieve a com.atlassian.jira.project.Project object by key providing the user can perform the passed action on the project. 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 cannot perform the passed action on 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
  • getProjectById
    Used to retrieve a com.atlassian.jira.project.Project object by id. This method returns a com.atlass
  • 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 post requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSystemService (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now