Skip to content

Commit

Permalink
SWORD: Service Document needs maxUploadSizeInBytes #1043
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Nov 4, 2014
1 parent 1f08a81 commit 81f987b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ public class SWORDv2ServiceDocumentServlet extends SwordServlet {
ServiceDocumentManagerImpl serviceDocumentManagerImpl;
protected ServiceDocumentAPI api;

/**
* @todo Should we inject this in all the SWORDv2 Servlets? Added here so
* that we can inject SettingsServiceBean in SwordConfigurationImpl.
*/
@Inject
SwordConfigurationImpl swordConfigurationImpl;

@Override
public void init() throws ServletException {
super.init();
this.api = new ServiceDocumentAPI(serviceDocumentManagerImpl, this.config);
this.api = new ServiceDocumentAPI(serviceDocumentManagerImpl, swordConfigurationImpl);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ public int getMaxUploadSize() {
int maxUploadSizeInBytes = Integer.parseInt(maxUploadInBytes);
return maxUploadSizeInBytes;
} catch (NumberFormatException ex) {
logger.info("Could not convert " + maxUploadInBytes + " from setting " + SettingsServiceBean.Key.DataDepositApiMaxUploadInBytes + " to int. Setting Data Deposit APU max upload size limit to unlimited.");
logger.info("Could not convert " + maxUploadInBytes + " from setting " + SettingsServiceBean.Key.DataDepositApiMaxUploadInBytes + " to int. Setting Data Deposit API max upload size limit to unlimited.");
return unlimited;
}
} else {
logger.info("Setting " + SettingsServiceBean.Key.DataDepositApiMaxUploadInBytes + " is undefined. Setting Data Deposit APU max upload size limit to unlimited.");
logger.info("Setting " + SettingsServiceBean.Key.DataDepositApiMaxUploadInBytes + " is undefined. Setting Data Deposit API max upload size limit to unlimited.");
return unlimited;
}
}
Expand Down

0 comments on commit 81f987b

Please sign in to comment.