Mercurial Hosting > nabble
diff src/nabble/view/web/template/RegistrationNamespace.java @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/nabble/view/web/template/RegistrationNamespace.java Thu Mar 21 19:15:52 2019 -0600 @@ -0,0 +1,27 @@ +package nabble.view.web.template; + +import nabble.model.ModelException; +import nabble.model.Site; +import nabble.naml.compiler.Command; +import nabble.naml.compiler.IPrintWriter; +import nabble.naml.compiler.Interpreter; +import nabble.naml.compiler.Namespace; + +@Namespace( + name = "registration", + global = false +) +public class RegistrationNamespace { + + private String key; + + public RegistrationNamespace(Site site, String email, String password, String userName, String nextUrl) + throws ModelException + { + this.key = site.newRegistration(email,password,userName,nextUrl); + } + + @Command("key") public void _key(IPrintWriter out, Interpreter interp) { + out.print(key); + } +}