Permalink
Browse files

Merge branch 'master' of github.com:leandrocruz/Xingu

  • Loading branch information...
2 parents 5e3b7b8 + 65cd9fa commit a30b9ef3484dd2bc4e687c56314d8b6b0ffe8904 @ccidral ccidral committed May 8, 2012
@@ -2,11 +2,13 @@
import java.io.Serializable;
+import br.com.ibnetwork.xingu.lang.WithId;
+
/**
* Don't remove this interface. This is required to speed-up the gwt compilation process
*
* @see http://efreedom.com/Question/1-3059787/Gwt-Using-List-Serializable-RPC-Call
*/
public interface Command
- extends Serializable
+ extends Serializable, WithId
{}
@@ -2,8 +2,10 @@
import java.io.Serializable;
+import br.com.ibnetwork.xingu.lang.WithId;
+
public interface CommandReply
- extends Serializable
+ extends Serializable, WithId
{
String OK = "OK";
@@ -1,13 +1,28 @@
package xingu.servlet.command;
+
public class CommandReplySupport
implements CommandReply
{
protected String result = OK; /* used in json serialziation. Do not remove */
+
+ private long id;
@Override
public String result()
{
return result;
}
+
+ @Override
+ public void setId(long id)
+ {
+ this.id = id;
+ }
+
+ @Override
+ public long getId()
+ {
+ return id;
+ }
}
@@ -0,0 +1,21 @@
+package xingu.servlet.command.impl;
+
+import xingu.servlet.command.Command;
+
+public class CommandSupport
+ implements Command
+{
+ private long id;
+
+ @Override
+ public long getId()
+ {
+ return id;
+ }
+
+ @Override
+ public void setId(long id)
+ {
+ this.id = id;
+ }
+}
@@ -20,6 +20,8 @@
import br.com.ibnetwork.xingu.container.Inject;
import br.com.ibnetwork.xingu.factory.Factory;
import freemarker.cache.TemplateLoader;
+
+import freemarker.log.Logger;
import freemarker.core.InvalidReferenceException;
import freemarker.core.ParseException;
import freemarker.template.Template;
@@ -70,7 +72,16 @@ protected String getDefaultExtension()
public void configure(Configuration conf)
throws ConfigurationException
{
- super.configure(conf);
+ super.configure(conf);
+ try
+ {
+ Logger.selectLoggerLibrary(Logger.LIBRARY_SLF4J);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new ConfigurationException("Error loading loger library", e);
+ }
+
wrapper = (FreemarkerConfiguration) factory.create(FreemarkerConfiguration.class);
cfg = new freemarker.template.Configuration();
try
@@ -0,0 +1,8 @@
+package br.com.ibnetwork.xingu.lang;
+
+public interface WithId
+{
+ void setId(long id);
+
+ long getId();
+}

0 comments on commit a30b9ef

Please sign in to comment.