Presenter evolution.

This commit is contained in:
administrateur 2007-02-16 00:14:38 +01:00
parent eb58627437
commit 3c5c440821
2 changed files with 49 additions and 3 deletions

5
TODO
View file

@ -6,3 +6,8 @@ datas.setAttribute ("<div>", "class", "border-color: red;")
content too.
20070213, cpm:
add a option to do not have to extract the body, to optimize.
20070215, cpm:
add management of Presenter (String html) with Presenter (String fileName)

View file

@ -12,14 +12,21 @@ import org.w3c.dom.*;
*/
public class Presenter
{
static protected org.apache.log4j.Logger log;
static final public char INDEX_SEPARATOR = '_';
static protected org.apache.log4j.Logger log;
static
{
log = org.apache.log4j.Logger.getLogger (Presenter.class.getName ());
}
static protected String staticRootPath;
static
{
staticRootPath = null;
}
protected String webappPath;
protected String sourceFileName;
protected long sourceFileTime;
@ -30,19 +37,37 @@ public class Presenter
*/
public Presenter ()
{
this.webappPath = null;
this.webappPath = Presenter.staticRootPath;
this.sourceFileName = null;
this.sourceFileTime = 0;
this.doc = null;
}
/*
*
*/
public Presenter (String fileName)
{
this.webappPath = Presenter.staticRootPath;
this.sourceFileName = fileName;
this.sourceFileTime = 0;
this.doc = null;
}
/*
*
*/
public Presenter (String webappPath, String fileName)
{
this.webappPath = webappPath;
if ((webappPath == null) || (webappPath.equals ("")))
{
this.webappPath = Presenter.staticRootPath;
}
else
{
this.webappPath = webappPath;
}
this.sourceFileName = fileName;
this.sourceFileTime = 0;
this.doc = null;
@ -62,6 +87,22 @@ public class Presenter
return (result);
}
/*
*
*/
public void setWebappPath (String path)
{
this.webappPath = path;
}
/*
*
*/
static public void setStaticRootPath (String path)
{
Presenter.staticRootPath = path;
}
/*
*