Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.plugin.skinresourcepack
Class SkinResourcePack

java.lang.Object
  extended by net.java.sip.communicator.plugin.skinresourcepack.SkinResourcePack
All Implemented Interfaces:
ResourcePack, SkinPack, org.osgi.framework.BundleActivator

public class SkinResourcePack
extends Object
implements org.osgi.framework.BundleActivator, SkinPack

The skin resource pack.

Author:
Adam Netocny

Field Summary
 
Fields inherited from interface net.java.sip.communicator.service.resources.SkinPack
RESOURCE_NAME_DEFAULT_VALUE
 
Fields inherited from interface net.java.sip.communicator.service.resources.ResourcePack
RESOURCE_NAME
 
Constructor Summary
SkinResourcePack()
           
 
Method Summary
protected static Iterator<String> findResourcePaths(String path, String pattern)
          Finds all properties files for the given path in this bundle.
 Map<String,String> getColorResources()
          Returns a Map, containing all [key, value] pairs for color resource pack.
 String getDescription()
          Returns the description of this resource pack.
 Map<String,String> getImageResources()
          Returns a Map, containing all [key, value] pairs for image resource pack.
 String getName()
          Returns the name of this resource pack.
 Map<String,String> getResources()
          Returns a Map, containing all [key, value] pairs for this resource pack.
 Map<String,String> getSettingsResources()
          Returns a Map, containing all [key, value] pairs for color resource pack.
 Map<String,String> getStyleResources()
          Returns a Map, containing all [key, value] pairs for style resource pack.
 void start(org.osgi.framework.BundleContext bc)
          Starts the bundle.
 void stop(org.osgi.framework.BundleContext bc)
          Stops the bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkinResourcePack

public SkinResourcePack()
Method Detail

start

public void start(org.osgi.framework.BundleContext bc)
           throws Exception
Starts the bundle.

Specified by:
start in interface org.osgi.framework.BundleActivator
Parameters:
bc - BundleContext
Throws:
Exception - -

stop

public void stop(org.osgi.framework.BundleContext bc)
          throws Exception
Stops the bundle.

Specified by:
stop in interface org.osgi.framework.BundleActivator
Parameters:
bc - BundleContext
Throws:
Exception - -

getImageResources

public Map<String,String> getImageResources()
Returns a Map, containing all [key, value] pairs for image resource pack.

Specified by:
getImageResources in interface SkinPack
Returns:
a Map, containing all [key, value] pairs for image resource pack.

getStyleResources

public Map<String,String> getStyleResources()
Returns a Map, containing all [key, value] pairs for style resource pack.

Specified by:
getStyleResources in interface SkinPack
Returns:
a Map, containing all [key, value] pairs for style resource pack.

getColorResources

public Map<String,String> getColorResources()
Returns a Map, containing all [key, value] pairs for color resource pack.

Specified by:
getColorResources in interface SkinPack
Returns:
a Map, containing all [key, value] pairs for color resource pack.

getSettingsResources

public Map<String,String> getSettingsResources()
Returns a Map, containing all [key, value] pairs for color resource pack.

Specified by:
getSettingsResources in interface SkinPack
Returns:
a Map, containing all [key, value] pairs for color resource pack.

getResources

public Map<String,String> getResources()
Returns a Map, containing all [key, value] pairs for this resource pack.

Specified by:
getResources in interface ResourcePack
Returns:
a Map, containing all [key, value] pairs for this resource pack.

getName

public String getName()
Returns the name of this resource pack.

Specified by:
getName in interface ResourcePack
Returns:
the name of this resource pack.

getDescription

public String getDescription()
Returns the description of this resource pack.

Specified by:
getDescription in interface ResourcePack
Returns:
the description of this resource pack.

findResourcePaths

protected static Iterator<String> findResourcePaths(String path,
                                                    String pattern)
Finds all properties files for the given path in this bundle.

Parameters:
path - the path pointing to the properties files.
pattern - the pattern for properties files (ex. "colors-*.properties")
Returns:
an Iterator over a list of all properties files found for the given path and pattern

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.