diff --git a/demo/XidDemo.java b/demo/XidDemo.java index 08b7c17..ae54d63 100644 --- a/demo/XidDemo.java +++ b/demo/XidDemo.java @@ -45,7 +45,7 @@ class XidDemo StringBuffer htmlTarget; try { - htmlTarget = StringPresenter.doXid(htmlSource, datas); + htmlTarget = StringPresenter.dynamize(htmlSource, datas); } catch (Exception exception) { @@ -75,7 +75,7 @@ class XidDemo StringBuffer htmlTarget; try { - htmlTarget = StringPresenter.doXid(htmlSource, datas); + htmlTarget = StringPresenter.dynamize(htmlSource, datas); } catch (Exception exception) { @@ -111,7 +111,7 @@ class XidDemo StringBuffer htmlTarget; try { - htmlTarget = StringPresenter.doXid(htmlSource, datas); + htmlTarget = StringPresenter.dynamize(htmlSource, datas); } catch (Exception exception) { @@ -156,7 +156,7 @@ class XidDemo StringBuffer htmlTarget; try { - htmlTarget = StringPresenter.doXid(htmlSource, datas); + htmlTarget = StringPresenter.dynamize(htmlSource, datas); } catch (Exception exception) { @@ -225,7 +225,7 @@ class XidDemo StringBuffer html; try { - html = StringPresenter.doXid(htmlSource, datas); + html = StringPresenter.dynamize(htmlSource, datas); } catch (Exception exception) { @@ -240,7 +240,7 @@ class XidDemo System.out.println("ONLY_FIRST_TWO_ROWS:"); try { - html = StringPresenter.doXid(htmlSource, datas); + html = StringPresenter.dynamize(htmlSource, datas); } catch (Exception exception) { @@ -255,7 +255,7 @@ class XidDemo System.out.println("ONLY_ROWS_WITH_ID:"); try { - html = StringPresenter.doXid(htmlSource, datas); + html = StringPresenter.dynamize(htmlSource, datas); } catch (Exception exception) { @@ -270,7 +270,7 @@ class XidDemo System.out.println("ONLY_ROWS_WITHOUT_ID:"); try { - html = StringPresenter.doXid(htmlSource, datas); + html = StringPresenter.dynamize(htmlSource, datas); } catch (Exception exception) { @@ -285,7 +285,7 @@ class XidDemo System.out.println("ALL_ROWS:"); try { - html = StringPresenter.doXid(htmlSource, datas); + html = StringPresenter.dynamize(htmlSource, datas); } catch (Exception exception) { diff --git a/src/fr/devinsy/xidyn/DomPresenter.java b/src/fr/devinsy/xidyn/DomPresenter.java index 14d42d8..81697b3 100644 --- a/src/fr/devinsy/xidyn/DomPresenter.java +++ b/src/fr/devinsy/xidyn/DomPresenter.java @@ -46,15 +46,7 @@ public class DomPresenter extends Presenter /** * */ - public StringBuffer doXid(final Data datas) throws Exception - { - return (doXid(datas.getIdsDataById())); - } - - /** - * - */ - public StringBuffer doXid(final IdsDataById datas) throws Exception + public StringBuffer dynamize(final IdsDataById datas) throws Exception { StringBuffer result; @@ -69,7 +61,7 @@ public class DomPresenter extends Presenter { // Build the web page. StringWriter htmlCode = new StringWriter(); - Presenter.doXid(htmlCode, this.doc, datas); + Presenter.dynamize(htmlCode, this.doc, datas); result = new StringBuffer(htmlCode.toString()); } @@ -77,6 +69,14 @@ public class DomPresenter extends Presenter return (result); } + /** + * + */ + public StringBuffer dynamize(final Data datas) throws Exception + { + return (dynamize(datas.getIdsDataById())); + } + /** * */ @@ -110,7 +110,7 @@ public class DomPresenter extends Presenter /** * Xid a file with data. */ - static public StringBuffer doXid(final Document doc, final IdsDataById datas) throws Exception + static public StringBuffer dynamize(final Document doc, final IdsDataById datas) throws Exception { StringBuffer result; diff --git a/src/fr/devinsy/xidyn/FilePresenter.java b/src/fr/devinsy/xidyn/FilePresenter.java index a26a4df..93ccd72 100644 --- a/src/fr/devinsy/xidyn/FilePresenter.java +++ b/src/fr/devinsy/xidyn/FilePresenter.java @@ -42,20 +42,20 @@ public class FilePresenter extends DomPresenter * */ @Override - public StringBuffer doXid(final Data datas) throws Exception + public StringBuffer dynamize(final Data datas) throws Exception { - return (doXid(datas.getIdsDataById())); + return (dynamize(datas.getIdsDataById())); } /** * No need to be synchronized. */ @Override - public StringBuffer doXid(final IdsDataById datas) throws Exception + public StringBuffer dynamize(final IdsDataById datas) throws Exception { StringBuffer result; - logger.info("doXid for file [" + this.sourceFilePathname + "]"); + logger.info("dynamize file [" + this.sourceFilePathname + "]"); // Get the good tree. File source = new File(this.sourceFilePathname); @@ -83,7 +83,7 @@ public class FilePresenter extends DomPresenter htmlCode.write(doctype); htmlCode.write('\n'); - Presenter.doXid(htmlCode, doc, datas); + Presenter.dynamize(htmlCode, doc, datas); result = htmlCode.getBuffer(); // @@ -116,30 +116,30 @@ public class FilePresenter extends DomPresenter } /** - * Xid a file without data. + * Dynamize a file without data. */ - static public StringBuffer doXid(final String filePathname) throws Exception + static public StringBuffer dynamize(final String filePathname) throws Exception { StringBuffer result; FilePresenter presenter = new FilePresenter(filePathname); - result = presenter.doXid((Data) null); + result = presenter.dynamize((Data) null); // return (result); } /** - * Xid a file. + * Dynamize a file. */ - static public StringBuffer doXid(final String filePathname, final Data datas) throws Exception + static public StringBuffer dynamize(final String filePathname, final Data datas) throws Exception { StringBuffer result; FilePresenter presenter = new FilePresenter(filePathname); - result = presenter.doXid(datas); + result = presenter.dynamize(datas); // return (result); diff --git a/src/fr/devinsy/xidyn/Presenter.java b/src/fr/devinsy/xidyn/Presenter.java index 69a69bd..0c75158 100644 --- a/src/fr/devinsy/xidyn/Presenter.java +++ b/src/fr/devinsy/xidyn/Presenter.java @@ -137,7 +137,7 @@ public class Presenter /** * Xid a file with data. */ - static public void doXid(final Writer result, final Document doc, final IdsDataById datas) throws Exception + static public void dynamize(final Writer result, final Document doc, final IdsDataById datas) throws Exception { Presenter.process(result, doc, datas); } diff --git a/src/fr/devinsy/xidyn/StringPresenter.java b/src/fr/devinsy/xidyn/StringPresenter.java index 5d0b6ed..cfd9295 100644 --- a/src/fr/devinsy/xidyn/StringPresenter.java +++ b/src/fr/devinsy/xidyn/StringPresenter.java @@ -39,16 +39,16 @@ public class StringPresenter extends DomPresenter * */ @Override - public StringBuffer doXid(final Data datas) throws Exception + public StringBuffer dynamize(final Data datas) throws Exception { - return (doXid(datas.getIdsDataById())); + return (dynamize(datas.getIdsDataById())); } /** * */ @Override - public StringBuffer doXid(final IdsDataById datas) throws Exception + public StringBuffer dynamize(final IdsDataById datas) throws Exception { StringBuffer result; @@ -76,7 +76,7 @@ public class StringPresenter extends DomPresenter { htmlCode.write(this.html.substring(0, this.html.indexOf('>'))); } - Presenter.doXid(htmlCode, doc, datas); + Presenter.dynamize(htmlCode, doc, datas); StringBuffer htmlTarget = htmlCode.getBuffer(); if (htmlTarget == null) @@ -131,21 +131,21 @@ public class StringPresenter extends DomPresenter /** * */ - static public StringBuffer doXid(final String html, final Data datas) throws Exception + static public StringBuffer dynamize(final String html, final Data datas) throws Exception { - return (doXid(html, datas.getIdsDataById())); + return (dynamize(html, datas.getIdsDataById())); } /** * Xid a string with html in. */ - static public StringBuffer doXid(final String html, final IdsDataById datas) throws Exception + static public StringBuffer dynamize(final String html, final IdsDataById datas) throws Exception { StringBuffer result; StringPresenter presenter = new StringPresenter(html); - result = presenter.doXid(datas); + result = presenter.dynamize(datas); // return (result); diff --git a/test/XidTest.java b/test/XidTest.java index 9c6b435..bc0c542 100644 --- a/test/XidTest.java +++ b/test/XidTest.java @@ -66,7 +66,7 @@ class XidTest datas.setContent("name", "Superman"); try { - html = StringPresenter.doXid("