eu.planets_project.services.utils
Class WebContentHelper
java.lang.Object
eu.planets_project.services.utils.WebContentHelper
public class WebContentHelper
- extends Object
Utility class to provide content via a web server
Requires external access to a web server. JBoss must be started with option -b 0.0.0.0.
Default values can be overwritten by providing a properties file at /WEB-INF/classes/content.properties
CONTENT_PROPERTIES_PATH
public static final String CONTENT_PROPERTIES_PATH
- See Also:
- Constant Field Values
WEB_ACCESS_PATH
public static final String WEB_ACCESS_PATH
- See Also:
- Constant Field Values
TEMP_DIR
public static final String TEMP_DIR
- See Also:
- Constant Field Values
HOST
public static final String HOST
- See Also:
- Constant Field Values
PORT
public static final String PORT
- See Also:
- Constant Field Values
LIFETIME
public static final String LIFETIME
- See Also:
- Constant Field Values
WebContentHelper
public WebContentHelper()
throws UnknownHostException
- Throws:
UnknownHostException
copyIntoHTMLDirectory
public URL copyIntoHTMLDirectory(File file)
throws MalformedURLException,
IOException
- Copies a file into a public html directory and returns an http URL for it.
- Throws:
MalformedURLException
IOException
getWebAccessPath
public String getWebAccessPath()
getPort
public int getPort()
getHost
public String getHost()
cleanOutdatedFiles
public void cleanOutdatedFiles()
Copyright © 2013 Open Planets Foundation. All Rights Reserved.