|
18 | 18 | */ |
19 | 19 | package io.meeds.crowdin.gamification.storage; |
20 | 20 |
|
21 | | -import io.meeds.crowdin.gamification.model.*; |
22 | | -import org.apache.commons.httpclient.HttpStatus; |
| 21 | +import static io.meeds.crowdin.gamification.utils.Utils.APPROVALS; |
| 22 | +import static io.meeds.crowdin.gamification.utils.Utils.AUTHORIZATION; |
| 23 | +import static io.meeds.crowdin.gamification.utils.Utils.COMMENT_CREATED_TRIGGER; |
| 24 | +import static io.meeds.crowdin.gamification.utils.Utils.COMMENT_DELETED_TRIGGER; |
| 25 | +import static io.meeds.crowdin.gamification.utils.Utils.CROWDIN_API_URL; |
| 26 | +import static io.meeds.crowdin.gamification.utils.Utils.CROWDIN_CONNECTION_ERROR; |
| 27 | +import static io.meeds.crowdin.gamification.utils.Utils.CROWDIN_EVENTS; |
| 28 | +import static io.meeds.crowdin.gamification.utils.Utils.PROJECTS; |
| 29 | +import static io.meeds.crowdin.gamification.utils.Utils.TOKEN; |
| 30 | +import static io.meeds.crowdin.gamification.utils.Utils.WEBHOOKS; |
| 31 | +import static io.meeds.crowdin.gamification.utils.Utils.generateRandomSecret; |
| 32 | + |
| 33 | +import java.io.IOException; |
| 34 | +import java.io.InputStream; |
| 35 | +import java.net.URI; |
| 36 | +import java.nio.charset.StandardCharsets; |
| 37 | +import java.util.ArrayList; |
| 38 | +import java.util.Arrays; |
| 39 | +import java.util.HashMap; |
| 40 | +import java.util.List; |
| 41 | +import java.util.Map; |
| 42 | + |
| 43 | +import javax.ws.rs.core.MediaType; |
| 44 | + |
23 | 45 | import org.apache.commons.io.IOUtils; |
24 | 46 | import org.apache.commons.lang3.StringUtils; |
25 | 47 | import org.apache.http.HttpResponse; |
| 48 | +import org.apache.http.HttpStatus; |
26 | 49 | import org.apache.http.client.HttpClient; |
27 | 50 | import org.apache.http.client.methods.HttpDelete; |
28 | 51 | import org.apache.http.client.methods.HttpGet; |
|
35 | 58 | import org.apache.http.impl.client.HttpClients; |
36 | 59 | import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; |
37 | 60 | import org.apache.http.protocol.HTTP; |
38 | | -import org.exoplatform.commons.utils.CommonsUtils; |
39 | | -import org.exoplatform.services.log.ExoLogger; |
40 | | -import org.exoplatform.services.log.Log; |
41 | | - |
42 | | -import io.meeds.crowdin.gamification.exception.CrowdinConnectionException; |
43 | | - |
44 | 61 | import org.json.JSONArray; |
45 | 62 | import org.json.JSONObject; |
46 | 63 | import org.springframework.stereotype.Component; |
47 | 64 |
|
48 | | -import javax.ws.rs.core.MediaType; |
49 | | - |
50 | | -import static io.meeds.crowdin.gamification.utils.Utils.*; |
| 65 | +import org.exoplatform.commons.utils.CommonsUtils; |
| 66 | +import org.exoplatform.services.log.ExoLogger; |
| 67 | +import org.exoplatform.services.log.Log; |
51 | 68 |
|
52 | | -import java.io.IOException; |
53 | | -import java.io.InputStream; |
54 | | -import java.net.URI; |
55 | | -import java.nio.charset.StandardCharsets; |
56 | | -import java.util.*; |
| 69 | +import io.meeds.crowdin.gamification.exception.CrowdinConnectionException; |
| 70 | +import io.meeds.crowdin.gamification.model.RemoteApproval; |
| 71 | +import io.meeds.crowdin.gamification.model.RemoteDirectory; |
| 72 | +import io.meeds.crowdin.gamification.model.RemoteLanguage; |
| 73 | +import io.meeds.crowdin.gamification.model.RemoteProject; |
| 74 | +import io.meeds.crowdin.gamification.model.WebHook; |
57 | 75 |
|
58 | 76 | @Component |
59 | 77 | public class CrowdinConsumerStorage { |
|
0 commit comments