Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove jmsEndpointConfig information from communication settings endpoint #354

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ 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))

## Version 3.0.0


- [PR-328](https://github.com/Cognifide/aet/pull/328) Added suite's history
- [PR-303](https://github.com/Cognifide/aet/pull/303) Added `exclude-elements` parameter to [ScreenCollector](https://github.com/Cognifide/aet/wiki/ScreenCollector)
- [PR-327](https://github.com/Cognifide/aet/pull/327) Default web driver changed from Firefox to Chrome
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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks that JmsEndpointConfig is no longer used anywhere. It should be removed.

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();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, method JmsConnection.getEndpointConfig() is not used elsewhere, please remove it (from the interface and implementation).

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