package org.jboss.nukes.addons.modules.fsinfo;
import org.jboss.nukes.html.Page;
import org.jboss.nukes.module.ModuleSupport;
public class FSInfoModule extends ModuleSupport{
public FSInfoModule(){
super("FSInfoModule");
}
/**
* This method is called with the following url:
* http://localhost:8080/Nukes/index.html?module=fsinfo
*/
public void main(Page page)
{
page.print("
");
page.print("Welcome to the template module");
page.print("
");
// print a form that ask for a name
page.print("");
// call Nukes main entry point
page.print("");
page.print("
");
page.print("");
}
/**
* This method is called with the following url:
* http://localhost:8080/Nukes/index.html?module=fsinfo&op=action
*/
public void action(Page page)
{
// get the parameter
String name = page.getParameter("name");
// if no name has been provided, just render the main page again
if (name == null || name.length() == 0)
{
main(page);
return;
}
page.print("");
page.print("Welcome to the template module, " + name);
if ( getApi().userLoggedIn() )
{
page.print("you are logged in");
}
page.print("
");
}
}