eu.planets_project.services.utils
Class WebContentHelper

java.lang.Object
  extended by 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


Field Summary
static String CONTENT_PROPERTIES_PATH
           
static String HOST
           
static String LIFETIME
           
static String PORT
           
static String TEMP_DIR
           
static String WEB_ACCESS_PATH
           
 
Constructor Summary
WebContentHelper()
           
 
Method Summary
 void cleanOutdatedFiles()
           
 URL copyIntoHTMLDirectory(File file)
          Copies a file into a public html directory and returns an http URL for it.
 String getHost()
           
 int getPort()
           
 String getWebAccessPath()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

WebContentHelper

public WebContentHelper()
                 throws UnknownHostException
Throws:
UnknownHostException
Method Detail

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.