Package de.iritgo.aktario.framework.user

Examples of de.iritgo.aktario.framework.user.User


    {
    }

    if ((event != null) && (event.isLoggedOut()))
    {
      User user = event.getUser();

      // Remove unused journal entry caches
      LinkedList<DynDataObject> removeList = new LinkedList<DynDataObject>();
      for (Iterator i = Engine.instance().getBaseRegistry().iterator("aktera.journal.list.notvisible"); i
              .hasNext();)
      {
        DynDataObject akteraQuery = (DynDataObject) i.next();
        if (Long.valueOf(akteraQuery.getStringAttribute("userUniqueId")) == user.getUniqueId())
        {
          removeList.add(akteraQuery);
        }
      }
      for (DynDataObject akteraQuery : removeList)
View Full Code Here


      {
        int count = 0;
        LinkedList<DynDataObject> removeList = new LinkedList<DynDataObject>();
        for (Iterator j = Server.instance().getUserRegistry().userIterator(); j.hasNext();)
        {
          User user = (User) j.next();
          long userId = user.getUniqueId();
          for (Iterator i = Engine.instance().getBaseRegistry().iterator("aktera.journal.list.notvisible"); i
                  .hasNext();)
          {
            DynDataObject akteraQuery = (DynDataObject) i.next();
            if (Long.valueOf(akteraQuery.getStringAttribute("userUniqueId")) == userId)
View Full Code Here

   */
  public void userEvent(UserEvent event)
  {
    if ((event != null) && (event.isLoggedIn()))
    {
      User user = event.getUser();

      ModelRequest req = null;

      try
      {
        req = ModelTools.createModelRequest();

        AuthenticationManager authMgr = (AuthenticationManager) req.getService(AuthenticationManager.ROLE,
                "default");

        authMgr.setUsername(user.getName());
        authMgr.setPassword(event.getPlainPassword());
        authMgr.setDomain("default");

        UserEnvironment userEnvironment = new DefaultUserEnvironment();
        Context context = new DefaultContext();

        ((DefaultContext) context).put(UserEnvironment.CONTEXT_KEY, userEnvironment);
        authMgr.login(userEnvironment);
        keelIritgoAuthMap.put(new Long(user.getUniqueId()), context);
      }
      catch (Exception x)
      {
        x.printStackTrace();
      }
      finally
      {
        ModelTools.releaseModelRequest(req);
      }
    }

    if ((event != null) && (event.isLoggedOut()))
    {
      User user = event.getUser();

      ModelRequest req = null;

      try
      {
        req = ModelTools.createModelRequest();

        AuthenticationManager authMgr = (AuthenticationManager) req.getService(AuthenticationManager.ROLE, "*");

        authMgr.setUsername(user.getName());
        authMgr.setPassword("");
        authMgr.setDomain("default");

        Context c = (Context) keelIritgoAuthMap.get(new Long(user.getUniqueId()));
        UserEnvironment userEnv = (UserEnvironment) c.get(UserEnvironment.CONTEXT_KEY);

        authMgr.logout(userEnv);
        keelIritgoAuthMap.remove(user.getUniqueId());
      }
      catch (Exception x)
      {
      }
      finally
View Full Code Here

    }
    catch (InterruptedException x)
    {
    }

    User user = AppContext.instance().getUser();

    if (user.isOnline())
    {
      manualDisconnect = false;

      getDesktopManager().closeAllDisplays();

      desktopFrame.setVisible(false);

      if (tray != null)
      {
        tray.remove(trayIcon);
      }

      String password = AppContext.instance().getUserPassword();

      UserLoginHelper.login(null, AppContext.instance().getServerIP(), user.getName(), password, false, false);
    }
  }
View Full Code Here

    addAttribute("model", "none");
    addAttribute("listName", "none");
    addAttribute("listSearchCategory", "");
    addAttribute("listSearchValues", "");

    User user = AppContext.instance().getUser();

    if (user != null)
    {
      setUserUniqueId(user.getUniqueId());
    }
  }
View Full Code Here

    for (Iterator i = queryRegistry.queryIterator("aktera.journal.list.notvisible"); i.hasNext();)
    {
      AkteraQuery query = (AkteraQuery) i.next();
      long userUniqueId = query.getUserUniqueId();
      UserRegistry userRegistry = Server.instance().getUserRegistry();
      User iritgoUser = userRegistry.getUser(userUniqueId);

      if (akteraUserName.equals(iritgoUser.getName()))
      {
        Properties props = new Properties();

        props.put("akteraQuery", query.getUniqueId());

        ActionTools.sendToClient(iritgoUser.getName(), new CommandAction("aktario-journal.RefreshJournalPane",
                props));
      }
    }
  }
View Full Code Here

TOP

Related Classes of de.iritgo.aktario.framework.user.User

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.