|
|
|
@ -33,11 +33,15 @@ public class SocialMessage extends Thread {
|
|
|
|
|
|
|
|
|
|
protected final ObjectMapper objectMapper;
|
|
|
|
|
|
|
|
|
|
private final String token;
|
|
|
|
|
|
|
|
|
|
protected Message message;
|
|
|
|
|
|
|
|
|
|
public SocialMessage() throws Exception {
|
|
|
|
|
super();
|
|
|
|
|
this.objectMapper = new ObjectMapper();
|
|
|
|
|
SecretManager secretManager = SecretManagerProvider.instance.get();
|
|
|
|
|
this.token = secretManager.getCurrentSecretHolder().getSecrets().first().getToken();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Message getMessage() {
|
|
|
|
@ -76,8 +80,7 @@ public class SocialMessage extends Thread {
|
|
|
|
|
GXHTTPStringRequest gxhttpStringRequest = GXHTTPStringRequest.newRequest(basePath);
|
|
|
|
|
gxhttpStringRequest.from(Constants.CATALOGUE_NAME);
|
|
|
|
|
gxhttpStringRequest.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON);
|
|
|
|
|
SecretManager secretManager = SecretManagerProvider.instance.get();
|
|
|
|
|
gxhttpStringRequest.setSecurityToken(secretManager.getCurrentSecretHolder().getSecrets().first().getToken());
|
|
|
|
|
gxhttpStringRequest.setSecurityToken(token);
|
|
|
|
|
gxhttpStringRequest.path(SOCIAL_SERVICE_SEND_MESSAGE_PATH);
|
|
|
|
|
|
|
|
|
|
HttpURLConnection httpURLConnection = gxhttpStringRequest.post(messageString);
|
|
|
|
|