VIVO-848 Move the FileStorage system behind an interface

Add it to the Application framework, and do some cleanup.
This commit is contained in:
j2blake 2014-08-14 16:55:46 -04:00
parent 5f5a02ce5d
commit bb7ab3b2a3
2 changed files with 3 additions and 6 deletions

View file

@ -28,8 +28,6 @@ edu.cornell.mannlib.vitro.webapp.servlet.setup.rdfsetup.RDFSetup
edu.cornell.mannlib.vitro.webapp.servlet.setup.ConfigurationModelsSetup
edu.cornell.mannlib.vitro.webapp.servlet.setup.ContentModelSetup
edu.cornell.mannlib.vitro.webapp.filestorage.backend.FileStorageSetup
edu.cornell.mannlib.vitro.webapp.web.images.PlaceholderUtil$Setup
# Some permissions were removed in release 1.7
@ -71,7 +69,6 @@ edu.cornell.mannlib.vitro.webapp.search.documentBuilding.VivoDocumentModifiers
# The search indexer uses a "public" permission, so the PropertyRestrictionPolicyHelper
# and the PermissionRegistry must already be set up.
edu.cornell.mannlib.vitro.webapp.searchengine.SearchEngineSetup
edu.cornell.mannlib.vitro.webapp.searchindex.SearchIndexerSetup
edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerSetup

View file

@ -41,7 +41,7 @@ import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ExceptionResponseValues;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.TemplateResponseValues;
import edu.cornell.mannlib.vitro.webapp.filestorage.backend.FileStorageSetup;
import edu.cornell.mannlib.vitro.webapp.filestorage.impl.FileStorageImplWrapper;
public class FileHarvestController extends FreemarkerHttpServlet {
@ -213,12 +213,12 @@ public class FileHarvestController extends FreemarkerHttpServlet {
*/
private static String getUploadPathBase(ServletContext context) throws Exception
{
String vitroHomeDirectoryName = ConfigurationProperties.getBean(context).getProperty(FileStorageSetup.PROPERTY_VITRO_HOME_DIR);
String vitroHomeDirectoryName = ConfigurationProperties.getBean(context).getProperty(FileStorageImplWrapper.PROPERTY_VITRO_HOME_DIR);
if (vitroHomeDirectoryName == null) {
throw new Exception("Vitro home directory name could not be found.");
}
String pathBase = vitroHomeDirectoryName + "/" + FileStorageSetup.FILE_STORAGE_SUBDIRECTORY + "/" + PATH_TO_UPLOADS;
String pathBase = vitroHomeDirectoryName + "/" + FileStorageImplWrapper.FILE_STORAGE_SUBDIRECTORY + "/" + PATH_TO_UPLOADS;
return pathBase;
}