Package javax.portlet

Examples of javax.portlet.PortletConfig


  /**
   * @return
   */
  private Map<String,String> calculateDefaultViewIdMap() {
      Map<String,String> viewIdMap = new HashMap<String,String>();
      PortletConfig portletConfig = getPortletConfig();
      Enumeration<String> configNames = portletConfig.getInitParameterNames();
      while (configNames.hasMoreElements()) {
        String name = configNames.nextElement();
        if(name.startsWith(DEFAULT_VIEWID)){
          // Put viewId with mode name as key.
          viewIdMap.put(name.substring(DEFAULT_VIEW_ID_LENGTH), portletConfig.getInitParameter(name).trim());
        }
      }
      return viewIdMap;
  }
View Full Code Here


  public String defaultPage() {
    String page = null;
    if (BridgeUtil.isPortletRequest()) {
      FacesContext facesContext = FacesContext.getCurrentInstance();
      PortletConfig portletConfig = (PortletConfig) facesContext
          .getELContext().getContext(PortletConfig.class);
      String bridgeParametersPrefix = Bridge.BRIDGE_PACKAGE_PREFIX
          + portletConfig.getPortletName() + ".";
      Map<String, String> defaultViewIdMap = (Map<String, String>) facesContext
          .getExternalContext().getApplicationMap().get(
              bridgeParametersPrefix + Bridge.DEFAULT_VIEWID_MAP);
      PortletRequest request = (PortletRequest) facesContext.getExternalContext().getRequest();
      page = defaultViewIdMap.get(request.getPortletMode().toString());
View Full Code Here

        // TODO Auto-generated method stub
        return null;
      }
 
      public PortletConfig getPortletConfig() {
        return new PortletConfig() {
         
          public Enumeration<Locale> getSupportedLocales() {
            // TODO Auto-generated method stub
            return null;
          }
View Full Code Here

        return null;
      }
 
      public PortletConfig getPortletConfig() {
        // TODO Auto-generated method stub
        return new PortletConfig() {
         
          public Enumeration<Locale> getSupportedLocales() {
            // TODO Auto-generated method stub
            return null;
          }
View Full Code Here

      //
      ResourceBundleManager bundleManager = PortletResourceBundleFactory.createResourceBundleManager(info.getBundleManager(), info);

      // Portlet config object
      PortletConfig config = new PortletConfigImpl(info, application.info, application.portletContext, bundleManager);

      // Finally initialize the porlet instance
      try
      {
//         log.debug("Loading portlet class " + className);
View Full Code Here

    if (mDefaultViewIdMap == null)
    {
      mDefaultViewIdMap = new HashMap<String, String>();
      // loop through all portlet initialization parameters looking for those in the
      // correct form
      PortletConfig config = getPortletConfig();
     
      Enumeration<String> e = config.getInitParameterNames();
      int len = DEFAULT_VIEWID.length();
      while (e.hasMoreElements())
      {
        String s = e.nextElement();
        if (s.startsWith(DEFAULT_VIEWID) && s.length() > DEFAULT_VIEWID.length())
        {
          String viewId = config.getInitParameter(s);
          // extract the mode
          s = s.substring(len+1);
          mDefaultViewIdMap.put(s, viewId);
        }
      }
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

    if (mDefaultViewIdMap == null)
    {
      mDefaultViewIdMap = new HashMap<String, String>();
      // loop through all portlet initialization parameters looking for those in the
      // correct form
      PortletConfig config = getPortletConfig();

      Enumeration<String> e = config.getInitParameterNames();
      int len = DEFAULT_VIEWID.length();
      while (e.hasMoreElements())
      {
        String s = e.nextElement();
        if (s.startsWith(DEFAULT_VIEWID) && s.length() > DEFAULT_VIEWID.length())
        {
          String viewId = config.getInitParameter(s);
          // extract the mode
          s = s.substring(len + 1);
          mDefaultViewIdMap.put(s, viewId);
        }
      }
View Full Code Here

  public void init() throws PortletException {
    super.init();
    //
    try {
      _ctx =   getPortletContext();
      PortletConfig config = getPortletConfig();
      String tmp = config.getInitParameter("view_include");
      if (tmp != null) {
        _incView = tmp;
      }
      log("View include: " + _incView);
      tmp = config.getInitParameter("edit_include");
      if (tmp != null) {
        _incEdit = tmp;
      }
      log("Edit include: " + _incEdit);
      tmp = config.getInitParameter("help_include");
      if (tmp != null) {
        _incHelp = tmp;
      }
      log("Help include: " + _incHelp);
View Full Code Here

   
    private boolean isPortletScopeSessionConfigured(PortletRequestContext requestContext)
    {
        boolean portletScopeSessionConfigured = false;
       
        PortletConfig portletConfig = requestContext.getPortletConfig();
        Map<String, String []> containerRuntimeOptions = portletConfig.getContainerRuntimeOptions();
        String [] values = containerRuntimeOptions.get("javax.portlet.servletDefaultSessionScope");
       
        if (values != null && values.length > 0)
        {
            portletScopeSessionConfigured = "PORTLET_SCOPE".equals(values[0]);
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.