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 1 commit
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
Next Next commit
Removed jmsEndpointConfig information from communication settings end…
…point

Fixed #352
  • Loading branch information
Krzysztof Wegierski committed Sep 13, 2018
commit 30f12677322bcd35e4cdead5095c3db8eeb13fd2
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 @@ -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