Package com.alexnevsky.hotel.commands

Examples of com.alexnevsky.hotel.commands.ICommand


   */
  private void processRequest(HttpServletRequest request, HttpServletResponse response) {
    String page = null;

    try {
      ICommand command = RequestHelper.getInstance().getCommand(request);
      page = command.execute(request, response);
    } finally {
      logger.info("User '" + request.getSession().getAttribute(AttributesManager.PARAM_NAME_LOGIN) + "'. "
          + "Dispatching to view: " + page + ". RemoteAddr: " + request.getRemoteAddr());

      RequestDispatcher dispatcher = this.getServletContext().getRequestDispatcher(page);
View Full Code Here


    String action = request.getParameter(AttributesManager.PARAM_NAME_COMMAND);

    logger.info("User '" + request.getSession().getAttribute(AttributesManager.PARAM_NAME_LOGIN) + "'. "
        + "Request command action: '" + action + "'" + ". RemoteAddr: " + request.getRemoteAddr());

    ICommand command = this.processRequest(request, action);

    if (command == null) {
      command = new NoCommand();
    }
View Full Code Here

   * @param action
   *            User's action.
   * @return Corresponding for this purposes ICommand implementor.
   */
  private ICommand processRequest(HttpServletRequest request, String action) {
    ICommand command = null;

    command = this.commandCatalog.get(action);

    if (this.isAuthUser(request)) {
      if (this.isAdminCommand(command)) {
View Full Code Here

TOP

Related Classes of com.alexnevsky.hotel.commands.ICommand

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.