Skip to content

Commit

Permalink
some renamings
Browse files Browse the repository at this point in the history
  • Loading branch information
LewerenzM committed May 16, 2024
1 parent 6a8bced commit fdfd88e
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public ValueContainer handleDataRequest(DataSelectionService dataSelectionServic
}

@Override
public String getCustomRequestParametersLogString() {
public String addCustomParametersToLogString() {
return "zip='" + this.zip + "'' compress='" + compress + "'";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ private Long registerDatafile(String sessionId, String name, long datafileFormat
}
}

public String getRequestParametersLogString() {
public String addParametersToLogString() {
return "name='" + name + "' " + "datafileFormatId='"
+ datafileFormatIdString + "' " + "datasetId='" + datasetIdString + "' " + "description='"
+ description + "' " + "doi='" + doi + "' " + "datafileCreateTime='" + datafileCreateTimeString
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public abstract class DataControllerBase {

public abstract void validateUUID() throws BadRequestException;

public abstract String getRequestParametersLogString();
public abstract String addParametersToLogString();

public abstract void addParametersToTransmitterJSON(JsonGenerator gen) throws IcatException_Exception, BadRequestException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ protected void addParametersToTransmitterJSON(JsonGenerator gen) throws IcatExce

protected abstract ValueContainer handleDataRequest(DataSelectionService dataSelectionService) throws NotImplementedException, InternalException, BadRequestException, NotFoundException, InsufficientPrivilegesException, DataNotOnlineException;

protected String getRequestParametersLogString() {
return this.dataController.getRequestParametersLogString() + " " + this.getCustomRequestParametersLogString();
@Override
protected String addParametersToLogString() {
return this.dataController.addParametersToLogString() + " " + this.addCustomParametersToLogString();
}

/**
Expand All @@ -75,5 +76,5 @@ protected void addCustomParametersToTransmitterJSON(JsonGenerator gen) {}
/**
* Override this method in your concrete DataRequestHandler to add custom parameters to the log output.
*/
protected String getCustomRequestParametersLogString() { return "";}
protected String addCustomParametersToLogString() { return "";}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void validateUUID() throws BadRequestException {
}

@Override
public String getRequestParametersLogString() {
public String addParametersToLogString() {
return "preparedId = '" + preparedId;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public ValueContainer handle() throws BadRequestException, InternalException, In

// some preprocessing
long start = System.currentTimeMillis();
logger.info("New webservice request: " + this.requestType.toString().toLowerCase() + " " + this.getRequestParametersLogString());
logger.info("New webservice request: " + this.requestType.toString().toLowerCase() + " " + this.addParametersToLogString());

// Do it
ValueContainer result = this.handleRequest();
Expand Down Expand Up @@ -119,7 +119,7 @@ public String provideTransmissionBody() throws BadRequestException, IcatExceptio
* Override to add additional parameters to the log output for the current request
* @return
*/
protected String getRequestParametersLogString() { return ""; }
protected String addParametersToLogString() { return ""; }

/**
* Override to add additional parameters to the transmitter JSON
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void validateUUID() throws BadRequestException {
}

@Override
public String getRequestParametersLogString() {
public String addParametersToLogString() {
return "investigationIds='" + investigationIds + "' " + "datasetIds='"
+ datasetIds + "' " + "datafileIds='" + datafileIds + "'";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public CallType getCallType() {
return CallType.INFO;
}

public String getRequestParametersLogString() { return this.dataController.getRequestParametersLogString(); }
public String addParametersToLogString() { return this.dataController.addParametersToLogString(); }

public void addParametersToTransmitterJSON(JsonGenerator gen) throws IcatException_Exception, BadRequestException {
this.dataController.addParametersToTransmitterJSON(gen);
Expand Down

0 comments on commit fdfd88e

Please sign in to comment.