Package org.oasis.wsrp.v2

Examples of org.oasis.wsrp.v2.Templates


   }

   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


   }

   @Override
   AccessMode getAccessMode() throws MissingParameters
   {
      StateChange stateChange = request.getEventParams().getPortletStateChange();

      return WSRPUtils.getAccessModeFromStateChange(stateChange);
   }
View Full Code Here

      return request.getUserContext();
   }

   AccessMode getAccessMode() throws MissingParameters
   {
      StateChange stateChange = request.getInteractionParams().getPortletStateChange();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(stateChange, "portletStateChange", "InteractionParams");
      return WSRPUtils.getAccessModeFromStateChange(stateChange);
   }
View Full Code Here

         String resourceTemplate = v1Templates.getResourceTemplate();
         String secureDefaultTemplate = v1Templates.getSecureDefaultTemplate();
         String secureBlockingActionTemplate = v1Templates.getSecureBlockingActionTemplate();
         String secureRenderTemplate = v1Templates.getSecureRenderTemplate();
         String secureResourceTemplate = v1Templates.getSecureResourceTemplate();
         Templates templates = WSRPTypeFactory.createTemplates(defaultTemplate, blockingActionTemplate, renderTemplate, resourceTemplate, secureDefaultTemplate, secureBlockingActionTemplate, secureRenderTemplate, secureResourceTemplate);

         List<V1Extension> extensions = v1Templates.getExtensions();
         if (extensions != null)
         {
            templates.getExtensions().addAll(WSRPUtils.transform(extensions, EXTENSION));
         }

         return templates;
      }
      else
View Full Code Here

    * @param context
    * @return
    */
   public static Templates createTemplates(PortletInvocationContext context)
   {
      Templates templates = new Templates();

      templates.setBlockingActionTemplate(createTemplate(context, ACTION_URL, Boolean.FALSE));
      templates.setRenderTemplate(createTemplate(context, RENDER_URL, Boolean.FALSE));
      templates.setSecureBlockingActionTemplate(createTemplate(context, ACTION_URL, Boolean.TRUE));
      templates.setSecureRenderTemplate(createTemplate(context, RENDER_URL, Boolean.TRUE));
      templates.setResourceTemplate(createTemplate(context, RESOURCE_URL, false));
      templates.setSecureResourceTemplate(createTemplate(context, RESOURCE_URL, true));

      return templates;
   }
View Full Code Here

      return templates;
   }

   public static Templates createTemplates(String defaultTemplate, String blockingActionTemplate, String renderTemplate, String resourceTemplate, String secureDefaultTemplate, String secureBlockingActionTemplate, String secureRenderTemplate, String secureResourceTemplate)
   {
      Templates templates = new Templates();
      templates.setDefaultTemplate(defaultTemplate);
      templates.setBlockingActionTemplate(blockingActionTemplate);
      templates.setRenderTemplate(renderTemplate);
      templates.setResourceTemplate(resourceTemplate);
      templates.setSecureDefaultTemplate(secureDefaultTemplate);
      templates.setSecureBlockingActionTemplate(secureBlockingActionTemplate);
      templates.setSecureRenderTemplate(secureRenderTemplate);
      templates.setSecureResourceTemplate(secureResourceTemplate);

      return templates;
   }
View Full Code Here

    * @param context
    * @return
    */
   public static Templates createTemplates(PortletInvocationContext context)
   {
      Templates templates = new Templates();

      templates.setBlockingActionTemplate(createTemplate(context, ACTION_URL, Boolean.FALSE));
      templates.setRenderTemplate(createTemplate(context, RENDER_URL, Boolean.FALSE));
      templates.setSecureBlockingActionTemplate(createTemplate(context, ACTION_URL, Boolean.TRUE));
      templates.setSecureRenderTemplate(createTemplate(context, RENDER_URL, Boolean.TRUE));
      templates.setResourceTemplate(createTemplate(context, RESOURCE_URL, false));
      templates.setSecureResourceTemplate(createTemplate(context, RESOURCE_URL, true));

      return templates;
   }
View Full Code Here

      return templates;
   }

   public static Templates createTemplates(String defaultTemplate, String blockingActionTemplate, String renderTemplate, String resourceTemplate, String secureDefaultTemplate, String secureBlockingActionTemplate, String secureRenderTemplate, String secureResourceTemplate)
   {
      Templates templates = new Templates();
      templates.setDefaultTemplate(defaultTemplate);
      templates.setBlockingActionTemplate(blockingActionTemplate);
      templates.setRenderTemplate(renderTemplate);
      templates.setResourceTemplate(resourceTemplate);
      templates.setSecureDefaultTemplate(secureDefaultTemplate);
      templates.setSecureBlockingActionTemplate(secureBlockingActionTemplate);
      templates.setSecureRenderTemplate(secureRenderTemplate);
      templates.setSecureResourceTemplate(secureResourceTemplate);

      return templates;
   }
View Full Code Here

    * @param context
    * @return
    */
   public static Templates createTemplates(PortletInvocationContext context)
   {
      Templates templates = new Templates();

      templates.setBlockingActionTemplate(createTemplate(context, ACTION_URL, Boolean.FALSE));
      templates.setRenderTemplate(createTemplate(context, RENDER_URL, Boolean.FALSE));
      templates.setSecureBlockingActionTemplate(createTemplate(context, ACTION_URL, Boolean.TRUE));
      templates.setSecureRenderTemplate(createTemplate(context, RENDER_URL, Boolean.TRUE));
      templates.setResourceTemplate(createTemplate(context, RESOURCE_URL, false));
      templates.setSecureResourceTemplate(createTemplate(context, RESOURCE_URL, true));

      return templates;
   }
View Full Code Here

      return templates;
   }

   public static Templates createTemplates(String defaultTemplate, String blockingActionTemplate, String renderTemplate, String resourceTemplate, String secureDefaultTemplate, String secureBlockingActionTemplate, String secureRenderTemplate, String secureResourceTemplate)
   {
      Templates templates = new Templates();
      templates.setDefaultTemplate(defaultTemplate);
      templates.setBlockingActionTemplate(blockingActionTemplate);
      templates.setRenderTemplate(renderTemplate);
      templates.setResourceTemplate(resourceTemplate);
      templates.setSecureDefaultTemplate(secureDefaultTemplate);
      templates.setSecureBlockingActionTemplate(secureBlockingActionTemplate);
      templates.setSecureRenderTemplate(secureRenderTemplate);
      templates.setSecureResourceTemplate(secureResourceTemplate);

      return templates;
   }
View Full Code Here

TOP

Related Classes of org.oasis.wsrp.v2.Templates

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.