Package org.openmeetings.app.persistence.beans.basic

Examples of org.openmeetings.app.persistence.beans.basic.SOAPLogin


      String clientURL = Red5.getConnectionLocal().getRemoteAddress();

      log.debug("swfURL " + clientURL);

      SOAPLogin soapLogin = SOAPLoginDaoImpl.getInstance()
          .getSOAPLoginByHash(secureHash);

      if (soapLogin.getUsed()) {

        if (soapLogin.getAllowSameURLMultipleTimes()) {

          if (!soapLogin.getClientURL().equals(clientURL)) {
            log.debug("does not equal " + clientURL);
            return -42L;
          }

        } else {
          log.debug("Already used " + secureHash);
          return -42L;
        }
      }

      Long loginReturn = this.loginUserByRemote(soapLogin
          .getSessionHash());

      IConnection current = Red5.getConnectionLocal();
      String streamId = current.getClient().getId();
      RoomClient currentClient = this.clientListManager
          .getClientByStreamId(streamId);

      if (currentClient.getUser_id() != null) {
        Sessionmanagement.getInstance().updateUser(SID,
            currentClient.getUser_id());
      }

      currentClient.setAllowRecording(soapLogin.getAllowRecording());
      this.clientListManager.updateClientByStreamId(streamId,
          currentClient);

      if (loginReturn == null) {

        log.debug("loginReturn IS NULL for SID: "
            + soapLogin.getSessionHash());

        return -1L;
      } else if (loginReturn < 0) {

        log.debug("loginReturn IS < 0 for SID: "
            + soapLogin.getSessionHash());

        return loginReturn;
      } else {

        soapLogin.setUsed(true);
        soapLogin.setUseDate(new Date());

        soapLogin.setClientURL(clientURL);

        SOAPLoginDaoImpl.getInstance().updateSOAPLogin(soapLogin);

        // Create Return Object and hide the validated
        // sessionHash that is stored server side
        // this hash should be never thrown back to the user

        SOAPLogin returnSoapLogin = new SOAPLogin();

        returnSoapLogin.setRoom_id(soapLogin.getRoom_id());
        returnSoapLogin.setBecomemoderator(soapLogin
            .getBecomemoderator());
        returnSoapLogin.setShowAudioVideoTest(soapLogin
            .getShowAudioVideoTest());
        returnSoapLogin.setRoomRecordingId(soapLogin
            .getRoomRecordingId());
        returnSoapLogin.setShowNickNameDialog(soapLogin
            .getShowNickNameDialog());
        returnSoapLogin.setLandingZone(soapLogin.getLandingZone());

        return returnSoapLogin;

      }
View Full Code Here


      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();

      SOAPLogin soapLogin = new SOAPLogin();
      soapLogin.setCreated(new Date());
      soapLogin.setUsed(false);
      soapLogin.setRoom_id(room_id);
      soapLogin.setAllowSameURLMultipleTimes(allowSameURLMultipleTimes);
      soapLogin.setHash(hash);
      soapLogin.setRoomRecordingId(recording_id);
      soapLogin.setSessionHash(sessionHash);
      soapLogin.setBecomemoderator(becomemoderator);
      soapLogin.setShowAudioVideoTest(showAudioVideoTest);
      soapLogin.setShowNickNameDialog(showNickNameDialog);
      soapLogin.setLandingZone(landingZone);
      soapLogin.setAllowRecording(allowRecording);

      soapLogin = session.merge(soapLogin);
      Long soapLoginId = soapLogin.getSoapLoginId();

      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
     
      if (soapLoginId > 0) {
View Full Code Here

      String clientURL = Red5.getConnectionLocal().getRemoteAddress();

      log.debug("swfURL " + clientURL);

      SOAPLogin soapLogin = soapLoginDao.getSOAPLoginByHash(secureHash);

      if (soapLogin.getUsed()) {

        if (soapLogin.getAllowSameURLMultipleTimes()) {

          if (!soapLogin.getClientURL().equals(clientURL)) {
            log.debug("does not equal " + clientURL);
            return -42L;
          }

        } else {
          log.debug("Already used " + secureHash);
          return -42L;
        }
      }

      Long loginReturn = this.loginUserByRemote(soapLogin
          .getSessionHash());

      IConnection current = Red5.getConnectionLocal();
      String streamId = current.getClient().getId();
      RoomClient currentClient = this.clientListManager
          .getClientByStreamId(streamId);

      if (currentClient.getUser_id() != null) {
        sessionManagement.updateUser(SID, currentClient.getUser_id());
      }

      currentClient.setAllowRecording(soapLogin.getAllowRecording());
      this.clientListManager.updateClientByStreamId(streamId,
          currentClient);

      if (loginReturn == null) {

        log.debug("loginReturn IS NULL for SID: "
            + soapLogin.getSessionHash());

        return -1L;
      } else if (loginReturn < 0) {

        log.debug("loginReturn IS < 0 for SID: "
            + soapLogin.getSessionHash());

        return loginReturn;
      } else {

        soapLogin.setUsed(true);
        soapLogin.setUseDate(new Date());

        soapLogin.setClientURL(clientURL);

        soapLoginDao.updateSOAPLogin(soapLogin);

        // Create Return Object and hide the validated
        // sessionHash that is stored server side
        // this hash should be never thrown back to the user

        SOAPLogin returnSoapLogin = new SOAPLogin();

        returnSoapLogin.setRoom_id(soapLogin.getRoom_id());
        returnSoapLogin.setBecomemoderator(soapLogin
            .getBecomemoderator());
        returnSoapLogin.setShowAudioVideoTest(soapLogin
            .getShowAudioVideoTest());
        returnSoapLogin.setRoomRecordingId(soapLogin
            .getRoomRecordingId());
        returnSoapLogin.setShowNickNameDialog(soapLogin
            .getShowNickNameDialog());
        returnSoapLogin.setLandingZone(soapLogin.getLandingZone());

        return returnSoapLogin;

      }
View Full Code Here

      String thistime = "TIME_" + (new Date().getTime());

      String hash = manageCryptStyle.getInstanceOfCrypt()
          .createPassPhrase(thistime);

      SOAPLogin soapLogin = new SOAPLogin();
      soapLogin.setCreated(new Date());
      soapLogin.setUsed(false);
      soapLogin.setRoom_id(room_id);
      soapLogin.setAllowSameURLMultipleTimes(allowSameURLMultipleTimes);
      soapLogin.setHash(hash);
      soapLogin.setRoomRecordingId(recording_id);
      soapLogin.setSessionHash(sessionHash);
      soapLogin.setBecomemoderator(becomemoderator);
      soapLogin.setShowAudioVideoTest(showAudioVideoTest);
      soapLogin.setShowNickNameDialog(showNickNameDialog);
      soapLogin.setLandingZone(landingZone);
      soapLogin.setAllowRecording(allowRecording);

      soapLogin = em.merge(soapLogin);
      Long soapLoginId = soapLogin.getSoapLoginId();

      if (soapLoginId > 0) {
        return hash;
      } else {
        throw new Exception("Could not store SOAPLogin");
View Full Code Here

TOP

Related Classes of org.openmeetings.app.persistence.beans.basic.SOAPLogin

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.