public PortletPreferences getPreferences() { return resourceRequest.getPreferences(); }
public PortletPreferences getPreferences() { return resourceRequest.getPreferences(); }
@ResourceMapping("storeData") public String storeData(ResourceRequest request, @RequestParam JsonNode config) throws ValidatorException, IOException, ReadOnlyException { final PortletPreferences preferences = request.getPreferences(); this.portletPreferencesJsonDao.storeJson(preferences, CONFIG_PREF_NAME, config); return "jsonView"; }
@Override public void serveResource(ResourceRequest request, ResourceResponse response) throws PortletException, IOException { String widgetSource = getAttributePreference(request.getPreferences(), "WIDGETSOURCE"); if (!StringUtils.isEmpty(widgetSource)) { response.setContentType("text/html"); response.getWriter().print(widgetSource); } }
final PortletPreferences prefs = request.getPreferences(); final String enableReviewsPreferenceValue = prefs.getValue(ENABLE_REVIEWS_PREFERENCE, ENABLE_REVIEWS_DEFAULT);
public static byte[] getRSS( ResourceRequest portletRequest, ResourceResponse portletResponse) throws Exception { PortletPreferences portletPreferences = portletRequest.getPreferences(); String selectionStyle = portletPreferences.getValue( "selectionStyle", "dynamic"); if (!selectionStyle.equals("dynamic")) { return new byte[0]; } String assetLinkBehavior = portletPreferences.getValue( "assetLinkBehavior", "showFullContent"); String rssDisplayStyle = portletPreferences.getValue( "rssDisplayStyle", RSSUtil.DISPLAY_STYLE_ABSTRACT); String rssFeedType = portletPreferences.getValue( "rssFeedType", RSSUtil.FEED_TYPE_DEFAULT); String rssName = portletPreferences.getValue("rssName", null); String format = RSSUtil.getFeedTypeFormat(rssFeedType); double version = RSSUtil.getFeedTypeVersion(rssFeedType); String rss = exportToRSS( portletRequest, portletResponse, rssName, null, format, version, rssDisplayStyle, assetLinkBehavior, getAssetEntries( portletRequest, portletResponse, portletPreferences)); return rss.getBytes(StringPool.UTF8); }
resourceRequest.getPreferences();