Examples of DalConnectionProvider


Examples of org.openbravo.service.db.DalConnectionProvider

  private boolean isLoggedIn(HttpServletRequest request, HttpServletResponse response) {
    final String login = request.getParameter(LOGIN_PARAM);
    final String password = request.getParameter(PASSWORD_PARAM);
    String userId = null;
    if (login != null && password != null) {
      userId = LoginUtils.getValidUserId(new DalConnectionProvider(), login, password);
    } else { // use basic authentication
      userId = doBasicAuthentication(request);
    }
    if (userId != null) {
      OBContext.setOBContext(UserContextCache.getInstance().getCreateOBContext(userId));
View Full Code Here

Examples of org.openbravo.service.db.DalConnectionProvider

      if (index == -1) {
        return null;
      }
      final String login = decodedUserPass.substring(0, index);
      final String password = decodedUserPass.substring(index + 1);
      return LoginUtils.getValidUserId(new DalConnectionProvider(), login, password);
    } catch (final Exception e) {
      throw new OBException(e);
    }
  }
View Full Code Here

Examples of org.openbravo.service.db.DalConnectionProvider

   * Tests calling database procedures using the dal connection provider
   */
  public void testDalConnectionProvider() throws Exception {
    setUserContext("0");

    final DalConnectionProvider connectionProvider = new DalConnectionProvider();
    // get the current date, this already uses the connectionprovider
    final String currentDateStr = DateTimeData.today(connectionProvider);

    // now compute a tax for a certain business partner using the date string
    // by passing the date str the check is done that the dbSessionConfig has been
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.