0001: // @@
0002: // @@
0003: /*
0004: * Wi.Ser Framework
0005: *
0006: * Version: 1.8.1, 20-September-2007
0007: * Copyright (C) 2005 Dirk von der Weiden <dvdw@imail.de>
0008: *
0009: * This library is free software; you can redistribute it and/or
0010: * modify it under the terms of the GNU Lesser General Public
0011: * License as published by the Free Software Foundation; either
0012: * version 2 of the License, or (at your option) any later version.
0013: *
0014: * This library is distributed in the hope that it will be useful,
0015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
0016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0017: * Lesser General Public License for more details.
0018: *
0019: * You should have received a copy of the GNU Lesser General Public
0020: * License along with this library located in LGPL.txt in the
0021: * license directory; if not, write to the
0022: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
0023: * Boston, MA 02111-1307, USA.
0024: *
0025: * If this agreement does not cover your requirements, please contact us
0026: * via email to get detailed information about the commercial license
0027: * or our service offerings!
0028: *
0029: */
0030: // @@
0031: package de.ug2t.channel.markup.generic;
0032:
0033: import java.io.*;
0034: import java.net.*;
0035: import java.util.*;
0036:
0037: import javax.servlet.*;
0038: import javax.servlet.http.*;
0039:
0040: import de.ug2t.channel.ho.session.*;
0041: import de.ug2t.channel.markup.service.*;
0042: import de.ug2t.channel.markup.session.*;
0043: import de.ug2t.kernel.*;
0044: import de.ug2t.process.*;
0045: import de.ug2t.unifiedGui.*;
0046: import de.ug2t.unifiedGui.interfaces.*;
0047: import de.ug2t.unifiedGui.session.*;
0048: import de.ug2t.workflow.*;
0049:
0050: public final class MuGenericApplication extends UnComponent implements
0051: HttpSessionBindingListener, IUnApplication {
0052: private String pem_hostName = null;
0053: private String pem_appName = null;
0054: private String pem_rootUrl = null;
0055: private InetAddress pem_Addr = null;
0056: private int pem_port = 8000;
0057: private String pem_redirect = null;
0058:
0059: public UnComponent pcm_active = null;
0060: public MuGenericPage pcm_Desktop = null;
0061: public UnComponent pcm_orgactive = null;
0062: public int pcm_wi = 1024;
0063: public int pcm_hi = 768;
0064: public boolean pcm_resized = true;
0065:
0066: protected boolean pdm_mdi = false;
0067: protected boolean pdm_scroll = true;
0068:
0069: private WfState pem_state = null;
0070: private String pem_contentType = "text/html";
0071: private HashMap pem_applContext = new HashMap();
0072: private String pem_user = null;
0073: private String pem_role = null;
0074: private String pem_css = null;
0075: private boolean pem_useMultiPart = false;
0076: private boolean pem_releaseOnBrowserExit = true;
0077:
0078: // @@
0079:
0080: private HashMap pem_transaction = null;
0081: private IUnMenu pem_mainMenu = null;
0082: private IUnMenu pem_activeMenu = null;
0083:
0084: private IKeExecutable pem_init = null;
0085: private MuGenericTemplateKit pem_kit = null;
0086: private transient HttpSession pem_session = null;
0087: private IUnImage pem_bg = null;
0088: private boolean pem_strict = false;
0089: private String pem_protocol = "http";
0090:
0091: private transient HttpServletRequest pem_cReq = null;
0092: private transient HttpServletResponse pem_cRes = null;
0093: private UnComponent pem_metaKey = new UnComponent("MY_META_KEY");
0094: private UnComponent pem_reqNr = new UnComponent("MY_REQ_NR");
0095: private UnComponent pem_bSize = new UnComponent("MY_BROWSER_SIZE");
0096: private boolean pem_useCache = true;
0097: private boolean pem_reqCtrl = true;
0098: private boolean pem_submitReshapes = false;
0099: private boolean pem_reload = false;
0100:
0101: public static final String MY_SESSION = "MY_SESSION";
0102:
0103: // @@
0104:
0105: private IUnGuiEventListener pem_wrongRequestHandler = null;
0106: private IMuGenericApplicationOutput pem_renderer = null;
0107: private NewBrowserWin pem_newWin = null;
0108:
0109: private boolean pem_bubble = true;
0110:
0111: public boolean pcmf_isReleaseOnBrowserExit() {
0112: return (this .pem_releaseOnBrowserExit);
0113: }
0114:
0115: public void pcmf_setReleaseOnBrowserExit(boolean xRelease) {
0116: this .pem_releaseOnBrowserExit = xRelease;
0117: }
0118:
0119: public void pcmf_setEventBubbling(boolean xBubble) {
0120: this .pem_bubble = xBubble;
0121: }
0122:
0123: public boolean pcmf_isEventBubbling() {
0124: return (this .pem_bubble);
0125: }
0126:
0127: public class NewBrowserWin {
0128: public String pdm_url;
0129: public String pdm_title;
0130: public int pdm_width;
0131: public int pdm_height;
0132: public boolean pdm_scroll;
0133:
0134: public NewBrowserWin(String xUrl, String xTitle, int xWidth,
0135: int xHeight, boolean xScroll) {
0136: this .pdm_height = xHeight;
0137: this .pdm_scroll = xScroll;
0138: this .pdm_title = xTitle;
0139: this .pdm_url = xUrl;
0140: this .pdm_width = xWidth;
0141: }
0142: }
0143:
0144: public void pcmf_openBrowserWindow(String xUrl, String xTitle,
0145: int xWidth, int xHeight, boolean xScroll) {
0146: this .pcmf_repaint();
0147: this .pem_newWin = new NewBrowserWin(xUrl, xTitle, xWidth,
0148: xHeight, xScroll);
0149: }
0150:
0151: public NewBrowserWin pcmf_getOpenBrowserWindow() {
0152: NewBrowserWin l_ret = this .pem_newWin;
0153: this .pem_newWin = null;
0154: return (l_ret);
0155: }
0156:
0157: public void pcmf_setPartialRenderLineLimit(int xLimit) {
0158: // @@
0159: }
0160:
0161: public int pcmf_getPartialRenderLineLimit() {
0162: int l_ret = 0;
0163: // @@
0164:
0165: return (l_ret);
0166: }
0167:
0168: public PcProcess pcmf_getService() {
0169: PcProcess l_ret = null;
0170:
0171: // @@
0172:
0173: return (l_ret);
0174: }
0175:
0176: public PcProcess pcmf_detachService() {
0177: PcProcess l_ret = null;
0178:
0179: // @@
0180:
0181: return (l_ret);
0182: }
0183:
0184: public void pcmf_setService(IKeExecutable xServiceFct,
0185: int xPollService, int xRefresh) {
0186: // @@
0187: }
0188:
0189: public void pcmf_setServiceProcess(PcProcess xServiceProc,
0190: int xRefresh) {
0191: // @@
0192: }
0193:
0194: public boolean pcmf_isMultipart() {
0195: return (this .pem_useMultiPart);
0196: }
0197:
0198: public void pcmf_setMultiPart(boolean xMulti) {
0199: if (xMulti)
0200: this .pem_renderer.pcmf_reqestFullRender();
0201:
0202: this .pem_useMultiPart = xMulti;
0203: }
0204:
0205: public HttpServletRequest pcmf_getHTTPRequest() {
0206: return (pem_cReq);
0207: }
0208:
0209: public HttpServletResponse pcmf_getHTTPResponse() {
0210: return (pem_cRes);
0211: }
0212:
0213: public final void pcmf_setProtocol(String xProt) {
0214: this .pem_protocol = xProt;
0215: };
0216:
0217: public final String pcmf_getProtocol() {
0218: return (this .pem_protocol);
0219: };
0220:
0221: // BackButton-Handling via Counter
0222: protected int pdm_requestNr = 0;
0223:
0224: private UnPeerValueMapper pem_mapper = new UnPeerValueMapper();
0225:
0226: public final void pcmf_construct(String xrootUrl, int xPort,
0227: WfState xState, boolean xMdi) throws Exception {
0228: if (KeRegisteredObject
0229: .pcmf_getObjByName(IUnApplication.MY_APPL) == null) {
0230: this .pcmf_unRegister();
0231: this .pcmf_register(IUnApplication.MY_APPL);
0232: }
0233: ;
0234:
0235: KeRegisteredObject.pcmf_register(IUnApplication.MY_APPL_TYPE,
0236: IUnApplication.APPL_TYPE_HTML);
0237: pem_metaKey.pcmf_reRegister(MY_META_KEY);
0238: pem_metaKey.pcmf_setValue("");
0239:
0240: pem_bSize.pcmf_reRegister("MY_BROWSER_SIZE");
0241: pem_bSize.pcmf_setValue("");
0242:
0243: pem_reqNr.pcmf_reRegister("MY_REQ_NR");
0244: pem_reqNr.pcmf_setValue("");
0245:
0246: pem_Addr = InetAddress.getLocalHost();
0247: pem_rootUrl = xrootUrl;
0248: pem_hostName = pem_Addr.getHostName();
0249: pem_port = xPort;
0250: pem_state = xState;
0251: pem_user = "Anonym";
0252:
0253: this .pdm_mdi = xMdi;
0254: MuHttpSessionWrapper l_wrapper = (MuHttpSessionWrapper) KeRegisteredObject
0255: .pcmf_getObjByName(MuGenericApplication.MY_SESSION);
0256: if (l_wrapper != null)
0257: this .pem_session = l_wrapper.pcmf_getHttpSesstion();
0258:
0259: this .pcmf_setAppl(this );
0260:
0261: // Debug
0262: // this.pcmf_setGenerateReshapeEvents(true);
0263: // this.pcmf_addListener(new UnPrintValueListener());
0264:
0265: return;
0266: };
0267:
0268: public MuGenericApplication(String xrootUrl, int xPort,
0269: WfState xState, IMuApplInit xInit, ServletConfig xConfig,
0270: boolean xMdi) throws Exception {
0271: super (xrootUrl);
0272: pcmf_construct(xrootUrl, xPort, xState, xMdi);
0273:
0274: xInit.pcmf_init(this , xConfig);
0275:
0276: return;
0277: }
0278:
0279: public MuGenericApplication(String xrootUrl, int xPort,
0280: WfState xState, IMuApplInit xInit, boolean xMdi)
0281: throws Exception {
0282: super (xrootUrl);
0283: pcmf_construct(xrootUrl, xPort, xState, xMdi);
0284:
0285: xInit.pcmf_init(this , null);
0286:
0287: return;
0288: }
0289:
0290: public MuGenericApplication(String xrootUrl, int xPort,
0291: WfState xState, boolean xMdi) throws Exception {
0292: super (xrootUrl);
0293: pcmf_construct(xrootUrl, xPort, xState, xMdi);
0294:
0295: return;
0296: }
0297:
0298: public MuGenericApplication(String xrootUrl, int xPort, boolean xMdi)
0299: throws Exception {
0300: super (xrootUrl);
0301: pcmf_construct(xrootUrl, xPort, null, xMdi);
0302:
0303: return;
0304: }
0305:
0306: public final boolean pcmf_isMDI() {
0307: return (this .pdm_mdi);
0308: };
0309:
0310: // Interfaces aus dem ServletAPI welche beim Binden beziehungsweise
0311: // Lösen der Sessionverbindung aufgerufen werden
0312: public final void valueBound(HttpSessionBindingEvent event) {
0313: if (this .pem_session == null)
0314: this .pem_session = event.getSession();
0315:
0316: return;
0317: };
0318:
0319: public final void valueUnbound(HttpSessionBindingEvent event) {
0320: // Hier wird aufgeräumt
0321:
0322: // @@
0323:
0324: this .pcmf_setValue(IUnApplication.APPL_CLOSING);
0325: this .pcmf_setRefresh();
0326: String l_tname = Thread.currentThread().getName();
0327: try {
0328: Thread.currentThread().setName(this .pem_session.getId());
0329: this .pcmf_dispatchEvent();
0330: } catch (Exception e) {
0331: KeLog
0332: .pcmf_log(
0333: pcmf_getName(),
0334: "error during 'web application closing' event dispatch",
0335: this , KeLog.ERROR);
0336: KeLog.pcmf_logException(pcmf_getName(), this , e);
0337: }
0338: Thread.currentThread().setName(l_tname);
0339:
0340: Iterator l_it = pem_applContext.values().iterator();
0341: Object l_obj = null;
0342: KeLog.pcmf_log(pcmf_getName(), "release session", this ,
0343: KeLog.MESSAGE);
0344: try {
0345: while (l_it.hasNext()) {
0346: l_obj = l_it.next();
0347: if (l_obj instanceof KeRegisteredObject)
0348: ((KeRegisteredObject) l_obj).pcmf_delete();
0349: else
0350: KeRegisteredObject.pcmf_unRegister(l_obj);
0351: }
0352: ;
0353: } catch (Exception e) {
0354: KeLog.pcmf_log(pcmf_getName(),
0355: "error during session unbind", this , KeLog.ERROR);
0356: }
0357: ;
0358:
0359: KeTools.pcmf_deleteFiles(new File(KeEnvironment
0360: .pcmf_getSessionTmpDir()), true);
0361: pem_applContext.clear();
0362: KeRegisteredObject.pcmf_deleteContext(event.getSession()
0363: .getId());
0364:
0365: return;
0366: };
0367:
0368: public final KeTreeElement pcmf_addListener(String xPage,
0369: String xPath, IUnGuiEventListener xListener) {
0370: UnComponent l_guiobj = null;
0371: KeTreeNode l_page = (KeTreeNode) pcmf_getSubNode(xPage);
0372:
0373: if (l_page == null)
0374: return (null);
0375:
0376: l_guiobj = (UnComponent) l_page.pcmf_getByPath(xPath);
0377: if (l_guiobj == null)
0378: return (null);
0379:
0380: l_guiobj.pcmf_addListener(xListener);
0381:
0382: return (l_guiobj);
0383: };
0384:
0385: public final KeTreeElement pcmf_addListener(String xPath,
0386: IUnGuiEventListener xListener) {
0387: UnComponent l_guiobj = (UnComponent) pcmf_getByPath(xPath);
0388:
0389: if (l_guiobj == null)
0390: return (null);
0391:
0392: l_guiobj.pcmf_addListener(xListener);
0393:
0394: return (l_guiobj);
0395: };
0396:
0397: public final void pcmf_setState(WfState xState) {
0398: pem_state = xState;
0399:
0400: return;
0401: };
0402:
0403: public final WfState pcmf_getState() {
0404: return (pem_state);
0405: };
0406:
0407: public final String pcmf_getHostName() {
0408: return (pem_hostName);
0409: };
0410:
0411: public final void pcmf_setHostName(String xHost) {
0412: this .pem_hostName = xHost;
0413: };
0414:
0415: public final String pcmf_getRootUrl() {
0416: return (pem_rootUrl);
0417: };
0418:
0419: public final void pcmf_setRootUrl(String xUrl) {
0420: this .pem_rootUrl = xUrl;
0421: };
0422:
0423: public final int pcmf_getPort() {
0424: return (pem_port);
0425: };
0426:
0427: public final void pcmf_setHttpPort(int xPort) {
0428: this .pem_port = xPort;
0429: };
0430:
0431: public final IUnPage pcmf_addPage(String xName, IUnPage xPage) {
0432: xPage.pcmf_getUnComponent().pcmf_setAppl((IUnApplication) this );
0433:
0434: return ((IUnPage) this .pcmf_addNode(xName, xPage
0435: .pcmf_getUnComponent()));
0436: };
0437:
0438: public final UnComponent pcmf_setActive(String xName) {
0439: return (this .pcmf_setActive(xName, false));
0440: }
0441:
0442: public void pcmf_setRedirect(String xRedirect) {
0443: this .pem_redirect = xRedirect;
0444: }
0445:
0446: public final UnComponent pcmf_setActive(String xName, boolean xFirst) {
0447: if (this .pcm_Desktop == null) {
0448: this .pcm_Desktop = (MuGenericPage) this
0449: .pcmf_getComponentFactory().pcmf_createGuiPage(
0450: UnComponentFactory.MARKUP,
0451: this .pcmf_getName(), true, this );
0452: this .pcmf_addPage(this .pcmf_getName(), pcm_Desktop);
0453: this .pcm_Desktop.pcmf_decorate(false);
0454: this .pcm_Desktop.pcmf_setBgImage(this .pem_bg);
0455: this .pcm_Desktop.pcmf_setBgColor(this .pcmf_getBgColor());
0456: this .pcm_Desktop.pcmf_setScroll(this .pcmf_getScroll());
0457: }
0458:
0459: UnComponent l_old = this .pcm_active;
0460:
0461: if (xName == null)
0462: xName = this .pcmf_getActive().pcmf_getName();
0463:
0464: pcm_active = (UnComponent) this .pcmf_getSubNode(xName);
0465: if (pcm_active == null)
0466: this .pcm_active = this .pcm_Desktop;
0467:
0468: if (l_old != this .pcm_active) {
0469: if (l_old != null) {
0470: try {
0471: l_old.pcmf_execPostFcts();
0472: } catch (Exception e) {
0473: KeLog
0474: .pcmf_log(
0475: this .pcmf_getObjName(),
0476: "catch exception during postfunction-execution, propably no active page",
0477: this , KeLog.ERROR);
0478: KeLog.pcmf_logException("ug2t", this , e);
0479: }
0480: ;
0481: }
0482:
0483: if (!this .pcmf_isMDI())
0484: this .pcmf_setExternalCss(((IUnPage) this .pcm_active)
0485: .pcmf_getExternalCss());
0486:
0487: this .pcmf_setPropChanged(true);
0488: this .pcmf_repaint();
0489: } else if (xFirst == false) {
0490: if (!this .pcmf_isMDI())
0491: this .pcmf_setExternalCss(((IUnPage) this .pcm_active)
0492: .pcmf_getExternalCss());
0493:
0494: return (this .pcm_active);
0495: }
0496:
0497: if (this .pcm_active instanceof MuGenericPage) {
0498: ((MuGenericPage) this .pcm_active).pcmf_setDefaultFocus();
0499: if (this .pdm_mdi) {
0500: if ((((MuGenericPage) this .pcm_active)
0501: .pcmf_getOwnsMenu() == false))
0502: this .pem_activeMenu = ((MuGenericPage) this .pcm_active)
0503: .pcmf_getMenu();
0504: else
0505: this .pem_activeMenu = null;
0506:
0507: this .pcm_Desktop
0508: .pcmf_setMenu(this .pcmf_getActiveMenu());
0509:
0510: IUnPageDecorator l_deco = ((MuGenericPage) this .pcm_active)
0511: .pcmf_getDeco();
0512: if (l_deco != null)
0513: l_deco.pcmf_displaymdiPageDecorator();
0514: } else
0515: this .pem_activeMenu = ((MuGenericPage) this .pcm_active)
0516: .pcmf_getMenu();
0517: }
0518: try {
0519: if (l_old != this .pcm_active) {
0520: pcm_active.pcmf_execPreFcts();
0521:
0522: // Remove Context Menues which are not within the current page
0523: if (!this .pdm_mdi && this .pem_renderer != null) {
0524: ArrayList l_ctxl = this .pem_renderer
0525: .pcmf_getCtxMenus();
0526: Iterator l_it = l_ctxl.iterator();
0527: while (l_it.hasNext()) {
0528: IUnMenu l_ctx = (IUnMenu) l_it.next();
0529: ArrayList l_all = new ArrayList();
0530: l_ctx.pcmf_getUnComponent()
0531: .pcmf_getAllParentGenerations(l_all);
0532: if (!l_all.contains(this .pcm_active)) {
0533: this .pem_renderer.pcmf_removeCtxMenu(l_ctx);
0534: l_ctx.pcmf_repaint();
0535: }
0536: }
0537: }
0538: }
0539: } catch (Exception e) {
0540: KeLog
0541: .pcmf_log(
0542: this .pcmf_getObjName(),
0543: "catch exception during prefunction-execution, propably no active page",
0544: this , KeLog.ERROR);
0545: KeLog.pcmf_logException("ug2t", this , e);
0546: return (null);
0547: }
0548: ;
0549:
0550: return (pcm_active);
0551: };
0552:
0553: public final UnComponent pcmf_getRootPane() {
0554: if (this .pdm_mdi)
0555: return (this .pcm_Desktop);
0556: else
0557: return (this .pcm_active);
0558: }
0559:
0560: public final UnComponent pcmf_getActive() {
0561: if (this .pcmf_contains(pcm_active) == true)
0562: return (pcm_active);
0563: else {
0564: this .pcm_active = null;
0565: Iterator l_it = this .pcmf_getSubIterator();
0566: Object l_obj = null;
0567: while (l_it.hasNext()) {
0568: l_obj = l_it.next();
0569: if (l_obj instanceof MuGenericPage
0570: && l_obj != this .pcm_Desktop)
0571: this .pcm_active = (MuGenericPage) l_obj;
0572: }
0573: if (this .pcm_active == null)
0574: this .pcm_active = this .pcm_Desktop;
0575:
0576: return (this .pcm_active);
0577: }
0578: };
0579:
0580: public final void pcmf_work(Object xReq, Object xResp,
0581: boolean xRobust) throws Exception {
0582: pcmf_work((HttpServletRequest) xReq,
0583: (HttpServletResponse) xResp, xRobust);
0584: };
0585:
0586: private boolean pem_first = true;
0587:
0588: protected final void pcmf_work(HttpServletRequest xReq,
0589: HttpServletResponse xRes, boolean xRobust) throws Exception {
0590: this .pem_cReq = xReq;
0591: this .pem_cRes = xRes;
0592:
0593: boolean l_resetCache = false;
0594: boolean l_exec = true;
0595: int l_renderState = this .pem_renderer.pcmf_getRenderState();
0596:
0597: if (l_renderState == IMuGenericApplicationOutput.FULLRENDER)
0598: l_resetCache = true;
0599:
0600: if (KeLog.pcmf_testLog(KeLog.TRACE))
0601: KeLog.pcmf_log(this .toString(), "entering (pcmf_work)",
0602: this , KeLog.TRACE);
0603:
0604: long l_milli = 0;
0605:
0606: if (KeLog.pcmf_testLog(KeLog.STATISTICS)) {
0607: l_milli = new Date().getTime();
0608: KeLog.pcmf_log("ug2t", "Start of Request Cycle", this ,
0609: KeLog.STATISTICS);
0610: }
0611:
0612: if (this .pem_init != null) {
0613: this .pem_init.pcmf_execObj(this );
0614: this .pem_init = null;
0615: }
0616:
0617: Object l_rawCnt = xReq.getParameter("MY_REQ_NR");
0618: pem_reload = false;
0619:
0620: // @@
0621:
0622: // do nothing except rendering if push/pull
0623: if (pem_reload == false) {
0624: if (l_rawCnt == null) {
0625: // Keine Counter gefunden, richtger Wert wird zugewiesen
0626: l_rawCnt = Integer.toString(this .pdm_requestNr);
0627: if (this .pem_reqCtrl
0628: && l_renderState == IMuGenericApplicationOutput.PARTIALRENDER)
0629: this .pcmf_repaint();
0630: } else if (l_rawCnt.equals("CLOSE")) {
0631: KeLog.pcmf_log("ug2t", "session closed by client",
0632: this , KeLog.MESSAGE);
0633:
0634: try {
0635: xReq.getSession().invalidate();
0636: } catch (Exception e) {
0637: KeLog.pcmf_log("ug2t", "session is already closed",
0638: this , KeLog.MESSAGE);
0639: }
0640:
0641: this .pem_cReq = null;
0642: this .pem_cRes = null;
0643:
0644: return;
0645: }
0646:
0647: int l_cnt = Integer.parseInt(l_rawCnt.toString());
0648: if (l_cnt == this .pdm_requestNr) {
0649: try {
0650: ArrayList l_dispList = new ArrayList();
0651:
0652: if (pem_mapper.pcmf_execMapping(xReq,
0653: this .pcm_active, l_dispList, pem_strict,
0654: this .pem_useMultiPart, this .pem_bubble) == true) {
0655: if (KeLog.pcmf_testLog(KeLog.STATISTICS))
0656: KeLog
0657: .pcmf_log(
0658: "ug2t",
0659: "End of value mapping: "
0660: + (new Date()
0661: .getTime() - l_milli),
0662: this , KeLog.STATISTICS);
0663:
0664: if (this .pcmf_getGenerateReshapeEvents()
0665: && this .pem_bSize.pcmf_getValue()
0666: .equals("") == false
0667: && this .pem_bSize
0668: .pcmf_getMyPropChanged()) {
0669: this .pcmf_setRefresh();
0670: this .pcm_wi = this .pcmf_getWi();
0671: this .pcm_hi = this .pcmf_getHi();
0672: this .pdm_Element = IUnApplication.APPL_RESIZED
0673: + ":"
0674: + this .pem_bSize.pcmf_getValue();
0675: this .pem_bSize.pcmf_setPropChanged(false);
0676: }
0677:
0678: this .pcmf_execPreFcts();
0679: UnComponent.pdm_dispatcher.pcmf_execDispatch(
0680: l_dispList, this );
0681: }
0682: } catch (Exception e) {
0683: KeLog
0684: .pcmf_log(
0685: this .pcmf_getObjName(),
0686: "catch exception during event-dispatch, propably no active page set",
0687: this , KeLog.FATAL);
0688: KeLog.pcmf_logException(this .pcmf_getObjName(),
0689: this , e);
0690: this .pcmf_close();
0691: if (!xRobust)
0692: throw (e);
0693: } catch (Throwable t) {
0694: KeLog.pcmf_logThrowable(this .pcmf_getObjName(),
0695: this , t);
0696: KeLog.pcmf_log(this .pcmf_getObjName(),
0697: "session closed", this , KeLog.ERROR);
0698: this .pcmf_close();
0699:
0700: if (!xRobust)
0701: throw (new Exception(t));
0702: }
0703: } else {
0704: KeLog
0705: .pcmf_log(
0706: "ug2t",
0707: "wrong request-number, user probably pressed back-button => no transaction executed",
0708: this , KeLog.ERROR);
0709: l_exec = false;
0710: if (pem_wrongRequestHandler != null)
0711: pem_wrongRequestHandler.pcmf_execListener(this );
0712:
0713: if (l_renderState == IMuGenericApplicationOutput.PARTIALRENDER)
0714: this .pcmf_repaint();
0715: }
0716: ;
0717: }
0718: if (KeLog.pcmf_testLog(KeLog.STATISTICS))
0719: KeLog.pcmf_log("ug2t", "End of event-dispatch: "
0720: + (new Date().getTime() - l_milli), this ,
0721: KeLog.STATISTICS);
0722:
0723: if (this .pcmf_isDeleted()) {
0724: boolean l_pr = this .pcmf_getTemplateKit()
0725: .pcmf_getSupportPartialRender();
0726:
0727: if (this .pem_redirect == null || l_pr)
0728: xRes.sendRedirect(xReq.getRequestURL().toString()
0729: + "?RELOAD=true");
0730: else if (this .pem_redirect != null)
0731: xRes.sendRedirect(this .pem_redirect);
0732: else
0733: xRes.sendRedirect(xReq.getRequestURL().toString()
0734: + "?RELOAD=true");
0735:
0736: return;
0737: }
0738:
0739: this .pem_useMultiPart = false;
0740:
0741: if (l_exec)
0742: this .pcmf_setActive(null, this .pem_first);
0743:
0744: this .pem_first = false;
0745:
0746: // Bei Post wird keine Antwort erzeugt !!
0747: // D.H. Bei Frames wird auf den Reload der Hauptseite gewartet
0748: // Es wird davon ausgegangen, dass noch ein anschließendes GET erfolgt !!
0749: // if (xReq.getRequestURL().indexOf("IFRAME") != -1)
0750: if (xReq.getRequestURI().indexOf("IFRAME") != -1) {
0751: xRes.reset();
0752: // Zurücksetzen der merker für aktiven Frame
0753: if (this .pcmf_getRootPane() instanceof MuGenericPage)
0754: this .pcmf_getRootPane().pcmf_setValue(
0755: ((MuGenericPage) this .pcmf_getRootPane())
0756: .pcmf_getTitle());
0757: } else {
0758: pem_metaKey.pcmf_setValue("");
0759: Object l_tit = ((MuGenericPage) this .pcmf_getRootPane())
0760: .pcmf_getTitle();
0761: Object l_val = this .pcmf_getRootPane().pcmf_getValue();
0762: if (!pem_reload
0763: && (l_val != null && l_tit != null
0764: && l_val.equals(l_tit) || (l_val == null && l_tit == null)))
0765: this .pdm_requestNr++;
0766:
0767: xRes.setContentType(this .pem_contentType + "; charset="
0768: + KeEnvironment.pcmf_getCharacterSet());
0769: PrintWriter l_out = xRes.getWriter();
0770:
0771: Object l_res = null;
0772: try {
0773: l_res = this .pcmf_execView();
0774: } catch (Exception e) {
0775: KeLog
0776: .pcmf_log(
0777: this .pcmf_getObjName(),
0778: "catch exception during rendering, session closed",
0779: this , KeLog.FATAL);
0780: KeLog
0781: .pcmf_logException(this .pcmf_getObjName(),
0782: this , e);
0783: this .pcmf_close();
0784:
0785: if (!xRobust)
0786: throw (e);
0787: } catch (Throwable t) {
0788: KeLog
0789: .pcmf_logThrowable(this .pcmf_getObjName(),
0790: this , t);
0791: KeLog.pcmf_log(this .pcmf_getObjName(),
0792: "error during rendering, session closed", this ,
0793: KeLog.ERROR);
0794: this .pcmf_close();
0795:
0796: if (!xRobust)
0797: throw (new Exception(t));
0798: }
0799:
0800: if (KeLog.pcmf_testLog(KeLog.STATISTICS))
0801: KeLog.pcmf_log("ug2t", "End of request render: "
0802: + (new Date().getTime() - l_milli), this ,
0803: KeLog.STATISTICS);
0804:
0805: if (l_res == null)
0806: throw (new Exception(
0807: "no active page set, or null returned as output"));
0808:
0809: try {
0810: if (l_res instanceof KeStringTemplate) {
0811: final char[] l_char = ((KeStringTemplate) l_res)
0812: .toArray();
0813: xRes.setBufferSize(l_char.length);
0814: l_out.print(l_char);
0815: } else {
0816: String l_str = l_res.toString();
0817: xRes.setBufferSize(l_str.length());
0818: l_out.print(l_str);
0819: }
0820:
0821: l_out.flush();
0822: l_out.close();
0823:
0824: if (l_exec)
0825: this .pcmf_execPostFcts();
0826: } catch (Exception e) {
0827: KeLog
0828: .pcmf_log(
0829: "ug2t",
0830: "writer interrupted (probably to prevent a deadlock), session closed",
0831: this , KeLog.MESSAGE);
0832: this .pcmf_close();
0833:
0834: if (!xRobust)
0835: throw (e);
0836: } catch (Throwable t) {
0837: KeLog
0838: .pcmf_logThrowable(this .pcmf_getObjName(),
0839: this , t);
0840: KeLog
0841: .pcmf_log(
0842: this .pcmf_getObjName(),
0843: "error during writer operation, session closed",
0844: this , KeLog.ERROR);
0845: this .pcmf_close();
0846:
0847: if (!xRobust)
0848: throw (new Exception(t));
0849: }
0850: }
0851: ;
0852:
0853: if (KeLog.pcmf_testLog(KeLog.STATISTICS))
0854: KeLog.pcmf_log("ug2t", "End of request after: "
0855: + (new Date().getTime() - l_milli), this ,
0856: KeLog.STATISTICS);
0857:
0858: // ===========DEBUG=======================
0859: // KeLog.pcmf_log("ug2t", "Cache statistics (hit/miss): " +
0860: // MuGenericCache.pcmf_getHits()+"/"+MuGenericCache.pcmf_getMiss(), this,
0861: // KeLog.MESSAGE);
0862: // KeLog.pcmf_log("ug2t", "Pool statistics (hit/miss): " +
0863: // KeObjectPool.pcmf_getObjectPool().pcmf_getAllPoolHits() + "/" +
0864: // KeObjectPool.pcmf_getObjectPool().pcmf_getAllPoolReq() , this,
0865: // KeLog.MESSAGE);
0866:
0867: // @@
0868:
0869: this .pem_cReq = null;
0870: this .pem_cRes = null;
0871:
0872: if (l_resetCache)
0873: this .pem_useCache = true;
0874:
0875: if (KeLog.pcmf_testLog(KeLog.TRACE))
0876: KeLog.pcmf_log(this .toString(), "leaving (pcmf_work)",
0877: this , KeLog.TRACE);
0878:
0879: return;
0880: }
0881:
0882: public void pcmf_execPreFcts() throws Exception {
0883: if (this .pdm_preFctActive && this .pdm_preFct != null) {
0884: Iterator l_it = this .pdm_preFct.iterator();
0885: while (l_it.hasNext())
0886: ((IUnPreDisplayFunction) l_it.next())
0887: .pcmf_execPreFct(this );
0888: }
0889: };
0890:
0891: public void pcmf_execPostFcts() throws Exception {
0892: if (this .pdm_postFctActive && this .pdm_postFct != null) {
0893: Iterator l_it = this .pdm_postFct.iterator();
0894: while (l_it.hasNext())
0895: ((IUnPostDisplayFunction) l_it.next())
0896: .pcmf_execPostFct(this );
0897: }
0898: };
0899:
0900: public boolean pcmf_getInReload() {
0901: return (this .pem_reload);
0902: }
0903:
0904: public void pcmf_setContentType(String xType) {
0905: this .pem_contentType = xType;
0906: }
0907:
0908: public final Object pcmf_execView() {
0909: return (this .pem_renderer.pcmf_execView());
0910: };
0911:
0912: public final HashMap pcmf_getContext() {
0913: return (pem_applContext);
0914: };
0915:
0916: public final String pcmf_getUser() {
0917: return (pem_user);
0918: };
0919:
0920: public final String pcmf_setUser(String xUser) {
0921: String l_user = pem_user;
0922: pem_user = xUser;
0923:
0924: return (l_user);
0925: };
0926:
0927: public final String pcmf_getRole() {
0928: return (pem_role);
0929: };
0930:
0931: public final String pcmf_setRole(String xRole) {
0932: String l_role = pem_role;
0933: pem_role = xRole;
0934:
0935: return (l_role);
0936: };
0937:
0938: // @@
0939:
0940: public final void pcmf_setIcon(String xName) {
0941: throw (new UnsupportedOperationException());
0942: };
0943:
0944: public final void pcmf_setMainMenu(IUnMenu xMainMenu) {
0945: if (this .pem_mainMenu != null)
0946: this .pcmf_removeNode(this .pem_mainMenu
0947: .pcmf_getUnComponent());
0948:
0949: this .pem_mainMenu = xMainMenu;
0950: this .pcmf_addNode(xMainMenu.pcmf_getUnComponent()
0951: .pcmf_getName(), xMainMenu.pcmf_getUnComponent());
0952: };
0953:
0954: public final IUnMenu pcmf_getMainMenu() {
0955: return (this .pem_mainMenu);
0956: };
0957:
0958: public final IUnMenu pcmf_getActiveMenu() {
0959: if (this .pem_activeMenu == null)
0960: return (this .pem_mainMenu);
0961: else
0962: return (this .pem_activeMenu);
0963: };
0964:
0965: public final void pcmf_setInitFct(IKeExecutable xInit) {
0966: this .pem_init = xInit;
0967: return;
0968: };
0969:
0970: public final void pcmf_setComponentFactory(UnComponentFactory xFact) {
0971: this .pem_kit.setPem_fact(xFact);
0972: }
0973:
0974: public final void pcmf_setTemplateKit(MuGenericTemplateKit xKit) {
0975: this .pem_kit = xKit;
0976: }
0977:
0978: public final MuGenericTemplateKit pcmf_getTemplateKit() {
0979: return (this .pem_kit);
0980: }
0981:
0982: public final UnComponentFactory pcmf_getComponentFactory() {
0983: return (this .pem_kit.getPem_fact());
0984: }
0985:
0986: public final void pcmf_setGuiObjPosition(String xName, int xPos,
0987: int yPos, int xWi, int xHi, String xAlign) {
0988: MuGenericComponent l_obj = (MuGenericComponent) this
0989: .pcmf_getSubNode(xName);
0990: if (l_obj == null) {
0991: KeLog
0992: .pcmf_log(
0993: "ug2t",
0994: "gui-object to position not found in this container",
0995: this , KeLog.ERROR);
0996:
0997: return;
0998: }
0999: ;
1000: l_obj.pcmf_setPosition(xPos, yPos, xWi, xHi, xAlign);
1001:
1002: return;
1003: };
1004:
1005: public final void pcmf_setGuiObjPosition(UnComponent xObj,
1006: int xPos, int yPos, int xWi, int xHi, String xAlign) {
1007: MuGenericComponent l_obj = (MuGenericComponent) xObj;
1008: l_obj.pcmf_setPosition(xPos, yPos, xWi, xHi, xAlign);
1009:
1010: return;
1011: };
1012:
1013: public final IHoSession pcmf_getSession() {
1014: return (null);
1015: }
1016:
1017: public final void pcmf_close() {
1018: KeLog.pcmf_log(pcmf_getName(), "session close request", this ,
1019: KeLog.MESSAGE);
1020: if (this .pem_session != null) {
1021: try {
1022: this .pem_session.invalidate();
1023: } catch (Exception e) {
1024: KeLog.pcmf_log("ug2t", "session is already closed",
1025: this , KeLog.MESSAGE);
1026: }
1027: }
1028: }
1029:
1030: public void pcmf_setHttpSession(HttpSession xSession) {
1031: this .pem_session = xSession;
1032: }
1033:
1034: public HttpSession pcmf_getHttpSession() {
1035: return (this .pem_session);
1036: }
1037:
1038: public final KeTreeElement pcmf_addElement(String xName,
1039: KeTreeElement xNode, KeTreeElement xBehind) {
1040: KeTreeElement l_ret = super .pcmf_addElement(xName, xNode,
1041: xBehind);
1042: if (xNode instanceof MuGenericPage)
1043: this .pcmf_setActive(xName);
1044:
1045: return (l_ret);
1046: }
1047:
1048: public final KeTreeElement pcmf_addElement(String xName,
1049: KeTreeElement xNode, int xIdx) {
1050: KeTreeElement l_ret = super .pcmf_addElement(xName, xNode, xIdx);
1051: if (xNode instanceof MuGenericPage)
1052: this .pcmf_setActive(xName);
1053:
1054: return (l_ret);
1055: }
1056:
1057: public final KeTreeElement pcmf_addElement(String xName,
1058: KeTreeElement xNode) {
1059: KeTreeElement l_ret = super .pcmf_addElement(xName, xNode);
1060: if (xNode instanceof MuGenericPage)
1061: this .pcmf_setActive(xName);
1062:
1063: return (l_ret);
1064: }
1065:
1066: public final KeTreeNode pcmf_addNode(String xName,
1067: KeTreeNode xNode, KeTreeElement xBehind) {
1068: KeTreeNode l_ret = super .pcmf_addNode(xName, xNode, xBehind);
1069: if (xNode instanceof MuGenericPage)
1070: this .pcmf_setActive(xName);
1071:
1072: return (l_ret);
1073: }
1074:
1075: public final KeTreeNode pcmf_addNode(String xName,
1076: KeTreeNode xNode, int xIdx) {
1077: KeTreeNode l_ret = super .pcmf_addNode(xName, xNode, xIdx);
1078: if (xNode instanceof MuGenericPage)
1079: this .pcmf_setActive(xName);
1080: return (l_ret);
1081: }
1082:
1083: public final KeTreeNode pcmf_addNode(String xName, KeTreeNode xNode) {
1084: KeTreeNode l_ret = super .pcmf_addNode(xName, xNode);
1085: if (xNode instanceof MuGenericPage)
1086: this .pcmf_setActive(xName);
1087: return (l_ret);
1088: }
1089:
1090: public final IUnImage pcmf_getBgImage() {
1091: return (this .pem_bg);
1092: }
1093:
1094: public final void pcmf_setBgImage(IUnImage xImg) {
1095: this .pem_bg = xImg;
1096: }
1097:
1098: public final void pcmf_setStrict(boolean xStrict) {
1099: this .pem_strict = xStrict;
1100: }
1101:
1102: public final int pcmf_getApplType() {
1103: return (UnComponentFactory.MARKUP);
1104: }
1105:
1106: public final void pcmf_setScroll(boolean xScroll) {
1107: this .pdm_scroll = xScroll;
1108:
1109: if (this .pcm_Desktop != null)
1110: this .pcm_Desktop.pcmf_setScroll(xScroll);
1111:
1112: return;
1113: }
1114:
1115: public final boolean pcmf_getScroll() {
1116: return (this .pdm_scroll);
1117: }
1118:
1119: public final void pcmf_addWidget(String xName, UnComponent xObj) {
1120: this .pcmf_addNode(xName, xObj);
1121: };
1122:
1123: public final UnComponent pcmf_removeWidget(String xName) {
1124: return ((UnComponent) this .pcmf_removeNode(xName));
1125: };
1126:
1127: public final UnComponent pcmf_removeWidget(UnComponent xObj) {
1128: return ((UnComponent) this .pcmf_removeNode(xObj));
1129: };
1130:
1131: public final UnComponent pcmf_getWidget(String xName) {
1132: return ((UnComponent) this .pcmf_getSubNode(xName));
1133: };
1134:
1135: public final boolean pcmf_contains(UnComponent xObj) {
1136: return (this .pcmf_getAllSubs().contains(xObj));
1137: };
1138:
1139: public final void pcmf_setApplWinSize(int xWi, int xHi) {
1140: this .pcm_wi = xWi;
1141: this .pcm_hi = xHi;
1142:
1143: this .pcm_resized = true;
1144: };
1145:
1146: public boolean pcmf_isResized() {
1147: return (this .pcm_resized);
1148: }
1149:
1150: public UnComponent pcmf_getOrgActive() {
1151: return (this .pcm_orgactive);
1152: }
1153:
1154: public void pcmf_setOrgActive(UnComponent xOrgActive) {
1155: this .pcm_orgactive = xOrgActive;
1156: }
1157:
1158: public void pcmf_beginSessionTR() {
1159: // Does nothing at the moment (will become usefull when real web C/S com is
1160: // ready
1161: };
1162:
1163: public void pcmf_commitSessionTR() {
1164: };
1165:
1166: public void pcmf_rollbackSessionTR() {
1167: };
1168:
1169: public String pcmf_getCurrentTemplateKitName() {
1170: return (this .pcmf_getTemplateKit()
1171: .pcmf_getCurrentTemplateKitName());
1172: }
1173:
1174: public boolean pcmf_isUseCache() {
1175: return (this .pem_useCache);
1176: }
1177:
1178: public void pcmf_repaint() {
1179: // Debug
1180: // KeLog.pcmf_log("=====================","======================",this,KeLog.FATAL);
1181: this .pem_useCache = false;
1182: if (this .pem_renderer != null)
1183: this .pem_renderer.pcmf_reqestFullRender();
1184:
1185: super .pcmf_repaint();
1186: }
1187:
1188: public void pcmf_setRenderer(IMuGenericApplicationOutput xRenderer) {
1189: this .pem_renderer = xRenderer;
1190: }
1191:
1192: public IMuGenericApplicationOutput pcmf_setRenderer() {
1193: return (this .pem_renderer);
1194: }
1195:
1196: public IMuGenericApplicationOutput pcmf_getRenderer() {
1197: return (this .pem_renderer);
1198: }
1199:
1200: public boolean pcmf_canHandleIForm() {
1201: return (this .pem_renderer.pcmf_canHandleIForm());
1202: }
1203:
1204: public void pcmf_setReqCtrl(boolean xCtrl) {
1205: this .pem_reqCtrl = xCtrl;
1206: }
1207:
1208: public void pcmf_disableLazyWidgets() {
1209: }
1210:
1211: public void pcmf_setExternalCss(String xCss) {
1212: pem_css = xCss;
1213: }
1214:
1215: public String pcmf_getExternalCss() {
1216: return (pem_css);
1217: }
1218:
1219: // New methods (delegates only) due to interface harmonisation
1220: public void pcmf_addWidget(String xName, IUnComponent xObj) {
1221: this .pcmf_addWidget(xName, (UnComponent) xObj);
1222: }
1223:
1224: public boolean pcmf_contains(IUnComponent xObj) {
1225: return (this .pcmf_contains((UnComponent) xObj));
1226: }
1227:
1228: public IUnComponent pcmf_getWidgetbyName(String xName) {
1229: return ((IUnComponent) this .pcmf_getWidget(xName));
1230: }
1231:
1232: public IUnComponent pcmf_removeWidget(IUnComponent xObj) {
1233: return ((IUnComponent) this
1234: .pcmf_removeWidget((UnComponent) xObj));
1235: }
1236:
1237: public void pcmf_setGuiObjPosition(IUnComponent xObj, int xPos,
1238: int yPos, int xWi, int xHi, String xAlign) {
1239: this .pcmf_setGuiObjPosition((UnComponent) xObj, xPos, yPos,
1240: xWi, xHi, xAlign);
1241: }
1242:
1243: public void pcmf_disable() {
1244: if (this .pdm_mdi) {
1245: Iterator l_it = this .pcmf_getSubIterator();
1246: while (l_it.hasNext())
1247: ((KeTreeElement) l_it.next()).pcmf_disable();
1248: } else {
1249: this .pcm_active.pcmf_disable();
1250: if (this .pem_mainMenu != null)
1251: this .pem_mainMenu.pcmf_disable();
1252: Iterator l_it = this .pcmf_getSubIterator();
1253: while (l_it.hasNext()) {
1254: Object l_obj = l_it.next();
1255: if (l_obj instanceof IUnDialog
1256: && ((IUnDialog) l_obj).pcmf_isDisplay())
1257: ((IUnDialog) l_obj).pcmf_disable();
1258: }
1259: }
1260:
1261: super .pcmf_disableThis();
1262: };
1263:
1264: public void pcmf_enable() {
1265: if (this .pdm_mdi) {
1266: Iterator l_it = this .pcmf_getSubIterator();
1267: while (l_it.hasNext())
1268: ((KeTreeElement) l_it.next()).pcmf_enable();
1269: } else {
1270: this .pcm_active.pcmf_enable();
1271: if (this .pem_mainMenu != null)
1272: this .pem_mainMenu.pcmf_enable();
1273: Iterator l_it = this .pcmf_getSubIterator();
1274: while (l_it.hasNext()) {
1275: Object l_obj = l_it.next();
1276: if (l_obj instanceof IUnDialog
1277: && ((IUnDialog) l_obj).pcmf_isDisplay())
1278: ((IUnDialog) l_obj).pcmf_enable();
1279: }
1280: }
1281:
1282: super .pcmf_enableThis();
1283: };
1284:
1285: public void pcmf_setNavigationErrorHandler(
1286: IUnGuiEventListener xListen) {
1287: this .pem_wrongRequestHandler = xListen;
1288: }
1289:
1290: public IUnGuiEventListener pcmf_getNavigationErrorHandler() {
1291: return (this .pem_wrongRequestHandler);
1292: }
1293:
1294: public int pcmf_getCurrentRequestNumber() {
1295: return (this .pdm_requestNr);
1296: }
1297:
1298: public int pcmf_getRequestedRequestNumber() {
1299: Object l_nr = pem_reqNr.pcmf_getValue();
1300: if (l_nr != null && l_nr.toString().trim().equals("") == false
1301: && l_nr.toString().trim().equals("CLOSE") == false)
1302: return (Integer.parseInt(l_nr.toString()));
1303: else
1304: return (-1);
1305: }
1306:
1307: public void pcmf_setGenerateReshapeEvents(boolean xReshapes) {
1308: this .pem_submitReshapes = xReshapes;
1309: return;
1310: }
1311:
1312: public boolean pcmf_getGenerateReshapeEvents() {
1313: return (this .pem_submitReshapes);
1314: }
1315:
1316: public int pcmf_getWi() {
1317: Object l_value = this .pem_bSize.pcmf_getValue();
1318: if (l_value == null || l_value.equals(""))
1319: l_value = Integer.toString(this .pcm_wi) + "px" + ","
1320: + Integer.toString(this .pcm_hi) + "px";
1321:
1322: l_value = l_value.toString().substring(0,
1323: l_value.toString().indexOf("p"));
1324:
1325: KeLog.pcmf_log("ug2t", "setting apllication width to: "
1326: + l_value.toString(), this , KeLog.DEBUG);
1327:
1328: return (Integer.parseInt(l_value.toString()));
1329: }
1330:
1331: public int pcmf_getHi() {
1332: Object l_value = this .pem_bSize.pcmf_getValue();
1333: if (l_value == null || l_value.equals(""))
1334: l_value = Integer.toString(this .pcm_wi) + "px" + ","
1335: + Integer.toString(this .pcm_hi) + "px";
1336:
1337: l_value = l_value.toString().substring(
1338: l_value.toString().indexOf(",") + 1,
1339: l_value.toString().length() - 2);
1340:
1341: KeLog.pcmf_log("ug2t", "setting application height to: "
1342: + l_value.toString(), this , KeLog.DEBUG);
1343:
1344: return (Integer.parseInt(l_value.toString()));
1345: }
1346:
1347: public void pcmf_show() {
1348: }
1349:
1350: public UnFontDescriptor pcmf_getFont() {
1351: return (this .pdm_font);
1352: }
1353:
1354: public boolean pcmf_isCssSupported() {
1355: return (true);
1356: }
1357:
1358: public void pcmf_startClientPoll(int xPollTime) {
1359: // @@
1360: }
1361:
1362: public void pcmf_stopClientPoll() {
1363: // @@
1364: }
1365:
1366: public boolean pcmf_getClientPoll() {
1367: boolean l_ret = false;
1368:
1369: // @@
1370:
1371: return (l_ret);
1372: }
1373:
1374: public void pcmf_setAppName(String xAppName) {
1375: this .pem_appName = xAppName;
1376: }
1377:
1378: public Object pcmf_persist() throws Throwable {
1379: String l_sid = this .pem_session.getId();
1380:
1381: // @@
1382:
1383: return (this .pem_protocol + "://" + this .pem_hostName + ":"
1384: + this .pem_port + this .pem_cReq.getRequestURI() + "?"
1385: + IUnApplication.APPL_RESUME + "=" + l_sid + ".session");
1386: }
1387:
1388: public void pcmf_refreshSession() {
1389: UnFailoverSessionWrapper l_wrapper = (UnFailoverSessionWrapper) this .pem_session
1390: .getAttribute(this .pem_appName);
1391: this .pem_session.setAttribute(this .pem_appName, l_wrapper);
1392: return;
1393: }
1394:
1395: private IKeExecutable pem_resumeHdl = null;
1396: private IKeExecutable pem_prePersist = null;
1397:
1398: public void pcmf_prePersit() {
1399: // @@
1400:
1401: if (this .pem_prePersist != null) {
1402: this .pem_prePersist.pcmf_execObj(this );
1403: }
1404: }
1405:
1406: public void pcmf_resumed() {
1407: if (this .pem_resumeHdl != null) {
1408: this .pem_resumeHdl.pcmf_execObj(this );
1409: }
1410:
1411: // @@
1412: }
1413:
1414: public void pcmf_addMappingListener(IUnMappingEventListener xListen) {
1415: this .pem_mapper.pcmf_addMappingListener(xListen);
1416: }
1417:
1418: public void pcmf_removeMappingListener(
1419: IUnMappingEventListener xListen) {
1420: this .pem_mapper.pcmf_removeMappingListener(xListen);
1421: }
1422:
1423: public void pcmf_setResumeHandler(IKeExecutable xResHdl) {
1424: this .pem_resumeHdl = xResHdl;
1425: }
1426:
1427: public void pcmf_setPrePersist(IKeExecutable xResHdl) {
1428: this .pem_prePersist = xResHdl;
1429: }
1430:
1431: public void pcmf_record(boolean xRecord) {
1432: KeLog.pcmf_logNotSupported("pcmf_record");
1433: }
1434:
1435: public void pcmf_playback() {
1436: KeLog.pcmf_logNotSupported("pcmf_playback");
1437: }
1438:
1439: public void pcmf_playback(String xSession) {
1440: KeLog.pcmf_logNotSupported("pcmf_playback");
1441: }
1442:
1443: public void pcmf_setInPlayBack(boolean xIn) {
1444: KeLog.pcmf_logNotSupported("pcmf_setInPlayBack");
1445: }
1446:
1447: public void pcmf_clearSubmitValues() {
1448: KeLog.pcmf_logNotSupported("pcmf_clearSubmitValues");
1449: };
1450:
1451: public void pcmf_toLastCheckPoint() {
1452: KeLog.pcmf_logNotSupported("pcmf_toLastCheckPoint");
1453: }
1454: }
|