com.jp.protection.pub.pro.integration
Class LicensingFacadeProvider

java.lang.Object
  extended by com.jp.protection.pub.pro.integration.LicensingFacadeProvider
Direct Known Subclasses:
LicensingFacadeWS.Provider, LocalLicensingFacade.Provider

public abstract class LicensingFacadeProvider
extends java.lang.Object

This class is responsible of providing the LicensingFacade instances. Typical code would look like: LicensingFacade licensingFacade = LicensingFacadeProvider.getInstance("WS").getLicensingFacade();


Field Summary
protected  boolean fDefault
           
protected static java.util.HashMap fProviderMap
           
 
Constructor Summary
LicensingFacadeProvider()
           
 
Method Summary
static void addProvider(java.lang.String aName, LicensingFacadeProvider aProvider)
          Registers provider implementation for the name specified
static LicensingFacadeProvider getInstance()
          Returns an instance of LicensingFacadeProvider
static LicensingFacadeProvider getInstance(java.lang.String aName)
          Returns an instance of the LicensingFacadeProvider with the specified name
abstract  LicensingFacade getLicensingFacade()
           
static boolean hasProviders()
          Test whether there are any available providers
 boolean isDefault()
          Returns whether provider is default
static void removeProvider(java.lang.String aName)
          Removes provider implementation with the specified name
 void setDefault(boolean aDefault)
          Specifies that provider should be default
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fDefault

protected boolean fDefault

fProviderMap

protected static final java.util.HashMap fProviderMap
Constructor Detail

LicensingFacadeProvider

public LicensingFacadeProvider()
Method Detail

getLicensingFacade

public abstract LicensingFacade getLicensingFacade()

isDefault

public boolean isDefault()
Returns whether provider is default

Returns:
true if provider is default; false otherwise

setDefault

public void setDefault(boolean aDefault)
Specifies that provider should be default

Parameters:
aDefault - true if provider should be default; false otherwise

getInstance

public static final LicensingFacadeProvider getInstance()
Returns an instance of LicensingFacadeProvider

Returns:
an instance of LicensingFacadeProvider

getInstance

public static final LicensingFacadeProvider getInstance(java.lang.String aName)
Returns an instance of the LicensingFacadeProvider with the specified name

Parameters:
aName - name of provider to return
Returns:
an instance of the LicensingFacadeProvider

hasProviders

public static boolean hasProviders()
Test whether there are any available providers

Returns:
true if there at least one registered provider; false otherwise

addProvider

public static final void addProvider(java.lang.String aName,
                                     LicensingFacadeProvider aProvider)
Registers provider implementation for the name specified

Parameters:
aName - name of provider to register
aProvider - an instance of provider

removeProvider

public static final void removeProvider(java.lang.String aName)
Removes provider implementation with the specified name

Parameters:
aName - name of provider to return