Interface IProductDataProvider
-
- All Known Implementing Classes:
AbstractProductDataProvider,ClassLoaderProductDataProvider
public interface IProductDataProviderAIProductDataProviderprovides the content of product data identified by its toc entry. To get the table of contents you have to call 'loadToc'. The product data could change over time. If the user tries to request data from product data provider that has changed since creation aDataModifiedExceptionis thrown. To get the actual product data the user have to create a newIProductDataProvider.- Author:
- dirmeier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.InputStreamgetEnumContentAsStream(EnumContentTocEntry tocEntry)Getting the input stream of enum content for given tocEntry.org.w3c.dom.ElementgetProductCmptData(ProductCmptTocEntry tocEntry)Getting the product component data element for given tocEntry.org.w3c.dom.ElementgetProductCmptGenerationData(GenerationTocEntry tocEntry)Getting the product component generation data element for given tocEntry.java.io.InputStreamgetTableContentAsStream(TableContentTocEntry tocEntry)Getting the input stream of table content for given tocEntry.org.w3c.dom.ElementgetTestcaseElement(TestCaseTocEntry tocEntry)Getting the test case data element for given tocEntry.IReadonlyTableOfContentsgetToc()Getting the toc in the product data provider and returns it.<T> org.w3c.dom.ElementgetTocEntryData(CustomTocEntryObject<T> tocEntry)Getting the data element for the given tocEntry.java.lang.StringgetVersion()Getting the version of the product data provider.booleanisCompatibleToBaseVersion()Return true if the version is compatible to the base version of thisIProductDataProvider.
-
-
-
Method Detail
-
getToc
IReadonlyTableOfContents getToc()
Getting the toc in the product data provider and returns it. Calling the method twice should not reload the table of content.- Returns:
- The loaded toc
-
getProductCmptData
org.w3c.dom.Element getProductCmptData(ProductCmptTocEntry tocEntry) throws DataModifiedException
Getting the product component data element for given tocEntry. If the toc has been modified this method throws aDataModifiedException. To update the modification time you have to reload the toc.- Parameters:
tocEntry- The toc entry for the product component you want to load- Returns:
- the xml element of the requested product component
- Throws:
DataModifiedException- when toc data was modified
-
getProductCmptGenerationData
org.w3c.dom.Element getProductCmptGenerationData(GenerationTocEntry tocEntry) throws DataModifiedException
Getting the product component generation data element for given tocEntry. If the toc has been modified this method throws aDataModifiedException. To update the modification time you have to reload the toc.- Parameters:
tocEntry- The toc entry for the product component generation you want to load- Returns:
- the xml element of the requested product component generation
- Throws:
DataModifiedException- when toc data was modified
-
getTestcaseElement
org.w3c.dom.Element getTestcaseElement(TestCaseTocEntry tocEntry) throws DataModifiedException
Getting the test case data element for given tocEntry. If the toc has been modified this method throws aDataModifiedException. To update the modification time you have to reload the toc.- Parameters:
tocEntry- The toc entry for the test case element you want to load- Returns:
- the xml element of the requested test case element
- Throws:
DataModifiedException- when toc data was modified
-
getTableContentAsStream
java.io.InputStream getTableContentAsStream(TableContentTocEntry tocEntry) throws DataModifiedException
Getting the input stream of table content for given tocEntry. If the toc has been modified this method throws aDataModifiedException. To update the modification time you have to reload the toc.- Parameters:
tocEntry- The toc entry for the table content you want to load- Returns:
- the input stream of the requested table content
- Throws:
DataModifiedException- when toc data was modified
-
getEnumContentAsStream
java.io.InputStream getEnumContentAsStream(EnumContentTocEntry tocEntry) throws DataModifiedException
Getting the input stream of enum content for given tocEntry. If the toc has been modified this method throws aDataModifiedException. To update the modification time you have to reload the toc.- Parameters:
tocEntry- The toc entry for the enum content you want to load- Returns:
- the input stream of the requested enum content
- Throws:
DataModifiedException- when toc data was modified
-
getVersion
java.lang.String getVersion()
Getting the version of the product data provider. This is the version of the product data when thisIProductDataProviderwas created. The version should be final. Once product data has changed thisIProductDataProvidergetting useless and a new one should be created.- Returns:
- the version of the product data provider
-
isCompatibleToBaseVersion
boolean isCompatibleToBaseVersion()
Return 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.- Returns:
- true if version is compatible
-
getTocEntryData
<T> org.w3c.dom.Element getTocEntryData(CustomTocEntryObject<T> tocEntry) throws DataModifiedException
Getting the data element for the given tocEntry. If the toc has been modified this method throws aDataModifiedException. To update the modification time you have to reload the toc.- Type Parameters:
T- the class of the runtime object you want to load- Parameters:
tocEntry- The toc entry for the runtime object of class T you want to load- Returns:
- the xml element of the requested object
- Throws:
DataModifiedException- when toc data was modified
-
-