Package org.apache.openmeetings.db.entity.server

Examples of org.apache.openmeetings.db.entity.server.Sessiondata


    //FIXME code is duplicated from MainService, need to be unified
    SOAPLoginDao soapDao = getBean(SOAPLoginDao.class);
    SOAPLogin soapLogin = soapDao.get(secureHash);
    if (soapLogin != null && !soapLogin.getUsed()) { //add code for  || (soapLogin.getAllowSameURLMultipleTimes())
      SessiondataDao sessionDao = getBean(SessiondataDao.class);
      Sessiondata sd = sessionDao.getSessionByHash(soapLogin.getSessionHash());
      if (sd != null && sd.getSessionXml() != null) {
        RemoteSessionObject remoteUser = RemoteSessionObject.fromXml(sd.getSessionXml());
        if (remoteUser != null && !Strings.isEmpty(remoteUser.getExternalUserId())) {
          AdminUserDao userDao = getBean(AdminUserDao.class);
          User user = userDao.getExternalUser(remoteUser.getExternalUserId(), remoteUser.getExternalUserType());
          if (user == null) {
            user = userDao.getNewUserInstance(null);
View Full Code Here


      bind();
    }
  }
 
  public boolean signIn(String login, String password, String ldapConfigFileName) {
    Sessiondata sessData = getBean(SessiondataDao.class).startsession();
    SID = sessData.getSession_id();
    Object u = Strings.isEmpty(ldapConfigFileName)
        ? getBean(IUserManager.class).loginUser(SID, login, password, null, null, false)
        : getBean(ILdapLoginManagement.class).doLdapLogin(login, password, null, null, SID, ldapConfigFileName);
   
    if (u instanceof User) {
View Full Code Here

  private UserManager userManager;
 
  @Test
  public void testSendInvitationLink() {
    try {
      Sessiondata sessionData = mService.getsessiondata();
     
      User us = (User) userManager.loginUser(sessionData.getSession_id(), username, userpass, null, null, false);
     
      invitationService.sendInvitationHash(sessionData.getSession_id(), username, "message", "baseurl", "sebawagner@apache.org",
          "subject", 1L, "", false, "", 1, new Date(), "12:00", new Date(), "14:00", 1L, us.getTimeZoneId(), true);
     
    } catch (Exception err) {
      log.error("[testSendInvitationLink]", err);
    }
View Full Code Here

  public Long loginUserByRemote(String SID) {
    try {
      Long users_id = sessiondataDao.checkSession(SID);
      Long user_level = userManager.getUserLevelByID(users_id);
      if (AuthLevelUtil.checkWebServiceLevel(user_level)) {
        Sessiondata sd = sessiondataDao.getSessionByHash(SID);
        if (sd == null || sd.getSessionXml() == null) {
          return new Long(-37);
        } else {
          RemoteSessionObject userObject = RemoteSessionObject.fromXml(sd.getSessionXml());

          log.debug(userObject.toString());

          IConnection current = Red5.getConnectionLocal();
          String streamId = current.getClient().getId();
View Full Code Here

  }

  public User loginUserByRemoteHash(String SID, String remoteHash) {
    try {

      Sessiondata sessionData = sessiondataDao
          .getSessionByHash(remoteHash);

      if (sessionData != null) {

        User u = getUserById(sessionData.getUser_id());

        sessiondataDao.updateUserWithoutSession(SID, u.getUser_id());

        return u;
      }
View Full Code Here

    //FIXME code is duplicated from MainService, need to be unified
    SOAPLoginDao soapDao = getBean(SOAPLoginDao.class);
    SOAPLogin soapLogin = soapDao.get(secureHash);
    if (soapLogin != null && !soapLogin.getUsed()) { //add code for  || (soapLogin.getAllowSameURLMultipleTimes())
      SessiondataDao sessionDao = getBean(SessiondataDao.class);
      Sessiondata sd = sessionDao.getSessionByHash(soapLogin.getSessionHash());
      if (sd != null && sd.getSessionXml() != null) {
        RemoteSessionObject remoteUser = RemoteSessionObject.fromXml(sd.getSessionXml());
        if (remoteUser != null && !Strings.isEmpty(remoteUser.getExternalUserId())) {
          UserDao userDao = getBean(UserDao.class);
          User user = userDao.getExternalUser(remoteUser.getExternalUserId(), remoteUser.getExternalUserType());
          if (user == null) {
            user = userDao.getNewUserInstance(null);
View Full Code Here

      bind();
    }
  }
 
  public boolean signIn(String login, String password, Type type, Long domainId) {
    Sessiondata sessData = getBean(SessiondataDao.class).startsession();
    SID = sessData.getSession_id();
    try {
      User u = null;
      switch (type) {
        case ldap:
          u = getBean(LdapLoginManagement.class).login(login, password, domainId);
View Full Code Here

 
  public String getValidatedSid() {
    SessiondataDao sessionDao = getBean(SessiondataDao.class);
    Long _userId = sessionDao.checkSession(SID);
    if (_userId == null || userId != _userId) {
      Sessiondata sessionData = sessionDao.getSessionByHash(SID);
      if (sessionData == null) {
        sessionData = sessionDao.startsession();
      }
      if (!sessionDao.updateUser(sessionData.getSession_id(), userId, false, languageId)) {
        //something bad, force user to re-login
        invalidate();
      } else {
        SID = sessionData.getSession_id();
      }
    }
    return SID;
  }
View Full Code Here

  @Autowired
  private UserDao userDao;
 
  @Test
  public void testSendInvitationLink() throws AxisFault {
    Sessiondata sessionData = mService.getsessiondata();
   
    Long uid = userWebService.loginUser(sessionData.getSession_id(), username, userpass);
    User us = userDao.get(uid);
   
    String date = new SimpleDateFormat("dd.MM.yyyy").format(new Date());
    invitationService.sendInvitationHash(sessionData.getSession_id(), "Testname", "Testlastname", "message", "sebawagner@apache.org",
        "subject", 1L, "", false, "", 1, date, "12:00", date, "14:00", 1L, us.getTimeZoneId(), true);
  }
View Full Code Here

   */
  public Long loginUserByRemote(String SID) {
    try {
      Long users_id = sessiondataDao.checkSession(SID);
      if (AuthLevelUtil.hasWebServiceLevel(userDao.getRights(users_id))) {
        Sessiondata sd = sessiondataDao.getSessionByHash(SID);
        if (sd == null || sd.getSessionXml() == null) {
          return new Long(-37);
        } else {
          RemoteSessionObject userObject = RemoteSessionObject.fromXml(sd.getSessionXml());

          log.debug(userObject.toString());

          IConnection current = Red5.getConnectionLocal();
          String streamId = current.getClient().getId();
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.db.entity.server.Sessiondata

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.