public void doFilter(USSDRequest request, USSDSession <Object> session, USSDResponse response, USSDFilteringChain chain) { String cWName; Window currentWindow; cWName = session.getCurrentWindow(); if (String.IsNullOrEmpty(cWName)) { session.setCurrentWindow(request.getApplication().getStartupWindowId()); cWName = request.getApplication().getStartupWindowId(); } currentWindow = request.getApplication().getWindow(cWName); List <USSDFilter> windowFilters = request.getApplication().getWindowFilters(session.getCurrentWindow()); if (windowFilters.Count > 0) { foreach (USSDFilter filter in windowFilters) { chain.appendFilter(filter); } BaseUSSDFilter ussdFilter = new BaseUSSDFilter(); ussdFilter.proceedProcessing = new BaseUSSDFilter.ProceedProcessing(proceedProcessing); chain.appendFilter(ussdFilter); chain.proceed(request, session, response); session.saveSession(); } }
public void redirectTo(String windowName, USSDSession <Object> session, USSDResponse response) { session.setPreviousWindow(session.getCurrentWindow()); session.setCurrentWindow(windowName); session.saveSession(); }