Class AbstractProductDataProvider
- java.lang.Object
-
- org.faktorips.runtime.productdataprovider.AbstractProductDataProvider
-
- All Implemented Interfaces:
IProductDataProvider
- Direct Known Subclasses:
ClassLoaderProductDataProvider
public abstract class AbstractProductDataProvider extends java.lang.Object implements IProductDataProvider
This is the abstract implementation for product data providers. For a description of product data providers @seeIProductDataProvider- Author:
- dirmeier
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringMODIFIED_EXCEPTION_MESSAGE
-
Constructor Summary
Constructors Constructor Description AbstractProductDataProvider(IVersionChecker versionChecker)This constructor needs aIVersionCheckerthat is used to verify the compatibility of the product data versions
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.StringgetBaseVersion()Getting the really actual version of the product data.protected javax.xml.parsers.DocumentBuildergetDocumentBuilder()Getting the thread local instance ofDocumentBuilderIVersionCheckergetVersionChecker()booleanisCompatibleToBaseVersion()Return true if the version is compatible to the base version of thisIProductDataProvider.-
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 java.lang.String MODIFIED_EXCEPTION_MESSAGE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractProductDataProvider
public AbstractProductDataProvider(IVersionChecker versionChecker)
This constructor needs aIVersionCheckerthat 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 javax.xml.parsers.DocumentBuilder getDocumentBuilder()
Getting the thread local instance ofDocumentBuilder- Returns:
- a thread local instance of
DocumentBuilder
-
isCompatibleToBaseVersion
public boolean isCompatibleToBaseVersion()
Description copied from interface:IProductDataProviderReturn true if the version is compatible to the base version of thisIProductDataProvider. The base version is the really actual version of the product data and should not be cached.- Specified by:
isCompatibleToBaseVersionin interfaceIProductDataProvider- Returns:
- true if version is compatible
-
getBaseVersion
public abstract java.lang.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.
-
-