Advertisement
Guest User

Menu

a guest
Feb 12th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.02 KB | None | 0 0
  1. package com.company;
  2. import java.util.Scanner;
  3. public class Menu {
  4.  
  5.     private int opcja;
  6.     String restCall;
  7.     GetIssue getIssue = new GetIssue();
  8.     RestApiGet restApiGet = new RestApiGet();
  9.     Login login = new Login();
  10.  
  11.     private Scanner input = new Scanner(System.in);
  12.     private String output = restApiGet.getOutput();
  13.  
  14.  
  15.     void setOpcja(){
  16.  
  17.         System.out.println("Wybierz opcję:");
  18.         System.out.println("1-Wyświetl zgłoszenie");
  19.         System.out.println("2-wyszukaj zgłoszenie");
  20.  
  21.         this.opcja = input.nextInt();
  22.  
  23.         switch(this.opcja)
  24.         {
  25.             case 1:
  26.             System.out.println("Wybrałeś opcję wyświetlenia zgłoszenia.");
  27.             getIssue.setIssueKey();
  28.             System.out.println("Wybrałeś zgłoszenie: " + getIssue.getIssueKey());
  29.             restApiGet.setOutput(login.getUsername(),login.getPassword(),"/rest/api/latest/issue/"+getIssue.getIssueKey());
  30.            System.out.println(restApiGet.getOutput());
  31.         }
  32.  
  33.     }
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement