Examples of PortletInfo


Examples of org.gatein.pc.api.info.PortletInfo

   public MimeResponseImpl(PortletInvocation invocation, PortletRequestImpl preq)
   {
      super(invocation, preq);

      // Configure expiration value
      PortletInfo info = preq.container.getInfo();

      // 0 means no buffering - we say no buffering
      this.bufferSize = 0;
      this.contentTypeSet = false;
      this.responseContent = new ContentBuffer();
View Full Code Here

Examples of org.gatein.pc.api.info.PortletInfo

            cacheControl.isPublicScope() ? CacheScope.PUBLIC : CacheScope.PRIVATE,
            cacheControl.getETag());
      }
      else
      {
         PortletInfo info = preq.container.getInfo();
         CacheInfo cacheInfo = info.getCache();
         cc = new org.gatein.pc.api.cache.CacheControl(cacheInfo.getExpirationSecs(), CacheScope.PRIVATE, null);
      }

      //
      if (cacheControl != null && cacheControl.useCachedContent())
View Full Code Here

Examples of org.gatein.pc.api.info.PortletInfo

   public CacheControl getCacheControl()
   {
      if (cacheControl == null)
      {
         PortletInfo info = preq.container.getInfo();
         CacheInfo cacheInfo = info.getCache();
         cacheControl = new CacheControlImpl(cacheInfo.getExpirationSecs(), CacheScope.PRIVATE);
      }
      return cacheControl;
   }
View Full Code Here

Examples of org.gatein.pc.api.info.PortletInfo

        if (portlets == null || portlets.isEmpty()) {
            return;
        }

        for (Portlet portlet : portlets) {
            PortletInfo info = portlet.getInfo();

            // in the remote case, the "application name" will be the name of the remote invoker
            String appName;
            if (remote) {
                LocalizedString producerNameLS = info.getMeta().getMetaValue(PRODUCER_NAME_META_INFO_KEY);
                if (producerNameLS != null) {
                    appName = producerNameLS.getDefaultString();
                } else {
                    throw new IllegalStateException("Missing PortletInvoker id in remote portlet metadata");
                }
            } else {
                appName = info.getApplicationName();
            }

            WebApp webApp = getWebApp(appName);
            if (webApp == null) {
                webApp = new WebApp(appName);
View Full Code Here

Examples of org.gatein.pc.api.info.PortletInfo

        private PortletInfo portletInfo_;

        final PortletContext context;

        public PortletExtra(Portlet portlet) {
            PortletInfo info = portlet.getInfo();

            context = portlet.getContext();

            String appName = info.getApplicationName();
            boolean remote = portlet.isRemote();

            String portletId;
            if (remote) {
                portletId = context.getId();
            } else {
                portletId = info.getApplicationName() + "/" + info.getName();
            }

            String type = remote ? REMOTE : LOCAL;

            //
            id_ = portletId;
            group_ = appName;
            name_ = info.getName();
            type_ = type;
            portletInfo_ = info;

        }
View Full Code Here

Examples of org.gatein.pc.api.info.PortletInfo

        FederatingPortletInvoker portletInvoker = (FederatingPortletInvoker) manager
                .getComponentInstance(FederatingPortletInvoker.class);
        Set<Portlet> portlets = remote ? portletInvoker.getRemotePortlets() : portletInvoker.getLocalPortlets();
        List<Application> applications = new ArrayList<Application>(portlets.size());
        for (Portlet portlet : portlets) {
            PortletInfo info = portlet.getInfo();

            LocalizedString descriptionLS = info.getMeta().getMetaValue(MetaInfo.DESCRIPTION);
            LocalizedString displayNameLS = info.getMeta().getMetaValue(MetaInfo.DISPLAY_NAME);

            String portletName = info.getName();
            Application app = new Application();
            app.setApplicationName(portletName);
            // app.setApplicationGroup(info.getApplicationName());
            ApplicationType appType;
            String contentId;
            String displayName = Util.getLocalizedStringValue(displayNameLS, portletName);
            if (remote) {
                appType = ApplicationType.WSRP_PORTLET;
                contentId = portlet.getContext().getId();
                displayName += ApplicationRegistryService.REMOTE_DISPLAY_NAME_SUFFIX; // add remote to display name to make it
                                                                                      // more obvious that the portlet is remote
            } else {
                appType = ApplicationType.PORTLET;
                contentId = info.getApplicationName() + "/" + info.getName();
            }
            app.setType(appType);
            app.setDisplayName(displayName);
            app.setDescription(Util.getLocalizedStringValue(descriptionLS, portletName));
            app.setAccessPermissions(new ArrayList<String>());
View Full Code Here

Examples of org.gatein.pc.api.info.PortletInfo

      if (displayName == null)
      {
         org.gatein.pc.api.Portlet portlet = getProducedOfferedPortlet();
         if (portlet != null)
         {
            PortletInfo info = portlet.getInfo();
            MetaInfo meta = info.getMeta();
            displayName = meta.getMetaValue(MetaInfo.DISPLAY_NAME);
            String value = null;
            if (displayName != null)
            {
               RequestContext i = PortalRequestContext.getCurrentInstance();
               Locale locale = i.getLocale();
               value = displayName.getString(locale, true);
            }
            if (value == null || value.length() == 0)
            {
               value = info.getName();
            }
            return value;
         }
         else
         {
            return "";
         }
      }
      else
      {
         String value = null;
         if (displayName != null)
         {
            RequestContext i = PortalRequestContext.getCurrentInstance();
            Locale locale = i.getLocale();
            value = displayName.getString(locale, true);
         }
         if (value == null || value.length() == 0)
         {
            org.gatein.pc.api.Portlet portlet = getProducedOfferedPortlet();
            PortletInfo info = portlet.getInfo();
            value = info.getName();
         }
         return value;
      }
   }
View Full Code Here

Examples of org.gatein.pc.api.info.PortletInfo

      Portlet portlet = uiPortlet.getProducedOfferedPortlet();
      if (portlet == null || portlet.getInfo() == null)
         return;

      PortletInfo portletInfo = portlet.getInfo();

      /*
       * Define which portlet modes the portlet supports and hence should be shown
       * in the portlet info bar
       */
      Set<ModeInfo> modes = portletInfo.getCapabilities().getModes(MediaType.create("text/html"));
      List<String> supportModes = new ArrayList<String>();
      for (ModeInfo modeInfo : modes)
      {
         String modeName = modeInfo.getModeName().toLowerCase();
         if ("config".equals(modeInfo.getModeName()))
View Full Code Here

Examples of org.gatein.pc.api.info.PortletInfo

         return;
      }

      for (Portlet portlet : portlets)
      {
         PortletInfo info = portlet.getInfo();
         String appName = info.getApplicationName();

         WebApp webApp = getWebApp(appName);
         if (webApp == null)
         {
            webApp = new WebApp(appName);
View Full Code Here

Examples of org.gatein.pc.api.info.PortletInfo

      private static final String SEPARATOR = "/";
      private static final int SEPARATOR_LENGTH = SEPARATOR.length();

      public PortletExtra(Portlet portlet)
      {
         PortletInfo info = portlet.getInfo();
         String portletName = info.getName();
         String appName = info.getApplicationName();
         boolean remote = portlet.isRemote();

         // if the portlet is remote, we might have an extra '/' at the beginning of the portlet name
         if(remote && portletName.startsWith(SEPARATOR))
         {
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.