protected Settings getSettings(ActionRequest actionRequest) throws PortalException { ThemeDisplay themeDisplay = (ThemeDisplay)actionRequest.getAttribute( WebKeys.THEME_DISPLAY); String serviceName = ParamUtil.getString(actionRequest, "serviceName"); String settingsScope = ParamUtil.getString( actionRequest, "settingsScope"); if (settingsScope.equals("company")) { return SettingsFactoryUtil.getSettings( new CompanyServiceSettingsLocator( themeDisplay.getCompanyId(), serviceName)); } else if (settingsScope.equals("group")) { return SettingsFactoryUtil.getSettings( new GroupServiceSettingsLocator( themeDisplay.getScopeGroupId(), serviceName)); } else if (settingsScope.equals("portletInstance")) { String portletResource = ParamUtil.getString( actionRequest, "portletResource"); return SettingsFactoryUtil.getSettings( new PortletInstanceSettingsLocator( themeDisplay.getLayout(), portletResource)); } throw new IllegalArgumentException( "Invalid settings scope " + settingsScope); }
@Override public Settings getSettings() throws SettingsException { CompanyServiceSettingsLocator companyServiceSettingsLocator = new CompanyServiceSettingsLocator( getCompanyId(_groupId), _settingsId, _configurationPid); Settings groupConfigurationBeanSettings = _settingsLocatorHelper.getGroupConfigurationBeanSettings( _groupId, _configurationPid, companyServiceSettingsLocator.getSettings()); return _settingsLocatorHelper.getGroupPortletPreferencesSettings( _groupId, _settingsId, groupConfigurationBeanSettings); }
protected DDMGroupServiceConfiguration getDDMGroupServiceConfiguration( long groupId) throws ConfigurationException { return configurationProvider.getConfiguration( DDMGroupServiceConfiguration.class, new GroupServiceSettingsLocator( groupId, DDMConstants.SERVICE_NAME)); }
protected JournalGroupServiceConfiguration getJournalGroupServiceConfiguration(long groupId) throws ConfigurationException { return configurationProvider.getConfiguration( JournalGroupServiceConfiguration.class, new GroupServiceSettingsLocator( groupId, JournalConstants.SERVICE_NAME)); }
public static BlogsGroupServiceSettings getInstance(long groupId) throws PortalException { Settings settings = SettingsFactoryUtil.getSettings( new GroupServiceSettingsLocator( groupId, BlogsConstants.SERVICE_NAME)); return new BlogsGroupServiceSettings(settings); }
public static BlogsGroupServiceSettings getInstance( long groupId, Map<String, String[]> parameterMap) throws PortalException { Settings settings = SettingsFactoryUtil.getSettings( new GroupServiceSettingsLocator( groupId, BlogsConstants.SERVICE_NAME)); return new BlogsGroupServiceSettings( new ParameterMapSettings(parameterMap, settings)); }