de.unihalle.informatik.Alida.version
Class ALDVersionProviderFactory

java.lang.Object
  extended by de.unihalle.informatik.Alida.version.ALDVersionProviderFactory

public class ALDVersionProviderFactory
extends Object

Factory for dynamic instantiation of version providers at runtime.

Here JVM properties are evaluated to dynamically configure the way, how Alida handles software versions. Usually there are different possibilities from where to get software version information. The probably most popular way is to query software repositories like CVS, SVN or Git. However, other options can be imagined as well.

Alida supports dynamic configuration of the version data handling. This factory instantiates a concrete version provider based on the environment property alida_versionprovider_class. This property should contain the name of a class extending base class ALDVersionProvider. The generated instance of this class will be used for all software version requests triggered during Alida operator invocations.

Author:
moeller

Constructor Summary
ALDVersionProviderFactory()
           
 
Method Summary
protected static String getClassName()
          Returns version provider class according to environment configuration.
static ALDVersionProvider getProviderInstance()
          Returns a reference to the currently selected provider object.
static ALDVersionProvider getProviderInstance(String providerClass)
          Returns a reference to the provider object of the specified class.
static boolean isClassNameSpecified()
          Returns true if the factory can be properly configured.
static void setProviderClass(String pclass)
          Explicitly request a certain class from the code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ALDVersionProviderFactory

public ALDVersionProviderFactory()
Method Detail

getProviderInstance

public static ALDVersionProvider getProviderInstance()
Returns a reference to the currently selected provider object.

The provider class can be specified by environment properties. This method guarantees to never return null.

Returns:
Instance of previously configured version provider.

getProviderInstance

public static ALDVersionProvider getProviderInstance(String providerClass)
Returns a reference to the provider object of the specified class.

Parameters:
providerClass - Name of desired provider class.
Returns:
Corresponding provider object.

setProviderClass

public static void setProviderClass(String pclass)
Explicitly request a certain class from the code.

Note: this setting overrides potentially existing environment settings!

Parameters:
pclass - Desired class for provider objects.

getClassName

protected static String getClassName()
Returns version provider class according to environment configuration.


isClassNameSpecified

public static boolean isClassNameSpecified()
Returns true if the factory can be properly configured.



Copyright © 2010–2014 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.