Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui
Class GuiActivator

java.lang.Object
  extended by net.java.sip.communicator.impl.gui.GuiActivator
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class GuiActivator
extends Object
implements org.osgi.framework.BundleActivator

The GUI Activator class.

Author:
Yana Stamcheva

Field Summary
static org.osgi.framework.BundleContext bundleContext
          OSGi bundle context.
static boolean isStarted
          Indicates if this bundle has been started.
 
Constructor Summary
GuiActivator()
           
 
Method Summary
static AccountManager getAccountManager()
          Returns the AccountManager obtained from the bundle context.
static Object[] getAccounts(List<ProtocolProviderService> providers)
          Returns the list of wrapped protocol providers.
static AudioNotifierService getAudioNotifier()
          Returns the AudioNotifierService obtained from the bundle context.
static BrowserLauncherService getBrowserLauncher()
          Returns the BrowserLauncherService obtained from the bundle context.
static CallHistoryService getCallHistoryService()
          Returns the CallHistoryService obtained from the bundle context.
static ConfigurationService getConfigurationService()
          Returns the ConfigurationService obtained from the bundle context.
static TreeContactList getContactList()
          Returns the component used to show the contact list.
static MetaContactListService getContactListService()
          Returns the MetaContactListService obtained from the bundle context.
static List<ContactSourceService> getContactSources()
          Returns a list of all registered contact sources.
static DesktopService getDesktopService()
          Returns the DesktopService obtained from the bundle context.
static FileAccessService getFileAccessService()
          Returns the FileAccessService obtained from the bundle context.
static KeybindingsService getKeybindingsService()
          Returns the KeybindingsService obtained from the bundle context.
static MediaService getMediaService()
          Returns an instance of the MediaService obtained from the bundle context.
static MetaHistoryService getMetaHistoryService()
          Returns the MetaHistoryService obtained from the bundle context.
static List<ProtocolProviderService> getOpSetRegisteredProviders(Class<? extends OperationSet> opSet, ProtocolProviderService preferredProvider, String preferredProtocolName)
          Returns a list of all registered protocol providers that could be used for the operation given by the operation set.
static PhoneNumberI18nService getPhoneNumberService()
          Returns the PhoneNumberI18nService obtained from the bundle context.
static ProtocolProviderService getPreferredAccount()
          Returns the preferred account if there's one.
static Map<Object,ProtocolProviderFactory> getProtocolProviderFactories()
          Returns all ProtocolProviderFactorys obtained from the bundle context.
static ProtocolProviderFactory getProtocolProviderFactory(ProtocolProviderService protocolProvider)
          Returns a ProtocolProviderFactory for a given protocol provider.
static ProtocolProviderFactory getProtocolProviderFactory(String protocolName)
          Returns a ProtocolProviderFactory for a given protocol provider.
static ProtocolProviderService getRegisteredProviderForAccount(AccountID accountID)
          Returns the ProtocolProviderService corresponding to the given account identifier that is registered in the given factory
static List<ProtocolProviderService> getRegisteredProviders(Class<? extends OperationSet> opSetClass)
          Returns a list of all currently registered providers, which support the given operationSetClass.
static List<ProtocolProviderService> getRegisteredProviders(String protocolName, Class<? extends OperationSet> operationSetClass)
          Returns a list of all currently registered telephony providers for the given protocol name.
static Map<String,ReplacementService> getReplacementSources()
          Returns all ReplacementServices obtained from the bundle context.
static ResourceManagementService getResources()
          Returns the ResourceManagementService, through which we will access all resources.
static SecurityAuthority getSecurityAuthority()
          Returns the SecurityAuthority implementation registered to handle security authority events.
static SecurityAuthority getSecurityAuthority(String protocolName)
          Returns the SecurityAuthority implementation registered to handle security authority events.
static SmiliesReplacementService getSmiliesReplacementSource()
          Returns the SmiliesReplacementService obtained from the bundle context.
static SystrayService getSystrayService()
          Returns the SystrayService obtained from the bundle context.
static UIServiceImpl getUIService()
          Returns the current implementation of the UIService.
static void setContactList(TreeContactList list)
          Sets the contactList component currently used to show the contact list.
 void start(org.osgi.framework.BundleContext bContext)
          Called when this bundle is started.
 void stop(org.osgi.framework.BundleContext bContext)
          Called when this bundle is stopped so the Framework can perform the bundle-specific activities necessary to stop the bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bundleContext

public static org.osgi.framework.BundleContext bundleContext
OSGi bundle context.


isStarted

public static boolean isStarted
Indicates if this bundle has been started.

Constructor Detail

GuiActivator

public GuiActivator()
Method Detail

start

public void start(org.osgi.framework.BundleContext bContext)
           throws Exception
Called when this bundle is started.

Specified by:
start in interface org.osgi.framework.BundleActivator
Parameters:
bContext - The execution context of the bundle being started.
Throws:
Exception - if the bundle is not correctly started

stop

public void stop(org.osgi.framework.BundleContext bContext)
          throws Exception
Called when this bundle is stopped so the Framework can perform the bundle-specific activities necessary to stop the bundle.

Specified by:
stop in interface org.osgi.framework.BundleActivator
Parameters:
bContext - The execution context of the bundle being stopped.
Throws:
Exception - If this method throws an exception, the bundle is still marked as stopped, and the Framework will remove the bundle's listeners, unregister all services registered by the bundle, and release all services used by the bundle.

getProtocolProviderFactories

public static Map<Object,ProtocolProviderFactory> getProtocolProviderFactories()
Returns all ProtocolProviderFactorys obtained from the bundle context.

Returns:
all ProtocolProviderFactorys obtained from the bundle context

getProtocolProviderFactory

public static ProtocolProviderFactory getProtocolProviderFactory(ProtocolProviderService protocolProvider)
Returns a ProtocolProviderFactory for a given protocol provider.

Parameters:
protocolProvider - the ProtocolProviderService, which factory we're looking for
Returns:
a ProtocolProviderFactory for a given protocol provider

getProtocolProviderFactory

public static ProtocolProviderFactory getProtocolProviderFactory(String protocolName)
Returns a ProtocolProviderFactory for a given protocol provider.

Parameters:
protocolName - the name of the protocol
Returns:
a ProtocolProviderFactory for a given protocol provider

getRegisteredProviderForAccount

public static ProtocolProviderService getRegisteredProviderForAccount(AccountID accountID)
Returns the ProtocolProviderService corresponding to the given account identifier that is registered in the given factory

Parameters:
accountID - the identifier of the account
Returns:
the ProtocolProviderService corresponding to the given account identifier that is registered in the given factory

getRegisteredProviders

public static List<ProtocolProviderService> getRegisteredProviders(String protocolName,
                                                                   Class<? extends OperationSet> operationSetClass)
Returns a list of all currently registered telephony providers for the given protocol name.

Parameters:
protocolName - the protocol name
operationSetClass - the operation set class for which we're looking for providers
Returns:
a list of all currently registered providers for the given protocolName and supporting the given operationSetClass

getRegisteredProviders

public static List<ProtocolProviderService> getRegisteredProviders(Class<? extends OperationSet> opSetClass)
Returns a list of all currently registered providers, which support the given operationSetClass.

Parameters:
opSetClass - the operation set class for which we're looking for providers
Returns:
a list of all currently registered providers, which support the given operationSetClass

getOpSetRegisteredProviders

public static List<ProtocolProviderService> getOpSetRegisteredProviders(Class<? extends OperationSet> opSet,
                                                                        ProtocolProviderService preferredProvider,
                                                                        String preferredProtocolName)
Returns a list of all registered protocol providers that could be used for the operation given by the operation set. Prefers the given preferred protocol provider and preferred protocol name if they're available and registered.

Parameters:
opSet -
preferredProvider -
preferredProtocolName -
Returns:
a list of all registered protocol providers that could be used for the operation given by the operation set

getAccountManager

public static AccountManager getAccountManager()
Returns the AccountManager obtained from the bundle context.

Returns:
the AccountManager obtained from the bundle context

getConfigurationService

public static ConfigurationService getConfigurationService()
Returns the ConfigurationService obtained from the bundle context.

Returns:
the ConfigurationService obtained from the bundle context

getMetaHistoryService

public static MetaHistoryService getMetaHistoryService()
Returns the MetaHistoryService obtained from the bundle context.

Returns:
the MetaHistoryService obtained from the bundle context

getContactListService

public static MetaContactListService getContactListService()
Returns the MetaContactListService obtained from the bundle context.

Returns:
the MetaContactListService obtained from the bundle context

getCallHistoryService

public static CallHistoryService getCallHistoryService()
Returns the CallHistoryService obtained from the bundle context.

Returns:
the CallHistoryService obtained from the bundle context

getAudioNotifier

public static AudioNotifierService getAudioNotifier()
Returns the AudioNotifierService obtained from the bundle context.

Returns:
the AudioNotifierService obtained from the bundle context

getBrowserLauncher

public static BrowserLauncherService getBrowserLauncher()
Returns the BrowserLauncherService obtained from the bundle context.

Returns:
the BrowserLauncherService obtained from the bundle context

getUIService

public static UIServiceImpl getUIService()
Returns the current implementation of the UIService.

Returns:
the current implementation of the UIService

getSystrayService

public static SystrayService getSystrayService()
Returns the SystrayService obtained from the bundle context.

Returns:
the SystrayService obtained from the bundle context

getKeybindingsService

public static KeybindingsService getKeybindingsService()
Returns the KeybindingsService obtained from the bundle context.

Returns:
the KeybindingsService obtained from the bundle context

getResources

public static ResourceManagementService getResources()
Returns the ResourceManagementService, through which we will access all resources.

Returns:
the ResourceManagementService, through which we will access all resources.

getFileAccessService

public static FileAccessService getFileAccessService()
Returns the FileAccessService obtained from the bundle context.

Returns:
the FileAccessService obtained from the bundle context

getDesktopService

public static DesktopService getDesktopService()
Returns the DesktopService obtained from the bundle context.

Returns:
the DesktopService obtained from the bundle context

getMediaService

public static MediaService getMediaService()
Returns an instance of the MediaService obtained from the bundle context.

Returns:
an instance of the MediaService obtained from the bundle context

getContactSources

public static List<ContactSourceService> getContactSources()
Returns a list of all registered contact sources.

Returns:
a list of all registered contact sources

getReplacementSources

public static Map<String,ReplacementService> getReplacementSources()
Returns all ReplacementServices obtained from the bundle context.

Returns:
all ReplacementService implementation obtained from the bundle context

getSmiliesReplacementSource

public static SmiliesReplacementService getSmiliesReplacementSource()
Returns the SmiliesReplacementService obtained from the bundle context.

Returns:
the SmiliesReplacementService implementation obtained from the bundle context

getPhoneNumberService

public static PhoneNumberI18nService getPhoneNumberService()
Returns the PhoneNumberI18nService obtained from the bundle context.

Returns:
the PhoneNumberI18nService implementation obtained from the bundle context

getSecurityAuthority

public static SecurityAuthority getSecurityAuthority()
Returns the SecurityAuthority implementation registered to handle security authority events.

Returns:
the SecurityAuthority implementation obtained from the bundle context

getSecurityAuthority

public static SecurityAuthority getSecurityAuthority(String protocolName)
Returns the SecurityAuthority implementation registered to handle security authority events.

Parameters:
protocolName - protocol name
Returns:
the SecurityAuthority implementation obtained from the bundle context

setContactList

public static void setContactList(TreeContactList list)
Sets the contactList component currently used to show the contact list.

Parameters:
list - the contact list object to set

getContactList

public static TreeContactList getContactList()
Returns the component used to show the contact list.

Returns:
the component used to show the contact list

getAccounts

public static Object[] getAccounts(List<ProtocolProviderService> providers)
Returns the list of wrapped protocol providers.

Parameters:
providers - the list of protocol providers
Returns:
an array of wrapped protocol providers

getPreferredAccount

public static ProtocolProviderService getPreferredAccount()
Returns the preferred account if there's one.

Returns:
the ProtocolProviderService corresponding to the preferred account

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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