|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.faktorips.runtime.internal.AbstractRuntimeRepository
org.faktorips.runtime.internal.AbstractCachingRuntimeRepository
org.faktorips.runtime.internal.AbstractTocBasedRuntimeRepository
org.faktorips.runtime.internal.AbstractClassLoadingRuntimeRepository
org.faktorips.runtime.productdataprovider.DetachedContentRuntimeRepository
public class DetachedContentRuntimeRepository
/** The DetachedContentRuntimeRepository is a runtime repository that is able to parse
the product data provided from a IProductDataProvider and instantiates the necessary
objects.
Because the data from an IProductDataProvider could change over time the
DetachedContentRuntimeRepository have to look for modifications and reinstantiates the
classes if necessary. Once product data has changed, this repository only provides the already
cached data. If the user requests new data it gets a DataModifiedRuntimeException.
This implements a optimistic locking mechanism. That means that nothing happens until the
requested data is invalid. Once the product data has changed, this repository could still get
cached data. That means every request that only calls data from the cache would continue without
errors. To guarantee that a client does not work on out-dated data it has to get the actual
DetachedContentRuntimeRepository from DetachedContentRuntimeRepositoryManager for
every new request.
| Method Summary | ||
|---|---|---|
protected
|
getDocumentElement(CustomTocEntryObject<T> tocEntry)
This method returns the xml element of the product component identified by the tocEntry |
|
protected Element |
getDocumentElement(GenerationTocEntry tocEntry)
This method returns the xml element of the product component generation identified by the tocEntry |
|
protected Element |
getDocumentElement(ProductCmptTocEntry tocEntry)
This method returns the xml element of the product component identified by the tocEntry |
|
protected Element |
getDocumentElement(TestCaseTocEntry tocEntry)
This method returns the xml element of the test case identified by the tocEntry |
|
IFormulaEvaluatorFactory |
getFormulaEvaluatorFactory()
Getting the IFormulaEvaluatorFactory set in the constructor. |
|
protected String |
getProductComponentGenerationImplClass(GenerationTocEntry tocEntry)
This method returns the name of the product component generation implementation class identified by the tocEntry. |
|
String |
getProductDataVersion()
Returning the actual version set in the product data provider. |
|
protected InputStream |
getXmlAsStream(EnumContentTocEntry tocEntry)
Returns the XML data for the specified tocEntry as InputStream |
|
protected InputStream |
getXmlAsStream(TableContentTocEntry tocEntry)
Returns the XML data for the specified tocEntry as InputStream |
|
boolean |
isModifiable()
Returns true if the repository's content is modifiable. |
|
protected IReadonlyTableOfContents |
loadTableOfContents()
|
|
| Methods inherited from class org.faktorips.runtime.internal.AbstractClassLoadingRuntimeRepository |
|---|
createCustomObject, createEnumValues, createProductCmpt, createProductCmptGeneration, createProductComponentGenerationInstance, createProductComponentInstance, createTable, createTestCase, getAllProductComponentsInternal, getClassLoader, getProductVariantHelper, initClRepositoryObject |
| Methods inherited from class org.faktorips.runtime.internal.AbstractCachingRuntimeRepository |
|---|
getAllInternalEnumXmlAdapters, getCustomRuntimeObjectInternal, getEnumValuesInternal, getProductComponentGenerationInternal, getProductComponentInternal, getTableInternal, initCaches |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
protected IReadonlyTableOfContents loadTableOfContents()
loadTableOfContents in class AbstractTocBasedRuntimeRepositorypublic IFormulaEvaluatorFactory getFormulaEvaluatorFactory()
IFormulaEvaluatorFactory set in the constructor. This could be null if
formula should not be evaluated on the fly. The repository would load the classes containing
the compiled formula.
getFormulaEvaluatorFactory in interface IRuntimeRepositorygetFormulaEvaluatorFactory in class AbstractRuntimeRepositoryIFormulaEvaluatorFactory of this repository or null if formula should not
be evaluatedprotected Element getDocumentElement(ProductCmptTocEntry tocEntry)
AbstractClassLoadingRuntimeRepository
getDocumentElement in class AbstractClassLoadingRuntimeRepositoryprotected Element getDocumentElement(GenerationTocEntry tocEntry)
AbstractClassLoadingRuntimeRepository
getDocumentElement in class AbstractClassLoadingRuntimeRepositoryprotected Element getDocumentElement(TestCaseTocEntry tocEntry)
AbstractClassLoadingRuntimeRepository
getDocumentElement in class AbstractClassLoadingRuntimeRepositoryprotected String getProductComponentGenerationImplClass(GenerationTocEntry tocEntry)
AbstractClassLoadingRuntimeRepository
getProductComponentGenerationImplClass in class AbstractClassLoadingRuntimeRepositoryprotected InputStream getXmlAsStream(EnumContentTocEntry tocEntry)
AbstractClassLoadingRuntimeRepositoryInputStream
getXmlAsStream in class AbstractClassLoadingRuntimeRepositorytocEntry - Specifying the requested EnumContent
protected InputStream getXmlAsStream(TableContentTocEntry tocEntry)
AbstractClassLoadingRuntimeRepositoryInputStream
getXmlAsStream in class AbstractClassLoadingRuntimeRepositorytocEntry - Specifying the requested TableContent
public String getProductDataVersion()
getProductDataVersion in interface IDetachedContentRuntimeRepositoryIProductDataProvider.getVersion()public boolean isModifiable()
IRuntimeRepositorytrue if the repository's content is modifiable. This feature is mainly
targeted for writing test cases that need to setup a repository with a test specific content
programatically. Returns false otherwise.
isModifiable in interface IRuntimeRepositoryprotected <T> Element getDocumentElement(CustomTocEntryObject<T> tocEntry)
AbstractClassLoadingRuntimeRepository
getDocumentElement in class AbstractClassLoadingRuntimeRepository
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||