Skip to content

Commit

Permalink
Refactor RetrieveContext: remove dispensable HttpServletRequest field #…
Browse files Browse the repository at this point in the history
  • Loading branch information
vrindanayak committed Jan 28, 2019
1 parent bcc1aaa commit a988fd7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The Initial Developer of the Original Code is
* J4Care.
* Portions created by the Initial Developer are Copyright (C) 2015
* Portions created by the Initial Developer are Copyright (C) 2015-2019
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
Expand Down Expand Up @@ -88,10 +88,6 @@ public interface RetrieveContext extends Closeable {

void setFallbackAssociation(Association fallbackAssociation);

HttpServletRequest getHttpRequest();

void setHttpRequest(HttpServletRequest httpRequest);

RetrieveService getRetrieveService();

ApplicationEntity getLocalApplicationEntity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The Initial Developer of the Original Code is
* J4Care.
* Portions created by the Initial Developer are Copyright (C) 2015
* Portions created by the Initial Developer are Copyright (C) 2015-2019
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
Expand Down Expand Up @@ -58,8 +58,6 @@
import org.dcm4chee.arc.store.InstanceLocations;
import org.dcm4chee.arc.store.UpdateLocation;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.*;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.atomic.AtomicInteger;
Expand All @@ -74,7 +72,6 @@ class RetrieveContextImpl implements RetrieveContext {
private Association storeAssociation;
private Association forwardAssociation;
private Association fallbackAssociation;
private HttpServletRequest httpRequest;
private final RetrieveService retrieveService;
private final ArchiveAEExtension arcAE;
private final String localAETitle;
Expand Down Expand Up @@ -175,16 +172,6 @@ public void setFallbackAssociation(Association fallbackAssociation) {
this.fallbackAssociation = fallbackAssociation;
}

@Override
public HttpServletRequest getHttpRequest() {
return httpRequest;
}

@Override
public void setHttpRequest(HttpServletRequest httpRequest) {
this.httpRequest = httpRequest;
}

@Override
public RetrieveService getRetrieveService() {
return retrieveService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* The Initial Developer of the Original Code is
* J4Care.
* Portions created by the Initial Developer are Copyright (C) 2015
* Portions created by the Initial Developer are Copyright (C) 2015-2019
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
Expand Down Expand Up @@ -90,7 +90,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.xml.transform.Templates;
import javax.xml.transform.TransformerConfigurationException;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
Expand Down Expand Up @@ -254,7 +253,7 @@ public RetrieveContext newRetrieveContextIOCM(
HttpServletRequest request, String localAET, String studyUID, String... seriesUIDs) {
ArchiveAEExtension arcAE = device.getApplicationEntity(localAET, true).getAEExtension(ArchiveAEExtension.class);
RetrieveContext ctx = new RetrieveContextImpl(this, arcAE, localAET, null);
ctx.setHttpRequest(request);
ctx.setHttpServletRequestInfo(HttpServletRequestInfo.valueOf(request));
ctx.setStudyInstanceUIDs(studyUID);
ctx.setSeriesInstanceUIDs(seriesUIDs);
return ctx;
Expand Down

0 comments on commit a988fd7

Please sign in to comment.