Improve code.
This commit is contained in:
parent
15dc84bfc9
commit
9a041bd008
1 changed files with 9 additions and 9 deletions
|
@ -16,7 +16,7 @@ import fr.devinsy.xidyn.utils.XidynUtils;
|
||||||
public class DomPresenter implements Presenter
|
public class DomPresenter implements Presenter
|
||||||
{
|
{
|
||||||
static private final Logger logger = LoggerFactory.getLogger(DomPresenter.class);
|
static private final Logger logger = LoggerFactory.getLogger(DomPresenter.class);
|
||||||
private Document doc;
|
private Document dom;
|
||||||
private boolean isOutdated;
|
private boolean isOutdated;
|
||||||
private StringBuffer defaultHtmlTarget;
|
private StringBuffer defaultHtmlTarget;
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ public class DomPresenter implements Presenter
|
||||||
*/
|
*/
|
||||||
public DomPresenter()
|
public DomPresenter()
|
||||||
{
|
{
|
||||||
this.doc = null;
|
this.dom = null;
|
||||||
this.isOutdated = false;
|
this.isOutdated = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ public class DomPresenter implements Presenter
|
||||||
{
|
{
|
||||||
result = dynamize(new TagDataManager());
|
result = dynamize(new TagDataManager());
|
||||||
}
|
}
|
||||||
else if (this.doc == null)
|
else if (this.dom == null)
|
||||||
{
|
{
|
||||||
String errorMessage = "source not defined";
|
String errorMessage = "source not defined";
|
||||||
logger.error(errorMessage);
|
logger.error(errorMessage);
|
||||||
|
@ -80,7 +80,7 @@ public class DomPresenter implements Presenter
|
||||||
{
|
{
|
||||||
// Build the web page.
|
// Build the web page.
|
||||||
StringWriter writer = new StringWriter(20000);
|
StringWriter writer = new StringWriter(20000);
|
||||||
DomPresenterCore.dynamize(writer, this.doc, data);
|
DomPresenterCore.dynamize(writer, this.dom, data);
|
||||||
result = writer.getBuffer();
|
result = writer.getBuffer();
|
||||||
this.isOutdated = false;
|
this.isOutdated = false;
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ public class DomPresenter implements Presenter
|
||||||
{
|
{
|
||||||
Document result;
|
Document result;
|
||||||
|
|
||||||
result = this.doc;
|
result = this.dom;
|
||||||
|
|
||||||
//
|
//
|
||||||
return (result);
|
return (result);
|
||||||
|
@ -110,7 +110,7 @@ public class DomPresenter implements Presenter
|
||||||
{
|
{
|
||||||
Object result;
|
Object result;
|
||||||
|
|
||||||
result = this.doc;
|
result = this.dom;
|
||||||
|
|
||||||
//
|
//
|
||||||
return (result);
|
return (result);
|
||||||
|
@ -135,7 +135,7 @@ public class DomPresenter implements Presenter
|
||||||
*/
|
*/
|
||||||
public void setDOM(final Document doc)
|
public void setDOM(final Document doc)
|
||||||
{
|
{
|
||||||
this.doc = doc;
|
this.dom = doc;
|
||||||
this.isOutdated = true;
|
this.isOutdated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,8 +144,8 @@ public class DomPresenter implements Presenter
|
||||||
*/
|
*/
|
||||||
public void setSource(final Document doc)
|
public void setSource(final Document doc)
|
||||||
{
|
{
|
||||||
this.doc = doc;
|
this.dom = doc;
|
||||||
XidynUtils.addMetaTag(this.doc, "generator", "XIDYN");
|
XidynUtils.addMetaTag(this.dom, "generator", "XIDYN");
|
||||||
this.isOutdated = true;
|
this.isOutdated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue