Package de.iritgo.aktera.servers

Examples of de.iritgo.aktera.servers.ComparableContext


  }

  private UserEnvironment getUserEnvironment(HttpServletRequest request) throws ContextException
  {
    String sessionId = request.getSession(true).getId();
    ComparableContext context = KeelAbstractServer.getContexts().get(sessionId);
    UserEnvironment userEnvironment = null;

    if (context != null)
    {
      try
      {
        userEnvironment = (UserEnvironment) context.get(UserEnvironment.CONTEXT_KEY);
      }
      catch (ContextException ignored)
      {
      }
    }
View Full Code Here


      Output outContext = response.createOutput("context-" + (contextNum++));

      outContexts.add(outContext);
      outContext.setContent(contextEntry.getKey());

      ComparableContext context = contextEntry.getValue();
      int entryNum = 0;

      while (context != null)
      {
        for (Map.Entry<Object, Object> dataEntry : context.getData().entrySet())
        {
          Output outEntry = response.createOutput("entry-" + (entryNum++));

          outContext.add(outEntry);
          outEntry.setContent(dataEntry.getKey() + ":" + dataEntry.getValue());

          if (dataEntry.getValue() instanceof DefaultUserEnvironment)
          {
            int attrNum = 0;

            for (Map.Entry<String, Object> attrEntry : ((DefaultUserEnvironment) dataEntry.getValue())
                    .getAttributes().entrySet())
            {
              Output outAttr = response.createOutput("attr-" + (attrNum++));

              outEntry.add(outAttr);
              outAttr.setContent(attrEntry.getKey() + "=" + attrEntry.getValue());
            }
          }
        }

        context = context.getParentContext();
      }
    }
  }
View Full Code Here

TOP

Related Classes of de.iritgo.aktera.servers.ComparableContext

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.