1 19 20 package com.lutris.airsent.presentation; 21 22 import com.lutris.airsent.presentation.*; 23 import com.lutris.appserver.server.httpPresentation.*; 24 import com.lutris.appserver.server.session.*; 25 import com.lutris.appserver.server.Enhydra; 26 import com.lutris.logging.*; 28 import com.lutris.util.KeywordValueException; 29 import com.lutris.appserver.server.user.User; 30 import org.w3c.dom.*; 31 import org.enhydra.wireless.wml.dom.WMLGoElement; 32 import org.enhydra.xml.xmlc.XMLObject; 33 import java.lang.reflect.*; 34 import java.util.*; 35 import java.lang.Throwable ; 36 37 48 public abstract class DeviceBasePO extends BasePO { 49 50 59 public abstract XMLObject handleDefault() 60 throws HttpPresentationException; 61 62 66 abstract protected int getRequiredAuthLevel(); 67 68 72 protected void rerouteForContent(HttpPresentationComms comms) {} 73 74 ; 75 76 92 public XMLObject create(String poName) 93 throws AirSentPresentationException { 94 XMLObject page = null; 95 96 try { 97 page = 98 getComms().xmlcFactory.create(DeviceUtils.getPageName(getComms(), 99 poName)); 100 } catch (Exception ex) { 101 throw new AirSentPresentationException("Trouble getting current authorization level", 102 ex); 103 } 104 return page; 105 } 106 107 108 119 public XMLObject handleLogout() throws AirSentPresentationException { 120 try { 121 122 mySessionData = null; 123 SessionManager sessionManager = myComms.session.getSessionManager(); 124 sessionManager.deleteSession(myComms.session); 125 126 throw new ClientPageRedirectException(AirSentConstants.XML_PAGE); 127 } catch (Exception e) { 128 throw new AirSentPresentationException("Trouble logging out user", 129 e); 130 } 131 } 132 } 133 134
| Popular Tags
|