Improve code.

This commit is contained in:
Christian P. MOMON 2013-08-03 12:10:16 +02:00
parent 15dc84bfc9
commit 9a041bd008

View file

@ -16,7 +16,7 @@ import fr.devinsy.xidyn.utils.XidynUtils;
public class DomPresenter implements Presenter
{
static private final Logger logger = LoggerFactory.getLogger(DomPresenter.class);
private Document doc;
private Document dom;
private boolean isOutdated;
private StringBuffer defaultHtmlTarget;
@ -25,7 +25,7 @@ public class DomPresenter implements Presenter
*/
public DomPresenter()
{
this.doc = null;
this.dom = null;
this.isOutdated = false;
}
@ -69,7 +69,7 @@ public class DomPresenter implements Presenter
{
result = dynamize(new TagDataManager());
}
else if (this.doc == null)
else if (this.dom == null)
{
String errorMessage = "source not defined";
logger.error(errorMessage);
@ -80,7 +80,7 @@ public class DomPresenter implements Presenter
{
// Build the web page.
StringWriter writer = new StringWriter(20000);
DomPresenterCore.dynamize(writer, this.doc, data);
DomPresenterCore.dynamize(writer, this.dom, data);
result = writer.getBuffer();
this.isOutdated = false;
}
@ -96,7 +96,7 @@ public class DomPresenter implements Presenter
{
Document result;
result = this.doc;
result = this.dom;
//
return (result);
@ -110,7 +110,7 @@ public class DomPresenter implements Presenter
{
Object result;
result = this.doc;
result = this.dom;
//
return (result);
@ -135,7 +135,7 @@ public class DomPresenter implements Presenter
*/
public void setDOM(final Document doc)
{
this.doc = doc;
this.dom = doc;
this.isOutdated = true;
}
@ -144,8 +144,8 @@ public class DomPresenter implements Presenter
*/
public void setSource(final Document doc)
{
this.doc = doc;
XidynUtils.addMetaTag(this.doc, "generator", "XIDYN");
this.dom = doc;
XidynUtils.addMetaTag(this.dom, "generator", "XIDYN");
this.isOutdated = true;
}