Examples of LocalizedString


Examples of org.exoplatform.portal.config.model.LocalizedString

            }
        }

        String value = StaxNavUtils.getRequiredContent(navigator, false);

        return new LocalizedString(value, lang);
    }
View Full Code Here

Examples of org.exoplatform.portal.config.model.LocalizedString

            }
        }
        ctx.parsePastStartTag(marshalURI, marshallName);
        String value = ctx.getText();
        ctx.parsePastEndTag(marshalURI, marshallName);
        return new LocalizedString(value, lang);
    }
View Full Code Here

Examples of org.exoplatform.portal.config.model.LocalizedString

        if (node.getState().getLabel() == null) {
            Map<Locale, Described.State> descriptions = service.getDescriptions(node.getId());
            if (descriptions != null && !descriptions.isEmpty()) {
                I18NString labels = new I18NString();
                for (Map.Entry<Locale, Described.State> entry : descriptions.entrySet()) {
                    labels.add(new LocalizedString(entry.getValue().getName(), entry.getKey()));
                }

                pageNode.setLabels(labels);
            }
        } else {
View Full Code Here

Examples of org.exoplatform.portal.config.model.LocalizedString

            }
        }

        String value = StaxNavUtils.getRequiredContent(navigator, false);

        return new LocalizedString(value, lang);
    }
View Full Code Here

Examples of org.fenixedu.commons.i18n.LocalizedString

        return getProgram(null);
    }

    public LocalizedString getLocalizedEvaluationMethod(final ExecutionSemester period) {
        final CompetenceCourseInformation information = findCompetenceCourseInformationForExecutionPeriod(period);
        return information == null ? null : new LocalizedString(Locale.getDefault(), information.getEvaluationMethod()).with(
                Locale.ENGLISH, information.getEvaluationMethodEn());
    }
View Full Code Here

Examples of org.gatein.api.common.i18n.LocalizedString

            // For some reason (UI issue possibly) an english locale can be set with no value.
            if (entry.getValue().getName() != null) {
                m.put(entry.getKey(), entry.getValue().getName());
            }
        }
        return new LocalizedString(m);
    }
View Full Code Here

Examples of org.gatein.common.i18n.LocalizedString

         // cause an improper Application name
         portletApplicationName = portletApplicationName.replace('/', '_');
         portletName = portletName.replace('/', '_');

         MetaInfo metaInfo = portlet.getInfo().getMeta();
         LocalizedString keywordsLS = metaInfo.getMetaValue(MetaInfo.KEYWORDS);

         //
         Set<String> categoryNames = new HashSet<String>();

         // Process keywords
         if (keywordsLS != null)
         {
            String keywords = keywordsLS.getDefaultString();
            if (keywords != null && keywords.length() != 0)
            {
               for (String categoryName : keywords.split(","))
               {
                  // Trim name
                  categoryName = categoryName.trim();
                  if (INTERNAL_PORTLET_TAG.equalsIgnoreCase(categoryName))
                  {
                     log.debug("Skipping portlet (" + portletApplicationName + "," + portletName + ") + tagged as internal");
                     continue portlet;
                  }
                  else
                  {
                     categoryNames.add(categoryName);
                  }
               }
            }
         }

         ArrayList<String> permissions = new ArrayList<String>();
         permissions.add(UserACL.EVERYONE);
         // If no keywords, use the portlet application name
         if (categoryNames.isEmpty())
         {
            categoryNames.add(portletApplicationName.trim());
         }

         // Additionally categorise the portlet as remote
         boolean remote = portlet.isRemote();
         if (remote)
         {
            categoryNames.add(REMOTE_CATEGORY_NAME);

            // add producer name to categories for easier finding of portlets for GTNPORTAL-823
            LocalizedString producerNameLS = metaInfo.getMetaValue(PRODUCER_NAME_META_INFO_KEY);
            if (producerNameLS != null)
            {
               categoryNames.add(producerNameLS.getDefaultString() + PRODUCER_CATEGORY_NAME_SUFFIX);
            }
         }

         //
         log.info("Importing portlet (" + portletApplicationName + "," + portletName + ") in categories " + categoryNames);

         // Process category names
         for (String categoryName : categoryNames)
         {
            CategoryDefinition category = registry.getCategory(categoryName);

            //
            if (category == null)
            {
               category = registry.createCategory(categoryName);
               category.setDisplayName(categoryName);
               category.setAccessPermissions(permissions);
            }

            //
            ContentDefinition app = category.getContentMap().get(portletName);
            if (app == null)
            {
               LocalizedString descriptionLS = metaInfo.getMetaValue(MetaInfo.DESCRIPTION);
               LocalizedString displayNameLS = metaInfo.getMetaValue(MetaInfo.DISPLAY_NAME);
               String displayName = getLocalizedStringValue(displayNameLS, portletName);

               ContentType<?> contentType;
               String contentId;
               if (remote)
View Full Code Here

Examples of org.gatein.common.i18n.LocalizedString

      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());
View Full Code Here

Examples of org.gatein.common.i18n.LocalizedString

      for (CustomPortletModeMetaData customPortletModeMD : portletApplicationMD.getCustomPortletModes().values())
      {
         org.gatein.pc.api.Mode mode = org.gatein.pc.api.Mode.create(customPortletModeMD.getPortletMode());

         //
         LocalizedString description = customPortletModeMD.getDescription();

         //
         ContainerModeInfo modeInfo;
         if (customPortletModeMD.isPortalManaged())
         {
            if (description != null)
            {
               modeInfo = new ContainerModeInfo(mode, description);
            }
            else
            {
               modeInfo = new ContainerModeInfo(mode);
            }
         }
         else
         {
            ResourceBundleManager bundleMgr = context.getBundleManager();

            //
            LocalizedString displayName = bundleMgr.getLocalizedValue(
               "javax.portlet.app.custom-portlet-mode." + mode + ".decoration-name",
               "" + mode);

            //
            if (description != null)
            {
               modeInfo = new ContainerPortletManagedModeInfo(mode, description, displayName);
            }
            else
            {
               modeInfo = new ContainerPortletManagedModeInfo(mode, displayName);
            }
         }

         //
         customModes.put(mode, modeInfo);
      }

      // Build custom window state infos for reuse in portlet info
      for (CustomWindowStateMetaData customPortletModeMD : portletApplicationMD.getCustomWindowStates().values())
      {
         org.gatein.pc.api.WindowState windowState = WindowState.create(customPortletModeMD.getWindowState());

         //
         LocalizedString description = customPortletModeMD.getDescription();

         //
         ContainerWindowStateInfo windowStateInfo;
         if (description != null)
         {
View Full Code Here

Examples of org.gatein.common.i18n.LocalizedString

   private ContainerParameterInfo build(PublicRenderParameterMetaData parameterMD)
   {
      QName name = getName(parameterMD.getQname(), parameterMD.getName());
      ResourceBundleManager bundleMgr = context.getBundleManager();

      LocalizedString description = bundleMgr.getLocalizedValue(
         "javax.portlet.app.public-render-parameter." + name + ".description",
         getDefaultStringFor(parameterMD.getDescription(), "Description of public render parameter " + name));

      //
      return new ContainerParameterInfo(
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.