Advertisement
Guest User

Untitled

a guest
Oct 15th, 2017
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.72 KB | None | 0 0
  1. public class BotDataInit {
  2.  
  3.  
  4.     @Autowired
  5.     private MentorService mentorService;
  6.     @Autowired
  7.     private PropertyService propertyService;
  8.  
  9.     private void initData() throws IOException {
  10.         Mentor mentor1 = new Mentor();
  11.         mentor1.setRealName("Stas");
  12.         mentor1.setSlackId("U3U5H89NX");
  13.         mentor1.setUserMail("sorokin.sta@gmail.com");
  14.         mentor1.setPassword("test");
  15.         mentor1.setSlackName("sorokin.sta");
  16.         mentorService.addMentor(mentor1);
  17.  
  18.         Mentor mentor2 = new Mentor();
  19.         mentor2.setRealName("German");
  20.         mentor2.setSlackId("U2AEH909M");
  21.         mentor2.setUserMail("test@mail.ru");
  22.         mentor2.setPassword("test");
  23.         mentor2.setSlackName("germansevostyanov");
  24.         mentorService.addMentor(mentor2);
  25.  
  26.         Mentor mentor3 = new Mentor();
  27.         mentor3.setRealName("Nikita");
  28.         mentor3.setSlackId("U44UYHJ5A");
  29.         mentor3.setUserMail("nikitaunmortal@gmail.com");
  30.         mentor3.setPassword("test");
  31.         mentor3.setSlackName("NikitaTitov");
  32.         mentorService.addMentor(mentor3);
  33.  
  34.         Property property1 = new Property();
  35.         property1.setPKey("client_secret");
  36.         property1.setValue("{\"installed\":{\"client_id\":\"225174500263-8hmbr0q326qvkpftaqi4vbtfkbmbiprd.apps.googleusercontent.com\",\"project_id\":\"unified-parser-132811\",\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"token_uri\":\"https://accounts.google.com/o/oauth2/token\",\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\",\"client_secret\":\"CMAypaIfmuQ7O-uct2f6cp2C\",\"redirect_uris\":[\"urn:ietf:wg:oauth:2.0:oob\",\"http://localhost\"]}}");
  37.         propertyService.addProperty(property1);
  38.  
  39.         Property property2 = new Property();
  40.         property2.setPKey("auth_token");
  41.         property2.setValue("xoxb-163121471008-msVR3k38qH0aZZZWIzKiaQFe");
  42.         propertyService.addProperty(property2);
  43.  
  44.         Property property3 = new Property();
  45.         property3.setPKey("range.emails");
  46.         property3.setValue("B:B");
  47.         propertyService.addProperty(property3);
  48.  
  49.         Property property4 = new Property();
  50.         property4.setPKey("range.prices");
  51.         property4.setValue("E:E");
  52.         propertyService.addProperty(property4);
  53.  
  54.         Property property5 = new Property();
  55.         property5.setPKey("range.isLearning");
  56.         property5.setValue("I:I");
  57.         propertyService.addProperty(property5);
  58.  
  59.         Property property6 = new Property();
  60.         property6.setPKey("spreadsheet_link");
  61.         property6.setValue("https://docs.google.com/spreadsheets/d/1UPib4muF_et-U-CQeBLEV2NGnp37CiftO6WIC3xTHIQ/edit");
  62.         propertyService.addProperty(property6);
  63.  
  64.     }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement