Examples of LocalizedString


Examples of org.gatein.wsrp.registration.LocalizedString

   public abstract void setLabel(String label);

   public void initFrom(RegistrationPropertyDescription desc)
   {
      LocalizedString description = desc.getDescription();
      if (description != null)
      {
         setDescription(description.getValue());
      }
      LocalizedString hint = desc.getHint();
      if (hint != null)
      {
         setHint(hint.getValue());
      }
      LocalizedString label = desc.getLabel();
      if (label != null)
      {
         setLabel(label.getValue());
      }

      // convert QNames to Strings
      setName(desc.getName().toString());
      setType(desc.getType().toString());
View Full Code Here

Examples of org.gatein.wsrp.registration.LocalizedString

         desc.setDefaultDescription(description);
      }
      String hint = getHint();
      if (!ParameterValidation.isNullOrEmpty(hint))
      {
         desc.setHint(new LocalizedString(hint));
      }
      String label = getLabel();
      if (!ParameterValidation.isNullOrEmpty(label))
      {
         desc.setLabel(new LocalizedString(label));
      }

      return desc;
   }
View Full Code Here

Examples of org.gatein.wsrp.registration.LocalizedString

      ParameterValidation.throwIllegalArgExceptionIfNull(propertyDescription, "RegistrationPropertyDescription");
      PropertyDescription propDesc = WSRPTypeFactory.createPropertyDescription(propertyDescription.getName().toString(),
         propertyDescription.getType());

      // todo: deal with languages properly!!
      LocalizedString hint = propertyDescription.getHint();
      if (hint != null)
      {
         propDesc.setHint(convertToWSRPLocalizedString(hint));
      }
      LocalizedString label = propertyDescription.getLabel();
      if (label != null)
      {
         propDesc.setLabel(convertToWSRPLocalizedString(label));
      }
      return propDesc;
View Full Code Here

Examples of org.gatein.wsrp.registration.LocalizedString

      else
      {
         locale = WSRPUtils.getLocale(lang);
      }

      LocalizedString localizedString = new LocalizedString(wsrpLocalizedString.getValue(), locale);
      localizedString.setResourceName(wsrpLocalizedString.getResourceName());
      return localizedString;
   }
View Full Code Here

Examples of org.gatein.wsrp.registration.LocalizedString

   public abstract void setLabel(String label);

   public void initFrom(RegistrationPropertyDescription desc)
   {
      LocalizedString description = desc.getDescription();
      if (description != null)
      {
         setDescription(description.getValue());
      }
      LocalizedString hint = desc.getHint();
      if (hint != null)
      {
         setHint(hint.getValue());
      }
      LocalizedString label = desc.getLabel();
      if (label != null)
      {
         setLabel(label.getValue());
      }

      // convert QNames to Strings
      setName(desc.getName().toString());
      setType(desc.getType().toString());
View Full Code Here

Examples of org.gatein.wsrp.registration.LocalizedString

         desc.setDefaultDescription(description);
      }
      String hint = getHint();
      if (!ParameterValidation.isNullOrEmpty(hint))
      {
         desc.setHint(new LocalizedString(hint));
      }
      String label = getLabel();
      if (!ParameterValidation.isNullOrEmpty(label))
      {
         desc.setLabel(new LocalizedString(label));
      }

      return desc;
   }
View Full Code Here

Examples of org.jasig.portal.events.tincan.om.LocalizedString

    public void testLrsObjectSerialize() throws Exception {
        final UrnBuilder idBuilder = new UrnBuilder("UTF-8", "tincan", "uportal", "activities", "portlet", "fname");
        final URI id = idBuilder.getUri();
       
        final LrsObject lrsObject = new LrsObject(id, "Activity",
                ImmutableMap.of("name", new LocalizedString(new Locale("en", "us"), "Portlet Name"),
                                "description", new LocalizedString(new Locale("en", "us"), "Portlet Description")));
       
        final String result = this.objectMapper.writeValueAsString(lrsObject);
       
        assertEquals("{\"id\":\"urn:tincan:uportal:activities:portlet:fname\",\"objectType\":\"Activity\",\"definition\":{\"name\":{\"en-US\":\"Portlet Name\"},\"description\":{\"en-US\":\"Portlet Description\"}}}", result);
    }
View Full Code Here

Examples of org.jboss.portal.common.i18n.LocalizedString

      for (CustomPortletModeMetaData customPortletModeMD : portletApplicationMD.getCustomPortletModes().values())
      {
         Mode mode = 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())
      {
         WindowState windowState = WindowState.create(customPortletModeMD.getWindowState());

         //
         LocalizedString description = customPortletModeMD.getDescription();

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

Examples of org.jboss.portal.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

Examples of org.jboss.portal.common.i18n.LocalizedString

         Class clazz = context.getClass(valueType);
         type = new ContainerTypeInfo(clazz);
      }

      //
      LocalizedString displayName = bundleMgr.getLocalizedValue(
         "javax.portlet.app.event-definition." + name + ".display-name",
         "Event " + name);
      LocalizedString description = bundleMgr.getLocalizedValue(
         "javax.portlet.app.event-definition." + name + ".description",
         getDefaultStringFor(eventDefinitionMD.getDescription(), "Description of event " + name));

      //
      return new ContainerEventInfo(name, type, displayName, description);
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.