org.dspace.discovery.configuration.DiscoverySpringLoader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dspace-discovery-provider Show documentation
Show all versions of dspace-discovery-provider Show documentation
Build Information
$Id: pom.xml 5367 2010-09-30 00:30:11Z mdiggory $
$URL: https://scm.dspace.org/svn/repo/modules/dspace-discovery/trunk/provider/pom.xml $
/**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.discovery.configuration;
import org.dspace.kernel.config.SpringLoader;
import org.dspace.services.ConfigurationService;
import java.io.File;
import java.net.MalformedURLException;
/**
* User: kevin (kevin at atmire.com)
* Date: 3-aug-2011
* Time: 11:39:37
*/
public class DiscoverySpringLoader implements SpringLoader {
@Override
public String[] getResourcePaths(ConfigurationService configurationService) {
StringBuffer filePath = new StringBuffer();
filePath.append(configurationService.getProperty("dspace.dir"));
filePath.append(File.separator);
filePath.append("config");
filePath.append(File.separator);
filePath.append("spring");
filePath.append(File.separator);
filePath.append("discovery");
filePath.append(File.separator);
try {
return new String[]{new File(filePath.toString()).toURI().toURL().toString() + XML_SUFFIX};
} catch (MalformedURLException e) {
return new String[0];
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy