Examples of SessionParams


Examples of org.oasis.wsrp.v2.SessionParams

   }


   private void checkForSessionIDs(RuntimeContext runtimeContext) throws OperationFailed
   {
      SessionParams sessionParams = runtimeContext.getSessionParams();
      if (sessionParams != null && sessionParams.getSessionID() != null)
      {
         Utils.throwOperationFaultOnSessionOperation();
      }
   }
View Full Code Here

Examples of org.oasis.wsrp.v2.SessionParams

   // fix-me!

   public org.oasis.wsrp.v2.UserContext getUserContextFrom(WSRPPortletInfo info, PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
   {
      // first decide if we need to pass the user context...
      SessionParams sessionParams = runtimeContext.getSessionParams();
      if (info != null && info.isUserContextStoredInSession() && sessionParams != null && sessionParams.getSessionID() != null)
      {
         return null; // the user context is most likely in the session already
      }

      // todo: deal with user categories and user context key properly
View Full Code Here

Examples of org.oasis.wsrp.v2.SessionParams

   }

   public void setTemplatesIfNeeded(WSRPPortletInfo info, PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
   {
      // todo: could store templates in producer session info to avoid to re-generate them all the time?
      SessionParams sessionParams = runtimeContext.getSessionParams();
      if (info != null && info.isDoesUrlTemplateProcessing()
         && (!info.isTemplatesStoredInSession() || sessionParams == null || sessionParams.getSessionID() == null))
      {
         // we need to supply the templates since the portlet does URL processing and either doesn't store
         // templates in the session or no session has been established yet
         runtimeContext.setTemplates(WSRPTypeFactory.createTemplates(invocation.getContext()));
      }
View Full Code Here

Examples of org.oasis.wsrp.v2.SessionParams

   {
      ProducerSessionInformation producerSessionInfo = getProducerSessionInformation(invocation, false);
      if (producerSessionInfo != null)
      {
         String sessionId = producerSessionInfo.getSessionIdForPortlet(portletHandle);
         SessionParams sessionParams = runtimeContext.getSessionParams();
         if (sessionParams == null)
         {
            sessionParams = WSRPTypeFactory.createSessionParams(sessionId);
            runtimeContext.setSessionParams(sessionParams);
         }
         else
         {
            sessionParams.setSessionID(sessionId);
         }
      }
   }
View Full Code Here

Examples of org.oasis.wsrp.v2.SessionParams

   {
      ProducerSessionInformation producerSessionInfo = getProducerSessionInformation(invocation, false);
      if (producerSessionInfo != null)
      {
         String sessionId = producerSessionInfo.getSessionIdForPortlet(portletHandle);
         SessionParams sessionParams = runtimeContext.getSessionParams();
         if (sessionParams == null)
         {
            sessionParams = WSRPTypeFactory.createSessionParams(sessionId);
            runtimeContext.setSessionParams(sessionParams);
         }
         else
         {
            sessionParams.setSessionID(sessionId);
         }
      }
   }
View Full Code Here

Examples of org.oasis.wsrp.v2.SessionParams

      if (runtimeContext != null)
      {
         V1RuntimeContext v1RuntimeContext = WSRP1TypeFactory.createRuntimeContext(runtimeContext.getUserAuthentication(), runtimeContext.getPortletInstanceKey(), runtimeContext.getNamespacePrefix());
         v1RuntimeContext.setNamespacePrefix(runtimeContext.getNamespacePrefix());
         v1RuntimeContext.setPortletInstanceKey(runtimeContext.getPortletInstanceKey());
         SessionParams sessionParams = runtimeContext.getSessionParams();
         if (sessionParams != null)
         {
            v1RuntimeContext.setSessionID(sessionParams.getSessionID());
         }
         v1RuntimeContext.setTemplates(V2ToV1Converter.toV1Templates(runtimeContext.getTemplates()));

         List<Extension> extensions = runtimeContext.getExtensions();
         if (extensions != null)
View Full Code Here

Examples of org.oasis.wsrp.v2.SessionParams

            namespacePrefix = v1RuntimeContext.getNamespacePrefix();
         }
        
         RuntimeContext runtimeContext = WSRPTypeFactory.createRuntimeContext(v1RuntimeContext.getUserAuthentication(), portletInstanceKey, namespacePrefix);

         SessionParams sessionParams = WSRPTypeFactory.createSessionParams(v1RuntimeContext.getSessionID());

         runtimeContext.setSessionParams(sessionParams);
         runtimeContext.setTemplates(toV2Templates(v1RuntimeContext.getTemplates()));

         List<V1Extension> extensions = v1RuntimeContext.getExtensions();
View Full Code Here

Examples of org.oasis.wsrp.v2.SessionParams

      return new ReturnAny();
   }

   public static SessionParams createSessionParams(String sessionID)
   {
      SessionParams sessionParams = new SessionParams();
      sessionParams.setSessionID(sessionID);

      return sessionParams;
   }
View Full Code Here

Examples of org.oasis.wsrp.v2.SessionParams

   }

   public org.oasis.wsrp.v2.UserContext getUserContextFrom(WSRPPortletInfo info, PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
   {
      // first decide if we need to pass the user context...
      SessionParams sessionParams = runtimeContext.getSessionParams();
      if (info != null && info.isUserContextStoredInSession() && sessionParams != null && sessionParams.getSessionID() != null)
      {
         // todo: check that this is correct: we might have a session and yet no user context stored in it yet
         return null; // the user context is most likely in the session already
      }
View Full Code Here

Examples of org.oasis.wsrp.v2.SessionParams

   }

   public void setTemplatesIfNeeded(WSRPPortletInfo info, PortletInvocation invocation, RuntimeContext runtimeContext) throws PortletInvokerException
   {
      // todo: could store templates in producer session info to avoid to re-generate them all the time?
      SessionParams sessionParams = runtimeContext.getSessionParams();
      if (info != null && info.isDoesUrlTemplateProcessing()
         && (!info.isTemplatesStoredInSession() || sessionParams == null || sessionParams.getSessionID() == null))
      {
         // we need to supply the templates since the portlet does URL processing and either doesn't store
         // templates in the session or no session has been established yet
         runtimeContext.setTemplates(WSRPTypeFactory.createTemplates(invocation.getContext()));
      }
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.