001
014
015 package com.liferay.portal.kernel.settings;
016
017
021 public class CompanyServiceSettingsLocator implements SettingsLocator {
022
023 public CompanyServiceSettingsLocator(long companyId, String settingsId) {
024 _companyId = companyId;
025 _settingsId = settingsId;
026 }
027
028 @Override
029 public Settings getSettings() {
030 Settings portalPropertiesSettings =
031 _settingsLocatorHelper.getPortalPropertiesSettings();
032
033 Settings configurationBeanSettings =
034 _settingsLocatorHelper.getConfigurationBeanSettings(
035 _settingsId, portalPropertiesSettings);
036
037 Settings portalPreferencesSettings =
038 _settingsLocatorHelper.getPortalPreferencesSettings(
039 _companyId, configurationBeanSettings);
040
041 return _settingsLocatorHelper.getCompanyPortletPreferencesSettings(
042 _companyId, _settingsId, portalPreferencesSettings);
043 }
044
045 @Override
046 public String getSettingsId() {
047 return _settingsId;
048 }
049
050 private final long _companyId;
051 private final String _settingsId;
052 private final SettingsLocatorHelper _settingsLocatorHelper =
053 SettingsLocatorHelperUtil.getSettingsLocatorHelper();
054
055 }