org.faktorips.runtime.productdataprovider
Class AbstractProductDataProvider

java.lang.Object
  extended by org.faktorips.runtime.productdataprovider.AbstractProductDataProvider
All Implemented Interfaces:
IProductDataProvider
Direct Known Subclasses:
ClassLoaderProductDataProvider

public abstract class AbstractProductDataProvider
extends Object
implements IProductDataProvider

This is the abstract implementation for product data providers. For a description of product data providers @see IProductDataProvider

Author:
dirmeier

Field Summary
protected static String MODIFIED_EXCEPTION_MESSAGE
           
 
Constructor Summary
AbstractProductDataProvider(IVersionChecker versionChecker)
          This constructor needs a IVersionChecker that is used to verify the compatibility of the product data versions
 
Method Summary
abstract  String getBaseVersion()
          Getting the really actual version of the product data.
protected  DocumentBuilder getDocumentBuilder()
          Getting the thread local instance of DocumentBuilder
 IVersionChecker getVersionChecker()
           
 boolean isCompatibleToBaseVersion()
          Return true if the version is compatible to the base version of this IProductDataProvider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.faktorips.runtime.productdataprovider.IProductDataProvider
getEnumContentAsStream, getProductCmptData, getProductCmptGenerationData, getTableContentAsStream, getTestcaseElement, getToc, getTocEntryData, getVersion
 

Field Detail

MODIFIED_EXCEPTION_MESSAGE

protected static final String MODIFIED_EXCEPTION_MESSAGE
See Also:
Constant Field Values
Constructor Detail

AbstractProductDataProvider

public AbstractProductDataProvider(IVersionChecker versionChecker)
This constructor needs a IVersionChecker that is used to verify the compatibility of the product data versions

Parameters:
versionChecker - the verison checker to check the product data version
Method Detail

getDocumentBuilder

protected DocumentBuilder getDocumentBuilder()
Getting the thread local instance of DocumentBuilder

Returns:
a thread local instance of DocumentBuilder

isCompatibleToBaseVersion

public boolean isCompatibleToBaseVersion()
Description copied from interface: IProductDataProvider
Return true if the version is compatible to the base version of this IProductDataProvider. The base version is the really actual version of the product data and should not be cached.

Specified by:
isCompatibleToBaseVersion in interface IProductDataProvider
Returns:
true if version is compatible

getBaseVersion

public abstract String getBaseVersion()
Getting the really actual version of the product data. That means to look in the file, asking your service or your database or what ever is your product data base.

Returns:
the actual version of the product data

getVersionChecker

public IVersionChecker getVersionChecker()
Returns:
Returns the versionChecker.


Copyright © 2015. All rights reserved.