001
014
015 package com.liferay.util.portlet;
016
017 import com.liferay.portal.kernel.configuration.Configuration;
018 import com.liferay.portal.kernel.configuration.ConfigurationFactoryUtil;
019 import com.liferay.portal.kernel.configuration.Filter;
020
021 import java.util.Properties;
022
023
026 public class PortletProps {
027
028 public static void addProperties(Properties properties) {
029 _instance._configuration.addProperties(properties);
030 }
031
032 public static boolean contains(String key) {
033 return _instance._configuration.contains(key);
034 }
035
036 public static String get(String key) {
037 return _instance._configuration.get(key);
038 }
039
040 public static String get(String key, Filter filter) {
041 return _instance._configuration.get(key, filter);
042 }
043
044 public static String[] getArray(String key) {
045 return _instance._configuration.getArray(key);
046 }
047
048 public static String[] getArray(String key, Filter filter) {
049 return _instance._configuration.getArray(key, filter);
050 }
051
052 public static Properties getProperties() {
053 return _instance._configuration.getProperties();
054 }
055
056 public static void removeProperties(Properties properties) {
057 _instance._configuration.removeProperties(properties);
058 }
059
060 public static void set(String key, String value) {
061 _instance._configuration.set(key, value);
062 }
063
064 private PortletProps() {
065 _configuration = ConfigurationFactoryUtil.getConfiguration(
066 PortletProps.class.getClassLoader(), "portlet");
067 }
068
069 private static PortletProps _instance = new PortletProps();
070
071 private Configuration _configuration;
072
073 }