Skip to content

Commit

Permalink
Merge pull request #354 from sp2mbn/bugfix/remove-jmsEndpointConfig-f…
Browse files Browse the repository at this point in the history
…rom-communication-settings

Remove jmsEndpointConfig information from communication settings endpoint
  • Loading branch information
tkaik authored Nov 16, 2018
2 parents d61c558 + 951840d commit c8f3041
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 70 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ All notable changes to AET will be documented in this file.

## Unreleased
**List of changes that are finished but not yet released in any final version.**
- [PR-354](https://github.com/Cognifide/aet/pull/354) Remove jmsEndpointConfig information from communication settings endpoint ([#352](https://github.com/Cognifide/aet/issues/352))
- [PR-412](https://github.com/Cognifide/aet/pull/412) ([PR-336](https://github.com/Cognifide/aet/pull/336), [PR-337](https://github.com/Cognifide/aet/pull/337), [PR-395](https://github.com/Cognifide/aet/pull/395)) - Added rerun functionality for suite, test and url
- [PR-429](https://github.com/Cognifide/aet/pull/429) - `aet-cookbook` version updated to [`v5.1.1`](https://github.com/Cognifide/aet-cookbook/blob/master/CHANGELOG.md#511) in Vagrant. **Important**: please follow the instructions from [PR-43 description](https://github.com/Cognifide/aet-cookbook/pull/43) in order to keep the MongoDB data on your local environment.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,14 @@
*/
package com.cognifide.aet.communication.api;

import com.cognifide.aet.communication.api.queues.JmsEndpointConfig;

public class CommunicationSettings {

private final JmsEndpointConfig jmsEndpointConfig;

private final String reportDomain;

public CommunicationSettings(JmsEndpointConfig jmsEndpointConfig, String reportDomain) {
this.jmsEndpointConfig = jmsEndpointConfig;
public CommunicationSettings(String reportDomain) {
this.reportDomain = reportDomain;
}

public JmsEndpointConfig getJmsEndpointConfig() {
return jmsEndpointConfig;
}

public String getReportDomain() {
return reportDomain;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,4 @@ public interface JmsConnection {
*/
Connection getJmsConnection();

/**
* @return broker connection configuration.
*/
JmsEndpointConfig getEndpointConfig();

}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package com.cognifide.aet.queues;

import com.cognifide.aet.communication.api.queues.JmsConnection;
import com.cognifide.aet.communication.api.queues.JmsEndpointConfig;
import com.cognifide.aet.queues.configuration.DefaultJmsConnectionConf;
import javax.jms.Connection;
import javax.jms.JMSException;
Expand Down Expand Up @@ -56,11 +55,6 @@ public Connection getJmsConnection() {
return connection;
}

@Override
public JmsEndpointConfig getEndpointConfig() {
return new JmsEndpointConfig(config.url(), config.username(), config.password());
}

@Activate
public void activate(DefaultJmsConnectionConf config) throws JMSException {
this.config = config;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@


import com.cognifide.aet.communication.api.CommunicationSettings;
import com.cognifide.aet.communication.api.queues.JmsConnection;
import com.cognifide.aet.communication.api.queues.JmsEndpointConfig;
import com.cognifide.aet.rest.helpers.ReportConfigurationManager;
import com.cognifide.aet.rest.helpers.SuitesListProvider;
import com.cognifide.aet.vs.MetadataDAO;
Expand Down Expand Up @@ -56,9 +54,6 @@ public class ConfigsServlet extends HttpServlet {
@Reference
private transient HttpService httpService;

@Reference
private transient JmsConnection jmsConnection;

@Reference
private transient MetadataDAO metadataDAO;

Expand Down Expand Up @@ -86,9 +81,7 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
String reportDomain = reportConfigurationManager.getReportDomain();

if (COMMUNICATION_SETTINGS_PARAM.equals(configType)) {
JmsEndpointConfig jmsEndpointConfig = jmsConnection.getEndpointConfig();
CommunicationSettings communicationSettings = new CommunicationSettings(jmsEndpointConfig,
reportDomain);
CommunicationSettings communicationSettings = new CommunicationSettings(reportDomain);
responseWriter.write(new Gson().toJson(communicationSettings));
} else if (LIST_PARAM.equals(configType)) {
resp.setContentType("text/html; charset=utf-8");
Expand Down

0 comments on commit c8f3041

Please sign in to comment.