Replace all usages of dspace.url with either dspace.ui.url or dspace.server.url (depending on use case)

This commit is contained in:
Tim Donohue
2020-01-29 09:27:25 -06:00
parent 5e3e9b8f9d
commit e8180f11cb
50 changed files with 75 additions and 78 deletions

View File

@@ -929,7 +929,7 @@ public class ItemExportServiceImpl implements ItemExportService {
Locale supportedLocale = I18nUtil.getEPersonLocale(eperson); Locale supportedLocale = I18nUtil.getEPersonLocale(eperson);
Email email = Email.getEmail(I18nUtil.getEmailFilename(supportedLocale, "export_success")); Email email = Email.getEmail(I18nUtil.getEmailFilename(supportedLocale, "export_success"));
email.addRecipient(eperson.getEmail()); email.addRecipient(eperson.getEmail());
email.addArgument(ConfigurationManager.getProperty("dspace.url") + "/exportdownload/" + fileName); email.addArgument(ConfigurationManager.getProperty("dspace.ui.url") + "/exportdownload/" + fileName);
email.addArgument(ConfigurationManager.getProperty("org.dspace.app.itemexport.life.span.hours")); email.addArgument(ConfigurationManager.getProperty("org.dspace.app.itemexport.life.span.hours"));
email.send(); email.send();
@@ -947,7 +947,7 @@ public class ItemExportServiceImpl implements ItemExportService {
Email email = Email.getEmail(I18nUtil.getEmailFilename(supportedLocale, "export_error")); Email email = Email.getEmail(I18nUtil.getEmailFilename(supportedLocale, "export_error"));
email.addRecipient(eperson.getEmail()); email.addRecipient(eperson.getEmail());
email.addArgument(error); email.addArgument(error);
email.addArgument(ConfigurationManager.getProperty("dspace.url") + "/feedback"); email.addArgument(ConfigurationManager.getProperty("dspace.ui.url") + "/feedback");
email.send(); email.send();
} catch (Exception e) { } catch (Exception e) {

View File

@@ -1797,7 +1797,7 @@ public class ItemImportServiceImpl implements ItemImportService, InitializingBea
Email email = Email.getEmail(I18nUtil.getEmailFilename(supportedLocale, "bte_batch_import_error")); Email email = Email.getEmail(I18nUtil.getEmailFilename(supportedLocale, "bte_batch_import_error"));
email.addRecipient(eperson.getEmail()); email.addRecipient(eperson.getEmail());
email.addArgument(error); email.addArgument(error);
email.addArgument(ConfigurationManager.getProperty("dspace.url") + "/feedback"); email.addArgument(ConfigurationManager.getProperty("dspace.ui.url") + "/feedback");
email.send(); email.send();
} catch (Exception e) { } catch (Exception e) {

View File

@@ -152,11 +152,11 @@ public class GenerateSitemaps {
*/ */
public static void generateSitemaps(boolean makeHTMLMap, public static void generateSitemaps(boolean makeHTMLMap,
boolean makeSitemapOrg) throws SQLException, IOException { boolean makeSitemapOrg) throws SQLException, IOException {
String sitemapStem = configurationService.getProperty("dspace.url") String sitemapStem = configurationService.getProperty("dspace.ui.url")
+ "/sitemap"; + "/sitemap";
String htmlMapStem = configurationService.getProperty("dspace.url") String htmlMapStem = configurationService.getProperty("dspace.ui.url")
+ "/htmlmap"; + "/htmlmap";
String handleURLStem = configurationService.getProperty("dspace.url") String handleURLStem = configurationService.getProperty("dspace.ui.url")
+ "/handle/"; + "/handle/";
File outputDir = new File(configurationService.getProperty("sitemap.dir")); File outputDir = new File(configurationService.getProperty("sitemap.dir"));
@@ -293,7 +293,7 @@ public class GenerateSitemaps {
.getProperty("http.proxy.port")); .getProperty("http.proxy.port"));
} }
String sitemapURL = configurationService.getProperty("dspace.url") String sitemapURL = configurationService.getProperty("dspace.ui.url")
+ "/sitemap"; + "/sitemap";
URL url = new URL(engineURL + URLEncoder.encode(sitemapURL, "UTF-8")); URL url = new URL(engineURL + URLEncoder.encode(sitemapURL, "UTF-8"));

View File

@@ -583,7 +583,7 @@ public class LogAnalyser {
// now do the host name and url lookup // now do the host name and url lookup
hostName = ConfigurationManager.getProperty("dspace.hostname").trim(); hostName = ConfigurationManager.getProperty("dspace.hostname").trim();
name = ConfigurationManager.getProperty("dspace.name").trim(); name = ConfigurationManager.getProperty("dspace.name").trim();
url = ConfigurationManager.getProperty("dspace.url").trim(); url = ConfigurationManager.getProperty("dspace.ui.url").trim();
if ((url != null) && (!url.endsWith("/"))) { if ((url != null) && (!url.endsWith("/"))) {
url = url + "/"; url = url + "/";
} }

View File

@@ -50,16 +50,16 @@ abstract public class AbstractDSpaceWebapp
/** /**
* Construct a particular kind of DSpace application. * Construct a particular kind of DSpace application.
* *
* @param kind what kind of application is this? (XMLUI, JSPUI, etc.) * @param kind what kind of application is this?
*/ */
public AbstractDSpaceWebapp(String kind) { public AbstractDSpaceWebapp(String kind) {
this.kind = kind; this.kind = kind;
started = new Date(); started = new Date();
url = ConfigurationManager.getProperty("dspace.url"); url = ConfigurationManager.getProperty("dspace.ui.url");
if (null == url) { if (null == url) {
throw new IllegalStateException("dspace.url is undefined"); throw new IllegalStateException("dspace.ui.url is undefined");
} }
} }

View File

@@ -889,7 +889,7 @@ public class GoogleMetadata {
Bitstream bitstream = findLinkableFulltext(item); Bitstream bitstream = findLinkableFulltext(item);
if (bitstream != null) { if (bitstream != null) {
StringBuilder path = new StringBuilder(); StringBuilder path = new StringBuilder();
path.append(ConfigurationManager.getProperty("dspace.url")); path.append(ConfigurationManager.getProperty("dspace.ui.url"));
if (item.getHandle() != null) { if (item.getHandle() != null) {
path.append("/bitstream/"); path.append("/bitstream/");

View File

@@ -89,7 +89,7 @@ public class OpenSearchServiceImpl implements OpenSearchService {
* Get base search service URL (websvc.opensearch.svccontext) * Get base search service URL (websvc.opensearch.svccontext)
*/ */
protected String getBaseSearchServiceURL() { protected String getBaseSearchServiceURL() {
return configurationService.getProperty("dspace.url") + "/" + return configurationService.getProperty("dspace.server.url") + "/" +
configurationService.getProperty("websvc.opensearch.svccontext"); configurationService.getProperty("websvc.opensearch.svccontext");
} }
@@ -97,7 +97,7 @@ public class OpenSearchServiceImpl implements OpenSearchService {
* Get base search UI URL (websvc.opensearch.uicontext) * Get base search UI URL (websvc.opensearch.uicontext)
*/ */
protected String getBaseSearchUIURL() { protected String getBaseSearchUIURL() {
return configurationService.getProperty("dspace.url") + "/" + return configurationService.getProperty("dspace.server.url") + "/" +
configurationService.getProperty("websvc.opensearch.uicontext"); configurationService.getProperty("websvc.opensearch.uicontext");
} }

View File

@@ -531,7 +531,7 @@ public class SyndicationFeed {
if (dso == null) { if (dso == null) {
if (baseURL == null) { if (baseURL == null) {
if (request == null) { if (request == null) {
baseURL = ConfigurationManager.getProperty("dspace.url"); baseURL = ConfigurationManager.getProperty("dspace.ui.url");
} else { } else {
baseURL = (request.isSecure()) ? "https://" : "http://"; baseURL = (request.isSecure()) ? "https://" : "http://";
baseURL += ConfigurationManager.getProperty("dspace.hostname"); baseURL += ConfigurationManager.getProperty("dspace.hostname");

View File

@@ -56,7 +56,7 @@ public class Site extends DSpaceObject {
} }
public String getURL() { public String getURL() {
return ConfigurationManager.getProperty("dspace.url"); return ConfigurationManager.getProperty("dspace.ui.url");
} }
private SiteService getSiteService() { private SiteService getSiteService() {

View File

@@ -92,7 +92,7 @@ public class OREDisseminationCrosswalk
private Element disseminateItem(Context context, Item item) private Element disseminateItem(Context context, Item item)
throws CrosswalkException, IOException, SQLException, AuthorizeException { throws CrosswalkException, IOException, SQLException, AuthorizeException {
String oaiUrl = null; String oaiUrl = null;
String dsUrl = configurationService.getProperty("dspace.url"); String dsUrl = configurationService.getProperty("dspace.ui.url");
String remSource = configurationService.getProperty("oai.ore.authoritative.source"); String remSource = configurationService.getProperty("oai.ore.authoritative.source");
if (remSource == null || remSource.equalsIgnoreCase("oai")) { if (remSource == null || remSource.equalsIgnoreCase("oai")) {

View File

@@ -219,7 +219,7 @@ public class PREMISCrosswalk
// b. name of bitstream, if any // b. name of bitstream, if any
// c. made-up name based on sequence ID and extension. // c. made-up name based on sequence ID and extension.
String sid = String.valueOf(bitstream.getSequenceID()); String sid = String.valueOf(bitstream.getSequenceID());
String baseUrl = ConfigurationManager.getProperty("dspace.url"); String baseUrl = ConfigurationManager.getProperty("dspace.ui.url");
String handle = null; String handle = null;
// get handle of parent Item of this bitstream, if there is one: // get handle of parent Item of this bitstream, if there is one:
List<Bundle> bn = bitstream.getBundles(); List<Bundle> bn = bitstream.getBundles();

View File

@@ -1400,7 +1400,7 @@ public abstract class AbstractMETSDisseminator
} }
if (handle != null) { if (handle != null) {
return configurationService return configurationService
.getProperty("dspace.url") .getProperty("dspace.ui.url")
+ "/bitstream/" + "/bitstream/"
+ handle + handle
+ "/" + "/"
@@ -1410,7 +1410,7 @@ public abstract class AbstractMETSDisseminator
} else { //no Handle assigned, so persistent(-ish) URI for bitstream is } else { //no Handle assigned, so persistent(-ish) URI for bitstream is
// Format: {site-base-url}/retrieve/{bitstream-internal-id} // Format: {site-base-url}/retrieve/{bitstream-internal-id}
return configurationService return configurationService
.getProperty("dspace.url") .getProperty("dspace.ui.url")
+ "/retrieve/" + "/retrieve/"
+ String.valueOf(bitstream.getID()); + String.valueOf(bitstream.getID());
} }

View File

@@ -497,7 +497,7 @@ public class Email {
String to = config.getProperty("mail.admin"); String to = config.getProperty("mail.admin");
String subject = "DSpace test email"; String subject = "DSpace test email";
String server = config.getProperty("mail.server"); String server = config.getProperty("mail.server");
String url = config.getProperty("dspace.url"); String url = config.getProperty("dspace.ui.url");
Email message; Email message;
try { try {
if (args.length <= 0) { if (args.length <= 0) {

View File

@@ -465,7 +465,7 @@ public class SolrServiceImpl implements SearchService, IndexingService {
Locale.getDefault(), "internal_error")); Locale.getDefault(), "internal_error"));
email.addRecipient(recipient); email.addRecipient(recipient);
email.addArgument(ConfigurationManager email.addArgument(ConfigurationManager
.getProperty("dspace.url")); .getProperty("dspace.ui.url"));
email.addArgument(new Date()); email.addArgument(new Date());
String stackTrace; String stackTrace;

View File

@@ -228,7 +228,7 @@ public class AccountServiceImpl implements AccountService {
*/ */
protected void sendEmail(Context context, String email, boolean isRegister, RegistrationData rd) protected void sendEmail(Context context, String email, boolean isRegister, RegistrationData rd)
throws MessagingException, IOException, SQLException { throws MessagingException, IOException, SQLException {
String base = ConfigurationManager.getProperty("dspace.url"); String base = ConfigurationManager.getProperty("dspace.ui.url");
// Note change from "key=" to "token=" // Note change from "key=" to "token="
String specialLink = new StringBuffer().append(base).append( String specialLink = new StringBuffer().append(base).append(

View File

@@ -83,7 +83,7 @@ public class EPersonConsumer implements Consumer {
adminEmail.addRecipient(notifyRecipient); adminEmail.addRecipient(notifyRecipient);
adminEmail.addArgument(ConfigurationManager.getProperty("dspace.name")); adminEmail.addArgument(ConfigurationManager.getProperty("dspace.name"));
adminEmail.addArgument(ConfigurationManager.getProperty("dspace.url")); adminEmail.addArgument(ConfigurationManager.getProperty("dspace.ui.url"));
adminEmail.addArgument(eperson.getFirstName() + " " + eperson.getLastName()); // Name adminEmail.addArgument(eperson.getFirstName() + " " + eperson.getLastName()); // Name
adminEmail.addArgument(eperson.getEmail()); adminEmail.addArgument(eperson.getEmail());
adminEmail.addArgument(new Date()); adminEmail.addArgument(new Date());

View File

@@ -72,7 +72,7 @@ public class HandleServiceImpl implements HandleService {
return null; return null;
} }
String url = configurationService.getProperty("dspace.url") String url = configurationService.getProperty("dspace.ui.url")
+ "/handle/" + handle; + "/handle/" + handle;
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
@@ -85,7 +85,7 @@ public class HandleServiceImpl implements HandleService {
@Override @Override
public String resolveUrlToHandle(Context context, String url) public String resolveUrlToHandle(Context context, String url)
throws SQLException { throws SQLException {
String dspaceUrl = configurationService.getProperty("dspace.url") String dspaceUrl = configurationService.getProperty("dspace.ui.url")
+ "/handle/"; + "/handle/";
String handleResolver = configurationService.getProperty("handle.canonical.prefix"); String handleResolver = configurationService.getProperty("handle.canonical.prefix");

View File

@@ -38,7 +38,7 @@ public class InfoCheck extends Check {
).append("\n"); ).append("\n");
sb.append("Url: ").append( sb.append("Url: ").append(
ConfigurationManager.getProperty("dspace.url") ConfigurationManager.getProperty("dspace.ui.url")
).append("\n"); ).append("\n");
sb.append("\n"); sb.append("\n");

View File

@@ -583,7 +583,7 @@ public class EZIDIdentifierProvider
log.warn("{} #{} has no handle -- location not set.", log.warn("{} #{} has no handle -- location not set.",
contentServiceFactory.getDSpaceObjectService(dso).getTypeText(dso), dso.getID()); contentServiceFactory.getDSpaceObjectService(dso).getTypeText(dso), dso.getID());
} else { } else {
String url = configurationService.getProperty("dspace.url") String url = configurationService.getProperty("dspace.ui.url")
+ "/handle/" + item.getHandle(); + "/handle/" + item.getHandle();
log.info("Supplying location: {}", url); log.info("Supplying location: {}", url);
mapped.put("_target", url); mapped.put("_target", url);

View File

@@ -473,7 +473,7 @@ public class SimpleDSORelationsConverterPlugin
// we currently ignore those // we currently ignore those
return null; return null;
} }
String dspaceURL = configurationService.getProperty("dspace.url"); String dspaceURL = configurationService.getProperty("dspace.ui.url");
String link = ""; String link = "";
try { try {
// this currently (DSpace 4.1) works with xmlui and jspui. // this currently (DSpace 4.1) works with xmlui and jspui.

View File

@@ -249,7 +249,7 @@ public class Negotiator {
// if html is requested we have to forward to the repositories webui. // if html is requested we have to forward to the repositories webui.
if ("html".equals(lang)) { if ("html".equals(lang)) {
urlBuilder.append(DSpaceServicesFactory.getInstance() urlBuilder.append(DSpaceServicesFactory.getInstance()
.getConfigurationService().getProperty("dspace.url")); .getConfigurationService().getProperty("dspace.ui.url"));
if (!handle.equals(DSpaceServicesFactory.getInstance() if (!handle.equals(DSpaceServicesFactory.getInstance()
.getConfigurationService().getProperty("handle.prefix") + "/0")) { .getConfigurationService().getProperty("handle.prefix") + "/0")) {
urlBuilder.append("/handle/"); urlBuilder.append("/handle/");

View File

@@ -650,7 +650,7 @@ public class StatisticsDataVisits extends StatisticsData {
} }
String url = ConfigurationManager.getProperty("dspace.url") + "/bitstream/" + identifier + "/"; String url = ConfigurationManager.getProperty("dspace.ui.url") + "/bitstream/" + identifier + "/";
// If we can put the pretty name of the bitstream on the end of the URL // If we can put the pretty name of the bitstream on the end of the URL
try { try {

View File

@@ -1041,7 +1041,7 @@ public class BasicWorkflowServiceImpl implements BasicWorkflowService {
@Override @Override
public String getMyDSpaceLink() { public String getMyDSpaceLink() {
return configurationService.getProperty("dspace.url") + "/mydspace"; return configurationService.getProperty("dspace.ui.url") + "/mydspace";
} }
protected void notifyOfReject(Context context, BasicWorkflowItem workflowItem, EPerson e, protected void notifyOfReject(Context context, BasicWorkflowItem workflowItem, EPerson e,

View File

@@ -161,7 +161,7 @@ public class WorkflowUtils extends Util {
email.addRecipient(recipient); email.addRecipient(recipient);
email.addArgument(ConfigurationManager email.addArgument(ConfigurationManager
.getProperty("dspace.url")); .getProperty("dspace.ui.url"));
email.addArgument(new Date()); email.addArgument(new Date());
email.addArgument(request.getSession().getId()); email.addArgument(request.getSession().getId());
email.addArgument(logInfo); email.addArgument(logInfo);

View File

@@ -1049,7 +1049,7 @@ public class XmlWorkflowServiceImpl implements XmlWorkflowService {
email.addArgument(coll.getName()); email.addArgument(coll.getName());
email.addArgument(rejector); email.addArgument(rejector);
email.addArgument(reason); email.addArgument(reason);
email.addArgument(ConfigurationManager.getProperty("dspace.url") + "/mydspace"); email.addArgument(ConfigurationManager.getProperty("dspace.ui.url") + "/mydspace");
email.send(); email.send();
} catch (Exception ex) { } catch (Exception ex) {
@@ -1063,7 +1063,7 @@ public class XmlWorkflowServiceImpl implements XmlWorkflowService {
@Override @Override
public String getMyDSpaceLink() { public String getMyDSpaceLink() {
return ConfigurationManager.getProperty("dspace.url") + "/mydspace"; return ConfigurationManager.getProperty("dspace.ui.url") + "/mydspace";
} }
protected void revokeReviewerPolicies(Context context, Item item) throws SQLException, AuthorizeException { protected void revokeReviewerPolicies(Context context, Item item) throws SQLException, AuthorizeException {

View File

@@ -141,7 +141,7 @@ public class SiteTest extends AbstractUnitTest {
*/ */
@Test @Test
public void testGetURL() { public void testGetURL() {
assertThat("testGetURL 0", s.getURL(), equalTo(ConfigurationManager.getProperty("dspace.url"))); assertThat("testGetURL 0", s.getURL(), equalTo(ConfigurationManager.getProperty("dspace.ui.url")));
} }
} }

View File

@@ -449,7 +449,7 @@ public class EZIDIdentifierProviderTest
// Evaluate // Evaluate
String target = (String) metadata.get("_target"); String target = (String) metadata.get("_target");
assertEquals("Generates correct _target metadatum", assertEquals("Generates correct _target metadatum",
config.getProperty("dspace.url") + "/handle/" + handle, config.getProperty("dspace.ui.url") + "/handle/" + handle,
target); target);
assertTrue("Has title", metadata.containsKey("datacite.title")); assertTrue("Has title", metadata.containsKey("datacite.title"));
assertTrue("Has publication year", metadata.containsKey("datacite.publicationyear")); assertTrue("Has publication year", metadata.containsKey("datacite.publicationyear"));

View File

@@ -61,7 +61,7 @@ public class DataProviderServlet extends HttpServlet {
log.debug("lang = " + lang + ", cType = " + cType + " and pathInfo: " + pathInfo); log.debug("lang = " + lang + ", cType = " + cType + " and pathInfo: " + pathInfo);
if (StringUtils.isEmpty(pathInfo) || StringUtils.countMatches(pathInfo, "/") < 2) { if (StringUtils.isEmpty(pathInfo) || StringUtils.countMatches(pathInfo, "/") < 2) {
String dspaceURI = String dspaceURI =
DSpaceServicesFactory.getInstance().getConfigurationService().getProperty("dspace.url"); DSpaceServicesFactory.getInstance().getConfigurationService().getProperty("dspace.ui.url");
this.serveNamedGraph(dspaceURI, lang, cType, response); this.serveNamedGraph(dspaceURI, lang, cType, response);
return; return;
} }

View File

@@ -26,7 +26,7 @@ import org.springframework.stereotype.Component;
* This operation moves bitstreams within a bundle from one index to another. * This operation moves bitstreams within a bundle from one index to another.
* *
* Example: <code> * Example: <code>
* curl -X PATCH http://${dspace.url}/api/bundles/<:id-bundle> -H " * curl -X PATCH http://${dspace.server.url}/api/bundles/<:id-bundle> -H "
* Content-Type: application/json" -d '[{ "op": "move", "path": " * Content-Type: application/json" -d '[{ "op": "move", "path": "
* /_links/bitstreams/1/href", "from": "/_links/bitstreams/0/href"]' * /_links/bitstreams/1/href", "from": "/_links/bitstreams/0/href"]'
* </code> * </code>

View File

@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
* Implementation for EPerson requires certificate patches. * Implementation for EPerson requires certificate patches.
* *
* Example: <code> * Example: <code>
* curl -X PATCH http://${dspace.url}/api/epersons/eperson/<:id-eperson> -H " * curl -X PATCH http://${dspace.server.url}/api/epersons/eperson/<:id-eperson> -H "
* Content-Type: application/json" -d '[{ "op": "replace", "path": " * Content-Type: application/json" -d '[{ "op": "replace", "path": "
* /certificate", "value": true|false]' * /certificate", "value": true|false]'
* </code> * </code>

View File

@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
* Implementation for EPerson password patches. * Implementation for EPerson password patches.
* *
* Example: <code> * Example: <code>
* curl -X PATCH http://${dspace.url}/api/epersons/eperson/<:id-eperson> -H " * curl -X PATCH http://${dspace.server.url}/api/epersons/eperson/<:id-eperson> -H "
* Content-Type: application/json" -d '[{ "op": "replace", "path": " * Content-Type: application/json" -d '[{ "op": "replace", "path": "
* /email", "value": "new@email"]' * /email", "value": "new@email"]'
* </code> * </code>

View File

@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
* Implementation for EPerson canLogin patches. * Implementation for EPerson canLogin patches.
* *
* Example: <code> * Example: <code>
* curl -X PATCH http://${dspace.url}/api/epersons/eperson/<:id-eperson> -H " * curl -X PATCH http://${dspace.server.url}/api/epersons/eperson/<:id-eperson> -H "
* Content-Type: application/json" -d '[{ "op": "replace", "path": " * Content-Type: application/json" -d '[{ "op": "replace", "path": "
* /canLogin", "value": true|false]' * /canLogin", "value": true|false]'
* </code> * </code>

View File

@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
* Implementation for EPerson netid patches. * Implementation for EPerson netid patches.
* *
* Example: <code> * Example: <code>
* curl -X PATCH http://${dspace.url}/api/epersons/eperson/<:id-eperson> -H " * curl -X PATCH http://${dspace.server.url}/api/epersons/eperson/<:id-eperson> -H "
* Content-Type: application/json" -d '[{ "op": "replace", "path": " * Content-Type: application/json" -d '[{ "op": "replace", "path": "
* /netid", "value": "newNetId"]' * /netid", "value": "newNetId"]'
* </code> * </code>

View File

@@ -15,7 +15,7 @@ import org.springframework.stereotype.Component;
* Implementation for EPerson password patches. * Implementation for EPerson password patches.
* *
* Example: <code> * Example: <code>
* curl -X PATCH http://${dspace.url}/api/epersons/eperson/<:id-eperson> -H " * curl -X PATCH http://${dspace.server.url}/api/epersons/eperson/<:id-eperson> -H "
* Content-Type: application/json" -d '[{ "op": "replace", "path": " * Content-Type: application/json" -d '[{ "op": "replace", "path": "
* /password", "value": "newpassword"]' * /password", "value": "newpassword"]'
* </code> * </code>

View File

@@ -17,7 +17,7 @@ import org.springframework.stereotype.Component;
* This is the implementation for Item resource patches. * This is the implementation for Item resource patches.
* *
* Example: <code> * Example: <code>
* curl -X PATCH http://${dspace.url}/api/item/<:id-item> -H " * curl -X PATCH http://${dspace.server.url}/api/item/<:id-item> -H "
* Content-Type: application/json" -d '[{ "op": "replace", "path": " * Content-Type: application/json" -d '[{ "op": "replace", "path": "
* /discoverable", "value": true|false]' * /discoverable", "value": true|false]'
* </code> * </code>

View File

@@ -18,7 +18,7 @@ import org.springframework.stereotype.Component;
* This is the implementation for Item resource patches. * This is the implementation for Item resource patches.
* <p> * <p>
* Example: <code> * Example: <code>
* curl -X PATCH http://${dspace.url}/api/item/<:id-item> -H " * curl -X PATCH http://${dspace.server.url}/api/item/<:id-item> -H "
* Content-Type: application/json" -d '[{ "op": "replace", "path": " * Content-Type: application/json" -d '[{ "op": "replace", "path": "
* /withdrawn", "value": true|false]' * /withdrawn", "value": true|false]'
* </code> * </code>

View File

@@ -179,7 +179,7 @@ public class SubmissionService {
checksum.setValue(source.getChecksum()); checksum.setValue(source.getChecksum());
data.setCheckSum(checksum); data.setCheckSum(checksum);
data.setSizeBytes(source.getSizeBytes()); data.setSizeBytes(source.getSizeBytes());
data.setUrl(configurationService.getProperty("dspace.url") + "/api/" + BitstreamRest.CATEGORY + "/" + English data.setUrl(configurationService.getProperty("dspace.server.url") + "/api/" + BitstreamRest.CATEGORY + "/" + English
.plural(BitstreamRest.NAME) + "/" + source.getID() + "/content"); .plural(BitstreamRest.NAME) + "/" + source.getID() + "/content");
return data; return data;
} }

View File

@@ -28,7 +28,7 @@ import org.springframework.util.Assert;
* "/sections/<:name-of-the-form>/<:metadata>/-" * "/sections/<:name-of-the-form>/<:metadata>/-"
* *
* Example: <code> * Example: <code>
* curl -X PATCH http://${dspace.url}/api/submission/workspaceitems/<:id-workspaceitem> -H " * curl -X PATCH http://${dspace.server.url}/api/submission/workspaceitems/<:id-workspaceitem> -H "
* Content-Type: application/json" -d '[{ "op": "add", "path": " * Content-Type: application/json" -d '[{ "op": "add", "path": "
* /sections/traditionalpageone/dc.title/-", "value": {"value": "Add new * /sections/traditionalpageone/dc.title/-", "value": {"value": "Add new
* title"}}]' * title"}}]'
@@ -38,7 +38,7 @@ import org.springframework.util.Assert;
* "/sections/<:name-of-the-form>/<:metadata>/<:idx-zero-based>" * "/sections/<:name-of-the-form>/<:metadata>/<:idx-zero-based>"
* *
* Example: <code> * Example: <code>
* curl -X PATCH http://${dspace.url}/api/submission/workspaceitems/<:id-workspaceitem> -H " * curl -X PATCH http://${dspace.server.url}/api/submission/workspaceitems/<:id-workspaceitem> -H "
* Content-Type: application/json" -d '[{ "op": "add", "path": " * Content-Type: application/json" -d '[{ "op": "add", "path": "
* /sections/traditionalpageone/dc.title/1", "value": {"value": "Add new * /sections/traditionalpageone/dc.title/1", "value": {"value": "Add new
* title"}}]' * title"}}]'
@@ -48,7 +48,7 @@ import org.springframework.util.Assert;
* "/sections/<:name-of-the-form>/<:metadata>" * "/sections/<:name-of-the-form>/<:metadata>"
* *
* Example: <code> * Example: <code>
* curl -X PATCH http://${dspace.url}/api/submission/workspaceitems/<:id-workspaceitem> -H " * curl -X PATCH http://${dspace.server.url}/api/submission/workspaceitems/<:id-workspaceitem> -H "
* Content-Type: application/json" -d '[{ "op": "add", "path": " * Content-Type: application/json" -d '[{ "op": "add", "path": "
* /sections/traditionalpageone/dc.title", "value": [{"value": "Add new first * /sections/traditionalpageone/dc.title", "value": [{"value": "Add new first
* title"}, {"value": "Add new second title"}]}]' * title"}, {"value": "Add new second title"}]}]'

View File

@@ -21,7 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
* instance to put the 3rd author as 1st author you need to run: * instance to put the 3rd author as 1st author you need to run:
* *
* <code> * <code>
* curl -X PATCH http://${dspace.url}/api/submission/workspaceitems/<:id-workspaceitem> -H " * curl -X PATCH http://${dspace.server.url}/api/submission/workspaceitems/<:id-workspaceitem> -H "
* Content-Type: application/json" -d '[{ "op": "move", "from": " * Content-Type: application/json" -d '[{ "op": "move", "from": "
* /sections/traditionalpageone/dc.contributor.author/2", "path": " * /sections/traditionalpageone/dc.contributor.author/2", "path": "
* /sections/traditionalpageone/dc.contributor.author/0"}]' * /sections/traditionalpageone/dc.contributor.author/0"}]'

View File

@@ -21,7 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
* "/sections/<:name-of-the-form>/<:metadata>/<:idx-zero-based>" * "/sections/<:name-of-the-form>/<:metadata>/<:idx-zero-based>"
* *
* Example: <code> * Example: <code>
* curl -X PATCH http://${dspace.url}/api/submission/workspaceitems/<:id-workspaceitem> -H " * curl -X PATCH http://${dspace.server.url}/api/submission/workspaceitems/<:id-workspaceitem> -H "
* Content-Type: application/json" -d '[{ "op": "remove", "path": " * Content-Type: application/json" -d '[{ "op": "remove", "path": "
* /sections/traditionalpageone/dc.title/1"}]' * /sections/traditionalpageone/dc.title/1"}]'
* </code> * </code>
@@ -30,7 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired;
* "/sections/<:name-of-the-form>/<:metadata>" * "/sections/<:name-of-the-form>/<:metadata>"
* *
* Example: <code> * Example: <code>
* curl -X PATCH http://${dspace.url}/api/submission/workspaceitems/<:id-workspaceitem> -H " * curl -X PATCH http://${dspace.server.url}/api/submission/workspaceitems/<:id-workspaceitem> -H "
* Content-Type: application/json" -d '[{ "op": "remove", "path": " * Content-Type: application/json" -d '[{ "op": "remove", "path": "
* /sections/traditionalpageone/dc.title"}]' * /sections/traditionalpageone/dc.title"}]'
* </code> * </code>

View File

@@ -28,7 +28,7 @@ import org.springframework.util.Assert;
* must return an error. * must return an error.
* *
* Example: <code> * Example: <code>
* curl -X PATCH http://${dspace.url}/api/submission/workspaceitems/<:id-workspaceitem> -H " * curl -X PATCH http://${dspace.server.url}/api/submission/workspaceitems/<:id-workspaceitem> -H "
* Content-Type: application/json" -d '[{ "op": "replace", "path": " * Content-Type: application/json" -d '[{ "op": "replace", "path": "
* /sections/traditionalpageone/dc.title/0", "value": {"value": "Add new * /sections/traditionalpageone/dc.title/0", "value": {"value": "Add new
* title", "language": "en"}}]' * title", "language": "en"}}]'
@@ -37,7 +37,7 @@ import org.springframework.util.Assert;
* It is also possible to change only a single attribute of the {@link MetadataValueRest} (except the "place"). * It is also possible to change only a single attribute of the {@link MetadataValueRest} (except the "place").
* *
* Example: <code> * Example: <code>
* curl -X PATCH http://${dspace.url}/api/submission/workspaceitems/<:id-workspaceitem> -H " * curl -X PATCH http://${dspace.server.url}/api/submission/workspaceitems/<:id-workspaceitem> -H "
* Content-Type: application/json" -d '[{ "op": "replace", "path": " * Content-Type: application/json" -d '[{ "op": "replace", "path": "
* /sections/traditionalpageone/dc.title/0/language", "value": "it"}]' * /sections/traditionalpageone/dc.title/0/language", "value": "it"}]'
* </code> * </code>

View File

@@ -42,7 +42,7 @@ public class LicenseStep extends org.dspace.submit.step.LicenseStep implements A
String acceptanceDate = bitstreamService.getMetadata(bitstream, DCTERMS_RIGHTSDATE); String acceptanceDate = bitstreamService.getMetadata(bitstream, DCTERMS_RIGHTSDATE);
result.setAcceptanceDate(acceptanceDate); result.setAcceptanceDate(acceptanceDate);
result.setUrl( result.setUrl(
configurationService.getProperty("dspace.url") + "/api/" + BitstreamRest.CATEGORY + "/" + English configurationService.getProperty("dspace.server.url") + "/api/" + BitstreamRest.CATEGORY + "/" + English
.plural(BitstreamRest.NAME) + "/" + bitstream.getID() + "/content"); .plural(BitstreamRest.NAME) + "/" + bitstream.getID() + "/content");
result.setGranted(true); result.setGranted(true);
} }

View File

@@ -139,8 +139,8 @@ public class RdfIT extends AbstractWebClientIntegrationTest {
ResponseEntity<String> response = getResponseAsString(REDIRECTION_PATH + "/" + communityHandle); ResponseEntity<String> response = getResponseAsString(REDIRECTION_PATH + "/" + communityHandle);
// Expect a 303 (See Other) response code, redirecting us to the HTTP URI of the Community // Expect a 303 (See Other) response code, redirecting us to the HTTP URI of the Community
assertThat(response.getStatusCode(), equalTo(HttpStatus.SEE_OTHER)); assertThat(response.getStatusCode(), equalTo(HttpStatus.SEE_OTHER));
// Expect location of redirection to be [dspace.url]/handle/[community_handle] // Expect location of redirection to be [dspace.ui.url]/handle/[community_handle]
assertThat(response.getHeaders().getLocation(), equalTo( assertThat(response.getHeaders().getLocation(), equalTo(
URI.create(configurationService.getProperty("dspace.url") + "/handle/" + communityHandle + "/"))); URI.create(configurationService.getProperty("dspace.ui.url") + "/handle/" + communityHandle + "/")));
} }
} }

View File

@@ -106,7 +106,7 @@ public class BitstreamEntryGenerator extends DSpaceATOMEntry {
if (this.deposit != null && this.deposit.isNoOp()) { if (this.deposit != null && this.deposit.isNoOp()) {
// just use the dspace url as the // just use the dspace url as the
// property // property
String cfg = ConfigurationManager.getProperty("dspace.url"); String cfg = ConfigurationManager.getProperty("dspace.ui.url");
entry.setId(cfg); entry.setId(cfg);
return; return;

View File

@@ -162,7 +162,7 @@ public class ItemEntryGenerator extends DSpaceATOMEntry {
// if we get this far, then we just use the dspace url as the // if we get this far, then we just use the dspace url as the
// property // property
String cfg = ConfigurationManager.getProperty("dspace.url"); String cfg = ConfigurationManager.getProperty("dspace.ui.url");
entry.setId(cfg); entry.setId(cfg);
// FIXME: later on we will maybe have a workflow page supplied // FIXME: later on we will maybe have a workflow page supplied
@@ -246,7 +246,7 @@ public class ItemEntryGenerator extends DSpaceATOMEntry {
return; return;
} }
String base = ConfigurationManager.getProperty("dspace.url"); String base = ConfigurationManager.getProperty("dspace.ui.url");
// if there's no base URL, we are stuck // if there's no base URL, we are stuck
if (base == null) { if (base == null) {

View File

@@ -421,7 +421,7 @@ public class SWORDUrlManager {
} }
String handle = item.getHandle(); String handle = item.getHandle();
String bsLink = ConfigurationManager.getProperty("dspace.url"); String bsLink = ConfigurationManager.getProperty("dspace.ui.url");
if (handle != null && !"".equals(handle)) { if (handle != null && !"".equals(handle)) {
bsLink = bsLink + "/bitstream/" + handle + "/" + bsLink = bsLink + "/bitstream/" + handle + "/" +

View File

@@ -407,7 +407,7 @@ public class SwordUrlManager {
} }
String handle = item.getHandle(); String handle = item.getHandle();
String bsLink = ConfigurationManager.getProperty("dspace.url"); String bsLink = ConfigurationManager.getProperty("dspace.ui.url");
if (handle != null && !"".equals(handle)) { if (handle != null && !"".equals(handle)) {
bsLink = bsLink + "/bitstream/" + handle + "/" + bsLink = bsLink + "/bitstream/" + handle + "/" +

View File

@@ -26,14 +26,11 @@ dspace.dir = /dspace
dspace.hostname = localhost dspace.hostname = localhost
# DSpace server backend webapp URL. Include port number etc. # DSpace server backend webapp URL. Include port number etc.
dspace.baseUrl = http://localhost:8080/server dspace.server.url = http://localhost:8080/server
#dspace.baseUrl = http://localhost:8080/server
# Full link your end users will use to access DSpace. This is the URL of your angular UI # Full link your end users will use to access DSpace. This is the URL of your angular UI
dspace.url = http://localhost:3000 dspace.ui.url = http://localhost:3000
# Optional: DSpace URL for mobile access
# This
#dspace.mobileUrl = http://mobile.example.com
# Name of the site # Name of the site
dspace.name = DSpace at My University dspace.name = DSpace at My University
@@ -234,7 +231,7 @@ identifier.doi.namespaceseparator = dspace/
# #
# Items in DSpace receive a unique URL, stored in dc.identifier.uri # Items in DSpace receive a unique URL, stored in dc.identifier.uri
# after it is generated during the submission process. # after it is generated during the submission process.
handle.canonical.prefix = ${dspace.url}/handle/ handle.canonical.prefix = ${dspace.ui.url}/handle/
# If you register with CNRI's handle service at http://www.handle.net/, # If you register with CNRI's handle service at http://www.handle.net/,
# these links can be generated as permalinks using http://hdl.handle.net/ # these links can be generated as permalinks using http://hdl.handle.net/
@@ -1349,7 +1346,7 @@ webui.feed.item.author = dc.contributor.author
# Customize the image icon included with the site-wide feeds: # Customize the image icon included with the site-wide feeds:
# Must be an absolute URL, e.g. # Must be an absolute URL, e.g.
## webui.feed.logo.url = ${dspace.url}/themes/mysite/images/mysite-logo.png ## webui.feed.logo.url = ${dspace.ui.url}/themes/mysite/images/mysite-logo.png
# iTunes Podcast Enhanced RSS Feed Properties # iTunes Podcast Enhanced RSS Feed Properties
# Add all the communities / collections, separated by commas (no spaces) that should # Add all the communities / collections, separated by commas (no spaces) that should

View File

@@ -29,7 +29,7 @@ oai.solr.url=${solr.server}/oai
# Format - oai:PREFIX:HANDLE # Format - oai:PREFIX:HANDLE
oai.identifier.prefix = ${dspace.hostname} oai.identifier.prefix = ${dspace.hostname}
# Base url for bitstreams # Base url for bitstreams
oai.bitstream.baseUrl = ${dspace.url} oai.bitstream.baseUrl = ${dspace.ui.url}
# Base Configuration Directory # Base Configuration Directory
oai.config.dir = ${dspace.dir}/config/crosswalks/oai oai.config.dir = ${dspace.dir}/config/crosswalks/oai

View File

@@ -849,9 +849,9 @@ Common usage:
${dspace.dir}/bin/dspace create-administrator ${dspace.dir}/bin/dspace create-administrator
You should then be able to access your DSpace's 'home page': You should then be able to access your DSpace's REST API:
${dspace.url} ${dspace.server.url}
==================================================================== ====================================================================
</echo> </echo>