001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.settings;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.resource.manager.ResourceManager;
019    import com.liferay.portal.model.Layout;
020    
021    import java.util.List;
022    
023    /**
024     * @author Raymond Aug??
025     * @author Jorge Ferrer
026     */
027    public interface SettingsFactory {
028    
029            public void clearCache();
030    
031            public Settings getCompanyServiceSettings(
032                    long companyId, String serviceName);
033    
034            public Settings getGroupServiceCompanyDefaultSettings(
035                    long companyId, String serviceName);
036    
037            public Settings getGroupServiceSettings(long groupId, String serviceName)
038                    throws PortalException;
039    
040            public List<String> getMultiValuedKeys(String settingsId);
041    
042            public ArchivedSettings getPortletInstanceArchivedSettings(
043                            long groupId, String portletId, String name)
044                    throws PortalException;
045    
046            public List<ArchivedSettings> getPortletInstanceArchivedSettingsList(
047                    long groupId, String portletId);
048    
049            public Settings getPortletInstanceCompanyDefaultSettings(
050                    long companyId, String portletId);
051    
052            public Settings getPortletInstanceGroupDefaultSettings(
053                            long groupId, String portletId)
054                    throws PortalException;
055    
056            public Settings getPortletInstanceSettings(Layout layout, String portletId)
057                    throws PortalException;
058    
059            public void registerSettingsMetadata(
060                    String settingsId, FallbackKeys fallbackKeys,
061                    String[] multiValuedKeysArray, ResourceManager resourceManager);
062    
063    }