1 19 20 package za.org.coefficient.modules.user; 21 22 import za.org.coefficient.interfaces.CoefficientContext; 23 import za.org.coefficient.modules.BaseModule; 24 import za.org.coefficient.util.ejb.VelocityScreenUtil; 25 26 import java.util.HashMap ; 27 28 42 public class Login extends BaseModule { 43 45 public String getMainMethod() { 46 return "prompt"; 47 } 48 49 public String getModuleDescription() { 50 return "This is the module that handles the login prompt"; 51 } 52 53 public String getModuleDisplayName() { 54 return "Login"; 55 } 56 57 public CoefficientContext prompt(CoefficientContext ctx) { 58 HashMap map = new HashMap (); 59 StringBuffer sb = new StringBuffer (); if (ctx.getCurrentUser() == null) { 61 sb = VelocityScreenUtil.getProcessedScreen("loginInfoPrompt.vm", map); 62 } 63 64 ctx.setModuleContent(sb.toString(), getModuleDisplayName()); 66 return ctx; 67 } 68 } 69 | Popular Tags |