diff options
Diffstat (limited to 'src/net/java/sip/communicator/impl')
-rw-r--r-- | src/net/java/sip/communicator/impl/resources/ResourceManagementActivator.java | 20 | ||||
-rw-r--r-- | src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java | 20 |
2 files changed, 40 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/resources/ResourceManagementActivator.java b/src/net/java/sip/communicator/impl/resources/ResourceManagementActivator.java index 6c76906..1e7e7e4 100644 --- a/src/net/java/sip/communicator/impl/resources/ResourceManagementActivator.java +++ b/src/net/java/sip/communicator/impl/resources/ResourceManagementActivator.java @@ -19,6 +19,7 @@ package net.java.sip.communicator.impl.resources; import net.java.sip.communicator.util.*; +import org.jitsi.service.configuration.*; import org.jitsi.service.resources.*; import org.osgi.framework.*; @@ -31,6 +32,7 @@ public class ResourceManagementActivator extends SimpleServiceActivator<ResourceManagementServiceImpl> { static BundleContext bundleContext; + private static ConfigurationService configService; /** * Creates new instance of <tt>ResourceManagementActivator</tt> @@ -68,4 +70,22 @@ public class ResourceManagementActivator { return new ResourceManagementServiceImpl(); } + + /** + * Returns the <tt>ConfigurationService</tt> obtained from the bundle + * context. + * @return the <tt>ConfigurationService</tt> obtained from the bundle + * context + */ + public static ConfigurationService getConfigService() + { + if(configService == null) + { + configService + = ServiceUtils.getService( + bundleContext, + ConfigurationService.class); + } + return configService; + } } diff --git a/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java b/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java index d116fea..1cc2dcf 100644 --- a/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java +++ b/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java @@ -344,4 +344,24 @@ public class ResourceManagementServiceImpl { return SkinJarBuilder.createBundleFromZip(zipFile, getImagePack()); } + + /** + * Gets the specified setting from the config service if present, otherwise + * from the embedded resources (resources/config/defaults.properties). + * + * @param key The setting to lookup. + * @return The setting for the key or {@code null} if not found. + */ + @Override + public String getSettingsString(String key) + { + Object configValue = ResourceManagementActivator + .getConfigService().getProperty(key); + if (configValue == null) + { + configValue = super.getSettingsString(key); + } + + return configValue == null ? null : configValue.toString(); + } } |