Guest User

Untitled

a guest
Feb 18th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. package com.pampushko.confluence.rest;
  2.  
  3. import com.pampushko.confluence.models.macros.Macros;
  4. import com.pampushko.confluence.settings.SettingsManager;
  5. import lombok.extern.slf4j.Slf4j;
  6.  
  7. import java.io.IOException;
  8. import java.util.HashMap;
  9. import java.util.Map;
  10. import java.util.Properties;
  11.  
  12. @Slf4j
  13. public class Main
  14. {
  15. public static final String url = "";
  16. private static final String username = "";
  17. private static final String password = "";
  18.  
  19. public static void main(String[] args) throws IOException
  20. {
  21. //читаем настройки приложения
  22. Properties settings = SettingsManager.getValues();
  23.  
  24. //вызываем билдер и создаем клиент
  25. Confluence confluence = Confluence.newBuilder().baseUrl(settings.getProperty("baseUrl")).username(settings.getProperty("username")).password(settings.getProperty("password")).build();
  26.  
  27. final String contentId = "983041";
  28.  
  29. Map<String, String> params = new HashMap<String, String>()
  30. {
  31. {
  32.  
  33. }
  34. };
  35. String macroId = "36050d1a-60a4-4586-b5b2-a610e69dc933";
  36. Macros contentMacroBodyByMacroId = confluence.getContentMacroBodyByMacroId(contentId, "4", macroId);
  37. System.out.println(contentMacroBodyByMacroId);
  38. }
  39. }
Add Comment
Please, Sign In to add comment