PageRenderTime 36ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/src/main/resources/com/onresolve/jira/groovy/canned/admin/WontCompile313.groovy

https://bitbucket.org/sorin/jira-plugin-intellij
Groovy | 59 lines | 48 code | 10 blank | 1 comment | 1 complexity | 55f210efd7979681a9051ec8530d139e MD5 | raw file
  1. package com.onresolve.jira.groovy.canned.admin
  2. // import com.xyz.no.such
  3. import com.onresolve.jira.groovy.canned.CannedScript
  4. import com.atlassian.jira.util.SimpleErrorCollection
  5. import com.atlassian.jira.util.ErrorCollection
  6. public class WontCompile implements CannedScript {
  7. public String getName() {
  8. "WontCompile for JIRA 3.13.x and below"
  9. }
  10. public String getDescription() {
  11. "XXX this class should really not compile"
  12. }
  13. List getCategories() {
  14. ["ADMIN"]
  15. }
  16. public List getParameters(Map params) {
  17. [
  18. [
  19. Label:"Project",
  20. Name:"Project",
  21. Description:"Project",
  22. ],
  23. [
  24. Name:"Remote User",
  25. Label:"Remote User",
  26. Description:"A user id",
  27. ],
  28. ]
  29. }
  30. ErrorCollection doValidate(Map params, boolean forPreview) {
  31. System.out.println("GetUser.doValidate");
  32. SimpleErrorCollection errorCollection = new SimpleErrorCollection()
  33. if (!params["Project"]) {
  34. errorCollection.addError "Project", "Project required"
  35. }
  36. return errorCollection
  37. }
  38. Map doScript(Map params) {
  39. System.out.println(this.class.getName());
  40. System.out.println("WontCompile.doScript");
  41. ["output":"The script has run with arg ${params["Project"]}"]
  42. }
  43. String getDescription(Map params, boolean forPreview) {
  44. "getDescription(Map args) - args are: " + args
  45. }
  46. public Boolean isFinalParamsPage(Map params) {
  47. true
  48. }
  49. }