diff --git a/.classpath b/.classpath
index 56175db..8e863e4 100644
--- a/.classpath
+++ b/.classpath
@@ -11,5 +11,9 @@
+
+
+
+
diff --git a/build.properties b/build.properties
index 7aebf28..74fabc4 100644
--- a/build.properties
+++ b/build.properties
@@ -1,3 +1,3 @@
product.name=xidyn
-product.revision.major=0
-product.revision.minor=2
+product.revision.major=1
+product.revision.minor=0
diff --git a/demo/XidynDemo.java b/demo/XidynDemo.java
index 8279a72..7eb0d82 100644
--- a/demo/XidynDemo.java
+++ b/demo/XidynDemo.java
@@ -3,6 +3,8 @@
*/
import org.apache.log4j.Level;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import fr.devinsy.xidyn.SimpleTagData;
import fr.devinsy.xidyn.StringPresenter;
@@ -13,15 +15,12 @@ import fr.devinsy.xidyn.TagDataManager;
*/
class XidynDemo
{
+ static private Logger logger = LoggerFactory.getLogger(XidynDemo.class);
static
{
// Initialize logger.
org.apache.log4j.BasicConfigurator.configure();
-
- org.apache.log4j.Logger logger = null;
- logger = org.apache.log4j.Logger.getRootLogger();
- logger.setLevel(Level.INFO);
- logger = org.apache.log4j.Logger.getLogger(XidynDemo.class);
+ org.apache.log4j.Logger.getRootLogger().setLevel(Level.INFO);
}
/**
diff --git a/lib/README b/lib/README
new file mode 100644
index 0000000..1e2e5da
--- /dev/null
+++ b/lib/README
@@ -0,0 +1,8 @@
+Description of used libraries:
+- activation: STU
+- hamcrest-core: required by junit
+- junit: unit tests API
+- log4j: log API
+- servlet-api: servlet API
+- slf4j-api: facade log API
+- slf4j-log4j12: adaptation layer between slf4j and log4j
\ No newline at end of file
diff --git a/lib/hamcrest-core-1.3-sources.jar b/lib/hamcrest-core-1.3-sources.jar
new file mode 100644
index 0000000..c3c110b
Binary files /dev/null and b/lib/hamcrest-core-1.3-sources.jar differ
diff --git a/lib/hamcrest-core-1.3.jar b/lib/hamcrest-core-1.3.jar
new file mode 100644
index 0000000..9d5fe16
Binary files /dev/null and b/lib/hamcrest-core-1.3.jar differ
diff --git a/lib/junit-4.11-sources.jar b/lib/junit-4.11-sources.jar
new file mode 100644
index 0000000..bab4cdd
Binary files /dev/null and b/lib/junit-4.11-sources.jar differ
diff --git a/lib/junit-4.11.jar b/lib/junit-4.11.jar
new file mode 100644
index 0000000..aaf7444
Binary files /dev/null and b/lib/junit-4.11.jar differ
diff --git a/lib/mail.jar b/lib/mail.jar
deleted file mode 100644
index eb2269d..0000000
Binary files a/lib/mail.jar and /dev/null differ
diff --git a/lib/slf4j-api-1.7.5-sources.jar b/lib/slf4j-api-1.7.5-sources.jar
new file mode 100644
index 0000000..51abe2b
Binary files /dev/null and b/lib/slf4j-api-1.7.5-sources.jar differ
diff --git a/lib/slf4j-api-1.7.5.jar b/lib/slf4j-api-1.7.5.jar
new file mode 100644
index 0000000..8766455
Binary files /dev/null and b/lib/slf4j-api-1.7.5.jar differ
diff --git a/lib/slf4j-log4j12-1.7.5-sources.jar b/lib/slf4j-log4j12-1.7.5-sources.jar
new file mode 100644
index 0000000..ea1b93b
Binary files /dev/null and b/lib/slf4j-log4j12-1.7.5-sources.jar differ
diff --git a/lib/slf4j-log4j12-1.7.5.jar b/lib/slf4j-log4j12-1.7.5.jar
new file mode 100644
index 0000000..afce5c2
Binary files /dev/null and b/lib/slf4j-log4j12-1.7.5.jar differ
diff --git a/rundemo b/rundemo
index df5db2c..bd2185e 100755
--- a/rundemo
+++ b/rundemo
@@ -1,2 +1,11 @@
-#$JAVA_HOME/bin/java -classpath lib/activation.jar:lib/log4j-1.2.14.jar:lib/mail.jar:servlet-api.jar:dist/xid.jar:dist/demo.jar XidDemo
-$JAVA_HOME/bin/java -classpath lib/activation.jar:lib/log4j-1.2.17.jar:lib/mail.jar:servlet-api.jar:build/classes:build/demo-classes/:demo.jar:xidyn*.jar XidynDemo
+$JAVA_HOME/bin/java -classpath \
+lib/activation.jar:\
+lib/log4j-1.2.17.jar:\
+lib/slf4j-api-1.7.5.jar:\
+lib/slf4j-log4j-1.2.5.jar:\
+lib/mail.jar:\
+servlet-api.jar:\
+build/classes:\
+build/demo-classes/:\
+demo.jar\
+ XidynDemo
diff --git a/src/fr/devinsy/xidyn/DomPresenter.java b/src/fr/devinsy/xidyn/DomPresenter.java
index d290ec9..7a0f298 100644
--- a/src/fr/devinsy/xidyn/DomPresenter.java
+++ b/src/fr/devinsy/xidyn/DomPresenter.java
@@ -2,6 +2,8 @@ package fr.devinsy.xidyn;
import java.io.StringWriter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
/**
@@ -11,7 +13,7 @@ public class DomPresenter extends Presenter
{
static final public char INDEX_SEPARATOR = '_';
- static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(DomPresenter.class);
+ static private Logger logger = LoggerFactory.getLogger(DomPresenter.class);
protected Document doc;
/**
diff --git a/src/fr/devinsy/xidyn/FilePresenter.java b/src/fr/devinsy/xidyn/FilePresenter.java
index 167ed48..1819cbd 100644
--- a/src/fr/devinsy/xidyn/FilePresenter.java
+++ b/src/fr/devinsy/xidyn/FilePresenter.java
@@ -5,12 +5,15 @@ import java.io.File;
import java.io.FileReader;
import java.io.StringWriter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
*
*/
public class FilePresenter extends DomPresenter
{
- static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(FilePresenter.class);
+ static private Logger logger = LoggerFactory.getLogger(FilePresenter.class);
private String sourceFilePathname;
private long sourceFileTime;
@@ -38,15 +41,6 @@ public class FilePresenter extends DomPresenter
this.doctype = "";
}
- /**
- *
- */
- @Override
- public StringBuffer dynamize(final TagDataManager datas) throws Exception
- {
- return (dynamize(datas.getIdsDataById()));
- }
-
/**
* No need to be synchronized.
*/
@@ -90,6 +84,15 @@ public class FilePresenter extends DomPresenter
return (result);
}
+ /**
+ *
+ */
+ @Override
+ public StringBuffer dynamize(final TagDataManager datas) throws Exception
+ {
+ return (dynamize(datas.getIdsDataById()));
+ }
+
/**
*
*/
diff --git a/src/fr/devinsy/xidyn/FilePresenters.java b/src/fr/devinsy/xidyn/FilePresenters.java
index 21a5f65..abf6a46 100644
--- a/src/fr/devinsy/xidyn/FilePresenters.java
+++ b/src/fr/devinsy/xidyn/FilePresenters.java
@@ -8,13 +8,16 @@ package fr.devinsy.xidyn;
import java.util.Vector;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
*
*/
public class FilePresenters extends Vector
{
private static final long serialVersionUID = 7058868685681354293L;
- static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(FilePresenters.class);
+ static private Logger logger = LoggerFactory.getLogger(FilePresenters.class);
/**
*
diff --git a/src/fr/devinsy/xidyn/FilePresentersProxy.java b/src/fr/devinsy/xidyn/FilePresentersProxy.java
index 3c9ec97..d1726e5 100644
--- a/src/fr/devinsy/xidyn/FilePresentersProxy.java
+++ b/src/fr/devinsy/xidyn/FilePresentersProxy.java
@@ -1,11 +1,14 @@
package fr.devinsy.xidyn;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
*
*/
public class FilePresentersProxy
{
- static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(FilePresentersProxy.class);
+ static private Logger logger = LoggerFactory.getLogger(FilePresentersProxy.class);
private static FilePresentersProxy instance = null;
private FilePresenters presenters = null;
diff --git a/src/fr/devinsy/xidyn/Presenter.java b/src/fr/devinsy/xidyn/Presenter.java
index 54160db..07011a7 100644
--- a/src/fr/devinsy/xidyn/Presenter.java
+++ b/src/fr/devinsy/xidyn/Presenter.java
@@ -14,6 +14,8 @@ import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.validation.Schema;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
@@ -27,14 +29,9 @@ import org.xml.sax.SAXException;
*/
public class Presenter
{
+ static private Logger logger = LoggerFactory.getLogger(Presenter.class);
static final public char INDEX_SEPARATOR = '_';
- static private org.apache.log4j.Logger logger;
- static
- {
- logger = org.apache.log4j.Logger.getLogger(Presenter.class);
- }
-
/**
*
*/
diff --git a/src/fr/devinsy/xidyn/StringPresenter.java b/src/fr/devinsy/xidyn/StringPresenter.java
index a9fbf74..6cfaf7a 100644
--- a/src/fr/devinsy/xidyn/StringPresenter.java
+++ b/src/fr/devinsy/xidyn/StringPresenter.java
@@ -3,16 +3,15 @@ package fr.devinsy.xidyn;
import java.io.ByteArrayInputStream;
import java.io.StringWriter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
*
*/
public class StringPresenter extends DomPresenter
{
- static private org.apache.log4j.Logger logger;
- static
- {
- logger = org.apache.log4j.Logger.getLogger(StringPresenter.class);
- }
+ static private Logger logger = LoggerFactory.getLogger(StringPresenter.class);
private String html;
@@ -35,15 +34,6 @@ public class StringPresenter extends DomPresenter
this.html = html;
}
- /**
- *
- */
- @Override
- public StringBuffer dynamize(final TagDataManager datas) throws Exception
- {
- return (dynamize(datas.getIdsDataById()));
- }
-
/**
*
*/
@@ -105,6 +95,15 @@ public class StringPresenter extends DomPresenter
return (result);
}
+ /**
+ *
+ */
+ @Override
+ public StringBuffer dynamize(final TagDataManager datas) throws Exception
+ {
+ return (dynamize(datas.getIdsDataById()));
+ }
+
/**
*
*/
@@ -128,14 +127,6 @@ public class StringPresenter extends DomPresenter
return (result);
}
- /**
- *
- */
- static public StringBuffer dynamize(final String html, final TagDataManager datas) throws Exception
- {
- return (dynamize(html, datas.getIdsDataById()));
- }
-
/**
* Xid a string with html in.
*/
@@ -150,4 +141,12 @@ public class StringPresenter extends DomPresenter
//
return (result);
}
+
+ /**
+ *
+ */
+ static public StringBuffer dynamize(final String html, final TagDataManager datas) throws Exception
+ {
+ return (dynamize(html, datas.getIdsDataById()));
+ }
}
diff --git a/test/XidTest.java b/test/XidynTest.java
similarity index 97%
rename from test/XidTest.java
rename to test/XidynTest.java
index 9675ecd..7045c1a 100644
--- a/test/XidTest.java
+++ b/test/XidynTest.java
@@ -2,28 +2,30 @@
* XidTest.
*/
-import fr.devinsy.xidyn.TagDataManager;
+import org.apache.log4j.Level;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import fr.devinsy.xidyn.SimpleTagData;
import fr.devinsy.xidyn.StringPresenter;
+import fr.devinsy.xidyn.TagDataManager;
/**
*
*/
-class XidTest
+class XidynTest
{
public enum MONTHS
{
JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBRE, DECEMBRE
}
+ static private Logger logger = LoggerFactory.getLogger(XidynTest.class);
static
{
// Initialize logger.
org.apache.log4j.BasicConfigurator.configure();
-
- org.apache.log4j.Logger log = null;
- log = org.apache.log4j.Logger.getRootLogger();
- log = org.apache.log4j.Logger.getLogger(XidTest.class);
+ org.apache.log4j.Logger.getRootLogger().setLevel(Level.INFO);
}
/**
diff --git a/test/one/Foo2Test.java b/test/one/Foo2Test.java
new file mode 100644
index 0000000..0b98fdf
--- /dev/null
+++ b/test/one/Foo2Test.java
@@ -0,0 +1,21 @@
+package one;
+
+import org.junit.Test;
+
+public class Foo2Test
+{
+ // private Logger logger =
+ // LoggerFactory.getLogger(PdfGenerationAmqpServiceInjectedTest.class);
+
+ /**
+ *
+ */
+ @Test
+ public void test2a()
+ {
+ // logger.debug("===== test starting...");
+
+ // logger.debug("===== test done.");
+ }
+
+}