Package javax.portlet

Examples of javax.portlet.PortletConfig


     */
    protected Template handleRequest(HttpServletRequest request, HttpServletResponse response, Context ctx) throws Exception
    {
        PortletRequest renderRequest = (PortletRequest) request.getAttribute(PORTLET_REQUEST);
        RenderResponse renderResponse = (RenderResponse) request.getAttribute(PORTLET_RESPONSE);
        PortletConfig portletConfig = (PortletConfig) request.getAttribute(PORTLET_CONFIG);
       
        if (renderRequest != null)
        {
            renderRequest.setAttribute(VELOCITY_CONTEXT_ATTR, ctx);
            Context portletContext = (Context)renderRequest.getAttribute(GenericVelocityPortlet.PORTLET_BRIDGE_CONTEXT);
View Full Code Here


    public FacesContext getFacesContext(Object config, Object request, Object response, Lifecycle lifecycle)
            throws FacesException
    {
        if (config instanceof PortletConfig)
        {
            PortletConfig pc = (PortletConfig)config;
            PortletContext context = pc.getPortletContext();
            PortletFacesContextImpl facesContext = new PortletFacesContextImpl(
                    (PortletContext) context, 
                    (PortletRequest) request,
                    (PortletResponse) response);
            String defaultViewName = pc.getInitParameter(FacesPortlet.PARAM_VIEW_PAGE);           
            // facesContext.resolveViewRoot(defaultViewName, (PortletRequest)request);
            return facesContext;
        }
        else
        {
View Full Code Here

      HttpServletRequestWrapper dreq,
      ServletContext servletContext)
   {
      super(dreq);

      PortletConfig config = (PortletConfig)dreq.getAttribute(Constants.JAVAX_PORTLET_CONFIG);
      Map<String, String[]> options = config.getContainerRuntimeOptions();
      String[] sessionScopeOption = options.get("javax.portlet.servletDefaultSessionScope");
      int sessionScope = PortletSession.APPLICATION_SCOPE;
      if (sessionScopeOption != null && sessionScopeOption.length > 0 && "PORTLET_SCOPE".equals(sessionScopeOption[0]))
      {
         sessionScope = PortletSession.PORTLET_SCOPE;
View Full Code Here

    private ApplicationStatistic get(PortletRequest req) {
        PortalContainer container = PortalContainer.getInstance();
        ApplicationStatisticService service = (ApplicationStatisticService) container
                .getComponentInstance(ApplicationStatisticService.class);
        if (service != null) {
            PortletConfig portletConfig = (PortletConfig) req.getAttribute("javax.portlet.config");
            String portletName = portletConfig.getPortletName();
            String phase = (String) req.getAttribute(PortletRequest.LIFECYCLE_PHASE);
            String applicationId = portletName + "/" + phase;
            return service.getApplicationStatistic(applicationId);
        } else {
            return null;
View Full Code Here

     */
    protected Template handleRequest(HttpServletRequest request, HttpServletResponse response, Context ctx) throws Exception
    {
        PortletRequest renderRequest = (PortletRequest) request.getAttribute(PORTLET_REQUEST);
        RenderResponse renderResponse = (RenderResponse) request.getAttribute(PORTLET_RESPONSE);
        PortletConfig portletConfig = (PortletConfig) request.getAttribute(PORTLET_CONFIG);
       
        if (renderRequest != null)
        {
            renderRequest.setAttribute(VELOCITY_CONTEXT_ATTR, ctx);
            Context portletContext = (Context)renderRequest.getAttribute(GenericVelocityPortlet.PORTLET_BRIDGE_CONTEXT);
View Full Code Here

    public int doStartTag() throws JspException {
        PortletRequest renderRequest = (PortletRequest) pageContext.getRequest()
            .getAttribute(Constants.PORTLET_REQUEST);
        RenderResponse renderResponse = (RenderResponse) pageContext.getRequest()
            .getAttribute(Constants.PORTLET_RESPONSE);
        PortletConfig portletConfig = (PortletConfig) pageContext.getRequest()
            .getAttribute(Constants.PORTLET_CONFIG);

        if (pageContext.getAttribute("renderRequest") == null)   //Set attributes only once
        {
            pageContext.setAttribute("renderRequest",
View Full Code Here

     */
    public int doStartTag() throws JspException
    {
        PortletRequest renderRequest = (PortletRequest)pageContext.getRequest().getAttribute(Constants.PORTLET_REQUEST);
        RenderResponse renderResponse = (RenderResponse)pageContext.getRequest().getAttribute(Constants.PORTLET_RESPONSE);
        PortletConfig portletConfig = (PortletConfig)pageContext.getRequest().getAttribute(Constants.PORTLET_CONFIG);

        if (pageContext.getAttribute("renderRequest") == null)   //Set attributes only once
        {
            pageContext.setAttribute("renderRequest",
                                     renderRequest,
View Full Code Here

    protected ResourceBundle findApplicationResourceBundle() throws Exception {
        ExoContainer container = ExoContainerContext.getCurrentContainer();
        PortletConfigRegistry registry = (PortletConfigRegistry) container
                .getComponentInstanceOfType(PortletConfigRegistry.class);
        String portlet = getApplication().getApplicationName();
        PortletConfig config = registry.getPortletConfig(portlet);
        Locale locale = getLocale();
        if (config != null) {
            ResourceBundle result = config.getResourceBundle(locale);
            if (result != null) {
                return result;
            }
        }
        return getApplication().getResourceBundle(locale);
View Full Code Here

      //decoration name is mode name by default
    String decorationName = mode.toString().toUpperCase();
    ResourceBundle bundle;
    StringBuffer res;
    try {
      PortletConfig config = driverConfig.getPortletConfig(evaluatedPortletId);
      ServletRequest request = pageContext.getRequest();
      Locale defaultLocale = request.getLocale();
      bundle = config.getResourceBundle(defaultLocale);
      res = new StringBuffer();
      res.append("javax.portlet.app.custom-portlet-mode.");
      res.append(mode.toString());
      res.append(".decoration-name");
      decorationName = bundle.getString(res.toString());
View Full Code Here

      }

      /*
       * On crée un configuration pour le portlet
       */
      PortletConfig TPconfig = new TpPortletConfig(tpPorletContext, loader);
     
      try {
        /*
         * On charge le portlet
         */
 
View Full Code Here

TOP

Related Classes of javax.portlet.PortletConfig

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.