Package net.sourceforge.stripes.action

Examples of net.sourceforge.stripes.action.RedirectResolution


      final String sNickName = oBab.getSessionAttribute("nickname");
      final String sPassword = oBab.getSessionAttribute("password");
      final String sTaxPayer = oBab.getSessionAttribute("taxpayer_docid");
      AtrilSession oSes = null;
      if (sNickName==null || sPassword==null || sTaxPayer==null) {
        oRes = new RedirectResolution("/enter.jsp?e=expiredsession");
        ((RedirectResolution) oRes).addParameter("lastUrl" , oBab.getLastUrl());       
      } else {
        if (!oCredentials.contains(sNickName+sPassword)) {
          try {
            oSes = DAO.getSession("LoginInterceptor", sNickName, sPassword);
            try {
              User oUsr = new User(oSes, User.forUuid(sNickName));
              if (!oUsr.isActive()) {
                oRes = resolve(oCls, "deactivated", oBab.getLastUrl());
              } else {
                if (CHKTXP.contains(oCls) && !oActive.contains(sTaxPayer)) {
                  TaxPayer oTxp = new TaxPayer(oSes.getDms(), sTaxPayer);
                  if (oTxp.getRequiresActivation()) {
                    oRes = new RedirectResolution(ActivateTaxPayer.class);
                  } else {
                    oActive.add(sTaxPayer);
                  }
                }
                oCredentials.add(sNickName+sPassword);
              }
            } catch (ElementNotFoundException enfe) {
              Log.out.error("ElementNotFoundException "+enfe.getMessage(), enfe);
              oRes = resolve(oCls, "userdatanotfound", oBab.getLastUrl());
            }
          } catch (Exception xcpt) {
            Log.out.error(xcpt.getClass().getName()+" "+xcpt.getMessage(), xcpt);
            oRes = resolve(oCls, "systemsecurity", oBab.getLastUrl());
          } finally {
            if (null!=oSes) {
              if (oSes.isConnected()) oSes.disconnect();
              if (oSes.isOpen()) oSes.close();
            } // fi
          }         
        } else if (oBab.getSessionAttribute("businessname").length()==32) {
          if (CHKTXP.contains(oCls)) {
            oSes = DAO.getSession("LoginInterceptor", sNickName, sPassword);
            TaxPayer oTxp = new TaxPayer(oSes.getDms(), sTaxPayer);
            oBab.setSessionAttribute("businessname", oTxp.getBusinessName());
            if (oTxp.getRequiresActivation()) {
              oRes = new RedirectResolution(ActivateTaxPayer.class);
            } else if (!oActive.contains(sTaxPayer)) {
              oActive.add(sTaxPayer);
            }
            oSes.disconnect();
            oSes.close();           
View Full Code Here


     
    } else {
      Log.out.debug("InvoiceUpload no items found");
    }
    if (invc==null)
      return new RedirectResolution("/error.jsp");
    if (invc.getServiceFlavor().equals(CaptureServiceFlavor.BASIC))
      return new ForwardResolution("EditInvoice.action?id="+invc.id());
    else
      return new ForwardResolution(FORM);
  }
View Full Code Here

   
    disconnect();

    Log.out.debug("PROFILING: Disconnection time "+String.valueOf((lEnd=new Date().getTime())-lStart)+" ms");
   
    return new RedirectResolution(SignUpConfirmation.class);
   
    } catch (Exception e) {
    getContext().getMessages().add(new SimpleMessage("ERROR "+e.getMessage(), user));     
    return new RedirectResolution(SignUpForm.class);
    } finally { close(); }
  }
View Full Code Here

          oVol.save();
        }
      }
      disconnect();
      setSessionAttribute("businessname", getTaxPayer().getBusinessName());
      oRes = new RedirectResolution(CaptureInvoice.class);
    } catch (Exception e) {
      close();
      Log.out.error("ActivateTaxPayer.save() "+e.getClass().getName()+" "+e.getMessage(), e);
      getContext().getMessages().add(new SimpleError(e.getClass().getName()+" "+e.getMessage()));
      oRes = new RedirectResolution(ActivateTaxPayer.class);
    }
    Log.out.debug("End ActivateTaxPayer.save()");
    return oRes;
  }
View Full Code Here

        getTaxPayer().load(getSession(), getSessionAttribute("taxpayer_docid"));
        getTaxPayer().setBusinessName("");
        disconnect();
        } catch (Exception xcpt) {
        Log.out.error(xcpt.getMessage(), xcpt);
        return new RedirectResolution("/error.jsp?e=couldnotloadtaxpayer");
        } finally {
        close();
        }     
    Log.out.debug("End ActivateTaxPayer.form()");
    return new ForwardResolution(FORM);
View Full Code Here

        for (Bug bug : bugs) {
            Bug newBug = populateBug(bug);
            bm.saveOrUpdate(newBug);
        }

        return new RedirectResolution("/bugzooky/BugList.jsp");
    }
View Full Code Here

        BugManager bm = new BugManager();
        for (int id : this.bugIds) {
            this.bugs.add( bm.getBug(id) );
        }

        return new RedirectResolution("/bugzooky/BulkAddEditBugs.jsp").flash(this);
    }
View Full Code Here

            return getContext().getSourcePageResolution();
        }
        else {
            getContext().setUser(person);
            if (this.targetUrl != null) {
                return new RedirectResolution(this.targetUrl);
            }
            else {
                return new RedirectResolution("/bugzooky/BugList.jsp");
            }
        }
    }
View Full Code Here

            for (int id : deleteIds) {
                cm.deleteComponent(id);
            }
        }

        return new RedirectResolution("/bugzooky/AdministerBugzooky.jsp");
    }
View Full Code Here

* @author Tim Fennell
*/
public class LogoutActionBean extends BugzookyActionBean {
    public Resolution logout() throws Exception {
        getContext().logout();
        return new RedirectResolution("/bugzooky/Exit.jsp");
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.stripes.action.RedirectResolution

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.