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