Skip to content

Commit

Permalink
Purge UPS Templates and refactor corresponding features #2783
Browse files Browse the repository at this point in the history
  • Loading branch information
vrindanayak committed Sep 24, 2020
1 parent 79da173 commit a881606
Show file tree
Hide file tree
Showing 12 changed files with 343 additions and 421 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
import javax.jms.JMSRuntimeException;
import javax.jms.Message;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;


/**
Expand All @@ -58,6 +60,7 @@ public class HttpServletRequestInfo {
public final String requestURI;
public final String queryString;
public final String localHost;
public MediaType contentType;

private HttpServletRequestInfo(HttpServletRequest request) {
requesterUserID = KeycloakContext.valueOf(request).getUserName();
Expand Down Expand Up @@ -119,4 +122,13 @@ private static String hostOfURI(String requestURI) {
return null;
}
}

public MediaType getContentType() {
return contentType;
}

public HttpServletRequestInfo setContentType(HttpHeaders headers) {
this.contentType = headers.getMediaType();
return this;
}
}
20 changes: 10 additions & 10 deletions dcm4chee-arc-ui2/src/swagger/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -990,34 +990,34 @@
"/aets/{aet}/dimse/{movescp}/studies/{study}/series/{series}/instances/query:{findscp}/mark4retrieve/dicom:{destination}": {
"$ref": "paths/legacy.json#/move.instances.mark4retrieve"
},
"/aets/{aet}/rs/studies/workitems/{upsTemplateID}": {
"/aets/{aet}/rs/studies/workitems": {
"$ref": "paths/workitems.json#/local.studies"
},
"/aets/{aet}/rs/studies/{study}/series/workitems/{upsTemplateID}": {
"/aets/{aet}/rs/studies/{study}/series/workitems": {
"$ref": "paths/workitems.json#/local.series"
},
"/aets/{aet}/rs/studies/{study}/series/{series}/instances/workitems/{upsTemplateID}": {
"/aets/{aet}/rs/studies/{study}/series/{series}/instances/workitems": {
"$ref": "paths/workitems.json#/local.instances"
},
"/aets/{aet}/rs/studies/csv:{field}/workitems/{upsTemplateUID}": {
"/aets/{aet}/rs/studies/csv:{field}/workitems": {
"$ref": "paths/workitems.json#/local.studies.csv"
},
"/aets/{aet}/dimse/{movescp}/studies/workitems/{upsTemplateID}": {
"/aets/{aet}/dimse/{movescp}/studies/workitems": {
"$ref": "paths/workitems.json#/external.studies"
},
"/aets/{aet}/dimse/{movescp}/studies/{study}/series/workitems/{upsTemplateID}": {
"/aets/{aet}/dimse/{movescp}/studies/{study}/series/workitems": {
"$ref": "paths/workitems.json#/external.series"
},
"/aets/{aet}/dimse/{movescp}/studies/{study}/series/{series}/instances/workitems/{upsTemplateID}": {
"/aets/{aet}/dimse/{movescp}/studies/{study}/series/{series}/instances/workitems": {
"$ref": "paths/workitems.json#/external.instances"
},
"/aets/{aet}/dimse/{movescp}/query:{findscp}/studies/workitems/{upsTemplateID}": {
"/aets/{aet}/dimse/{movescp}/query:{findscp}/studies/workitems": {
"$ref": "paths/workitems.json#/external2.studies"
},
"/aets/{aet}/dimse/{movescp}/query:{findscp}/studies/{study}/series/workitems/{upsTemplateID}": {
"/aets/{aet}/dimse/{movescp}/query:{findscp}/studies/{study}/series/workitems": {
"$ref": "paths/workitems.json#/external2.series"
},
"/aets/{aet}/dimse/{movescp}/query:{findscp}/studies/{study}/series/{series}/instances/workitems/{upsTemplateID}": {
"/aets/{aet}/dimse/{movescp}/query:{findscp}/studies/{study}/series/{series}/instances/workitems": {
"$ref": "paths/workitems.json#/external2.instances"
},
"/aets/{aet}/dimse/{movescp}/studies/csv:{field}/workitems/{upsTemplateUID}": {
Expand Down
11 changes: 1 addition & 10 deletions dcm4chee-arc-ui2/src/swagger/parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -409,15 +409,6 @@
"type": "string"
}
},
"upsTemplateIDPathParam": {
"name": "upsTemplateID",
"in": "path",
"description": "UPS Template ID",
"required": true,
"schema": {
"type": "string"
}
},
"storageIDPathParam": {
"name": "storageID",
"in": "path",
Expand Down Expand Up @@ -753,7 +744,7 @@
"template": {
"name": "template",
"in": "query",
"description": "If present with a value of true UPS template workitem shall be created with SPS Start DateTime in DB.",
"description": "If true, create / search UPS template workitem without SPS Start DateTime in DB.",
"schema": {
"type": "boolean",
"default": false
Expand Down
72 changes: 36 additions & 36 deletions dcm4chee-arc-ui2/src/swagger/paths/workitems.json
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,6 @@
{
"$ref": "../parameters.json#/archiveAETPathParam"
},
{
"$ref": "../parameters.json#/upsTemplateIDPathParam"
},
{
"$ref": "../parameters.json#/upsLabel"
},
Expand Down Expand Up @@ -653,6 +650,9 @@
"$ref": "../parameters.json#/storageExported"
}
],
"requestBody": {
"$ref": "../requestBodies.json#/workitem"
},
"responses": {
"202": {
"$ref": "../responses.json#/countResults"
Expand All @@ -664,7 +664,7 @@
"description": "Validation for one of the query parameters failed"
},
"404": {
"description": "No such Archive AE Title or UPS Template with specified ID not configured"
"description": "No such Archive AE Title"
},
"500": {
"description": "Internal Server Error."
Expand All @@ -686,9 +686,6 @@
{
"$ref": "../parameters.json#/studyPathParam"
},
{
"$ref": "../parameters.json#/upsTemplateIDPathParam"
},
{
"$ref": "../parameters.json#/upsLabel"
},
Expand Down Expand Up @@ -756,6 +753,9 @@
"$ref": "../parameters.json#/storageExported"
}
],
"requestBody": {
"$ref": "../requestBodies.json#/workitem"
},
"responses": {
"201": {
"description": "Workitem was created."
Expand All @@ -767,7 +767,7 @@
"description": "Validation for one of the query parameters failed"
},
"404": {
"description": "No such Archive AE Title or UPS Template with specified ID not configured"
"description": "No such Archive AE Title"
},
"500": {
"description": "Internal Server Error."
Expand All @@ -792,9 +792,6 @@
{
"$ref": "../parameters.json#/seriesPathParam"
},
{
"$ref": "../parameters.json#/upsTemplateIDPathParam"
},
{
"$ref": "../parameters.json#/upsLabel"
},
Expand Down Expand Up @@ -862,6 +859,9 @@
"$ref": "../parameters.json#/storageExported"
}
],
"requestBody": {
"$ref": "../requestBodies.json#/workitem"
},
"responses": {
"201": {
"description": "Workitem was created."
Expand All @@ -873,7 +873,7 @@
"description": "Validation for one of the query parameters failed"
},
"404": {
"description": "No such Archive AE Title or UPS Template with specified ID not configured"
"description": "No such Archive AE Title"
},
"500": {
"description": "Internal Server Error."
Expand Down Expand Up @@ -953,9 +953,6 @@
{
"$ref": "../parameters.json#/moveSCPPathParam"
},
{
"$ref": "../parameters.json#/upsTemplateIDPathParam"
},
{
"$ref": "../parameters.json#/upsLabel"
},
Expand All @@ -975,6 +972,9 @@
"$ref": "../parameters.json#/SplitStudyDateRange"
}
],
"requestBody": {
"$ref": "../requestBodies.json#/workitem"
},
"responses": {
"202": {
"$ref": "../responses.json#/countResults"
Expand All @@ -986,7 +986,7 @@
"description": "Validation for one of the query parameters failed"
},
"404": {
"description": "No such Archive AE Title, C-MOVE SCP AE Title or UPS Template with specified ID."
"description": "No such Archive AE Title or C-MOVE SCP AE Title."
},
"500": {
"description": "Internal Server Error."
Expand Down Expand Up @@ -1014,9 +1014,6 @@
{
"$ref": "../parameters.json#/studyPathParam"
},
{
"$ref": "../parameters.json#/upsTemplateIDPathParam"
},
{
"$ref": "../parameters.json#/upsLabel"
},
Expand All @@ -1036,6 +1033,9 @@
"$ref": "../parameters.json#/SplitStudyDateRange"
}
],
"requestBody": {
"$ref": "../requestBodies.json#/workitem"
},
"responses": {
"202": {
"$ref": "../responses.json#/countResults"
Expand All @@ -1047,7 +1047,7 @@
"description": "Validation for one of the query parameters failed"
},
"404": {
"description": "No such Archive AE Title, C-MOVE SCP AE Title or UPS Template with specified ID."
"description": "No such Archive AE Title or C-MOVE SCP AE Title."
},
"500": {
"description": "Internal Server Error."
Expand Down Expand Up @@ -1078,9 +1078,6 @@
{
"$ref": "../parameters.json#/seriesPathParam"
},
{
"$ref": "../parameters.json#/upsTemplateIDPathParam"
},
{
"$ref": "../parameters.json#/upsLabel"
},
Expand All @@ -1100,6 +1097,9 @@
"$ref": "../parameters.json#/SplitStudyDateRange"
}
],
"requestBody": {
"$ref": "../requestBodies.json#/workitem"
},
"responses": {
"202": {
"$ref": "../responses.json#/countResults"
Expand All @@ -1111,7 +1111,7 @@
"description": "Validation for one of the query parameters failed"
},
"404": {
"description": "No such Archive AE Title, C-MOVE SCP AE Title or UPS Template with specified ID."
"description": "No such Archive AE Title or C-MOVE SCP AE Title."
},
"500": {
"description": "Internal Server Error."
Expand Down Expand Up @@ -1139,9 +1139,6 @@
{
"$ref": "../parameters.json#/findSCPPathParam"
},
{
"$ref": "../parameters.json#/upsTemplateIDPathParam"
},
{
"$ref": "../parameters.json#/upsLabel"
},
Expand All @@ -1161,6 +1158,9 @@
"$ref": "../parameters.json#/SplitStudyDateRange"
}
],
"requestBody": {
"$ref": "../requestBodies.json#/workitem"
},
"responses": {
"202": {
"$ref": "../responses.json#/countResults"
Expand All @@ -1172,7 +1172,7 @@
"description": "Validation for one of the query parameters failed"
},
"404": {
"description": "No such Archive AE Title, C-FIND SCP AE Title, C-MOVE SCP AE Title or UPS Template with specified ID."
"description": "No such Archive AE Title, C-FIND SCP AE Title or C-MOVE SCP AE Title."
},
"500": {
"description": "Internal Server Error."
Expand Down Expand Up @@ -1203,9 +1203,6 @@
{
"$ref": "../parameters.json#/findSCPPathParam"
},
{
"$ref": "../parameters.json#/upsTemplateIDPathParam"
},
{
"$ref": "../parameters.json#/upsLabel"
},
Expand All @@ -1225,6 +1222,9 @@
"$ref": "../parameters.json#/SplitStudyDateRange"
}
],
"requestBody": {
"$ref": "../requestBodies.json#/workitem"
},
"responses": {
"202": {
"$ref": "../responses.json#/countResults"
Expand All @@ -1236,7 +1236,7 @@
"description": "Validation for one of the query parameters failed"
},
"404": {
"description": "No such Archive AE Title, C-FIND SCP AE Title, C-MOVE SCP AE Title or UPS Template with specified ID."
"description": "No such Archive AE Title, C-FIND SCP AE Title or C-MOVE SCP AE Title."
},
"500": {
"description": "Internal Server Error."
Expand Down Expand Up @@ -1270,9 +1270,6 @@
{
"$ref": "../parameters.json#/findSCPPathParam"
},
{
"$ref": "../parameters.json#/upsTemplateIDPathParam"
},
{
"$ref": "../parameters.json#/upsLabel"
},
Expand All @@ -1292,6 +1289,9 @@
"$ref": "../parameters.json#/SplitStudyDateRange"
}
],
"requestBody": {
"$ref": "../requestBodies.json#/workitem"
},
"responses": {
"202": {
"$ref": "../responses.json#/countResults"
Expand All @@ -1303,7 +1303,7 @@
"description": "Validation for one of the query parameters failed"
},
"404": {
"description": "No such Archive AE Title, C-FIND SCP AE Title, C-MOVE SCP AE Title or UPS Template with specified ID."
"description": "No such Archive AE Title, C-FIND SCP AE Title or C-MOVE SCP AE Title."
},
"500": {
"description": "Internal Server Error."
Expand Down

0 comments on commit a881606

Please sign in to comment.