00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 package org.openmobileis.synchro.openmsp.client.services;
00029
00030 import javax.servlet.ServletException;
00031 import javax.servlet.http.HttpServletRequest;
00032 import javax.servlet.http.HttpServletResponse;
00033
00034 import org.openmobileis.services.TemplateService;
00035 import org.openmobileis.services.navigation.NavigationBarService;
00036 import org.openmobileis.synchro.openmsp.client.OpenMSPSynchroManager;
00037
00038 import freemarker.template.*;
00039
00048 public class SynchroLoginService extends TemplateService implements NavigationBarService {
00049
00050 private static final String templatePath="openmischannel"+java.io.File.separator+"synchrologin.htm";
00051
00052 public SynchroLoginService() {
00053 }
00054
00055 public String runTemplate(HttpServletRequest parm1, HttpServletResponse parm2, TemplateModelRoot templateRoot) throws java.io.IOException, ServletException {
00056 String login = OpenMSPSynchroManager.getManager().getLastSynchroLogin();
00057 templateRoot.put("action",new SimpleScalar("/synchro/direct"));
00058 if (login != null) {
00059 templateRoot.put("login", new SimpleScalar(login));
00060 }
00061 return templatePath;
00062 }
00063
00064 public String getNavigationBarLabel(HttpServletRequest req) {
00065 return "Synchro login";
00066 }
00067
00068 public boolean displayFormExitMessage() {
00069 return false;
00070 }
00071
00072 public boolean displayRecursive() {
00073 return false;
00074 }
00075
00076
00077
00078
00079 public String getName() {
00080
00081 return "/synchro/login";
00082 }
00083 }