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

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

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

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

final ProjectService.UpdateProjectSchemesValidationResult schemesValidationResult = projectService.validateUpdateProjectSchemes(
    authContext.getUser(), project.getPermissionScheme(), project.getNotificationScheme(), project.getIssueSecurityScheme());
origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin

public RemoteProject updateProject(User user, RemoteProject rProject) throws RemoteException
{
  //Note: The permissionScheme should never be null, but just in case.
  final Long permissionSchemeId = rProject.getPermissionScheme() == null ? null : rProject.getPermissionScheme().getId();
  final Long notificationSchemeId = rProject.getNotificationScheme() == null ? null : rProject.getNotificationScheme().getId();
  final Long issueSecuritySchemeId = rProject.getIssueSecurityScheme() == null ? null : rProject.getIssueSecurityScheme().getId();
  com.atlassian.jira.bc.project.ProjectService.UpdateProjectValidationResult result =
      projectService.validateUpdateProject(user, rProject.getName(), rProject.getKey(), rProject.getDescription(),
          rProject.getLead(), rProject.getProjectUrl(), null);
  com.atlassian.jira.bc.project.ProjectService.UpdateProjectSchemesValidationResult schemesResult =
      projectService.validateUpdateProjectSchemes(user, permissionSchemeId, notificationSchemeId, issueSecuritySchemeId);
  ErrorCollection errors = new SimpleErrorCollection();
  errors.addErrorCollection(result.getErrorCollection());
  errors.addErrorCollection(schemesResult.getErrorCollection());
  if (errors.hasAnyErrors())
  {
    throw new RemoteValidationException("Cannot update project: ", errors);
  }
  final Project updatedProject = projectService.updateProject(result);
  projectService.updateProjectSchemes(schemesResult, updatedProject);
  final RemoteProject remoteProject = new RemoteProject(updatedProject, applicationProperties);
  remoteProject.setNotificationScheme(rProject.getNotificationScheme());
  remoteProject.setPermissionScheme(rProject.getPermissionScheme());
  remoteProject.setIssueSecurityScheme(rProject.getIssueSecurityScheme());
  return remoteProject;
}
origin: com.atlassian.jira/jira-rest-plugin

if (basicValidationResult.isValid())
  final ProjectService.UpdateProjectSchemesValidationResult schemesValidationResult = projectService.validateUpdateProjectSchemes(authContext.getUser(),
      firstNotNullId(updateData.getPermissionScheme(), permissionSchemeManager.getSchemeFor(projectToEdit)),
      firstNotNullId(updateData.getNotificationScheme(), notificationSchemeManager.getSchemeFor(projectToEdit)),
origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin

projectService.validateUpdateProjectSchemes(user, permissionSchemeId, notificationSchemeId, issueSecuritySchemeId);
com.atlassian.jira.bc.projectProjectServicevalidateUpdateProjectSchemes

Javadoc

If the scheme ids are not null or -1 (-1 is often used to reset schemes), then an attempt will be made to retrieve the scheme. If this attempt fails an error will be added. IssueSecuritySchemes will only be validated in enterprise edition.

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
  • 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
  • updateProjectSchemes,
  • validateCreateProject,
  • getAllProjects,
  • getMaximumKeyLength,
  • getMaximumNameLength,
  • isValidProjectKey,
  • updateProjectType

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top plugins for Android Studio
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