public class InMemoryRuntimeRepository extends AbstractRuntimeRepository
| Constructor and Description |
|---|
InMemoryRuntimeRepository() |
InMemoryRuntimeRepository(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEnumXmlAdapter(XmlAdapter<?,?> enumXmlAdapter)
Adds an
XmlAdapter for a Faktor-IPS enumeration that defers its content to a enumeration
content to this repository. |
protected List<XmlAdapter<?,?>> |
getAllInternalEnumXmlAdapters(IRuntimeRepository repository)
Returns all enumeration XmlAdapters available in this repository that generated by
Faktor-IPS.
|
protected void |
getAllIpsTestCases(List<IpsTest2> result,
IRuntimeRepository runtimeRepository)
Same as
AbstractRuntimeRepository.getAllIpsTestCases(IRuntimeRepository) but searches only in this repository
and not the ones, this repository depends on. |
protected void |
getAllModelTypeImplementationClasses(Set<String> result)
Same as getAllModelTypeImplementationClasses() but searches only in this repository and not
the ones, this repository depends on.
|
void |
getAllProductComponentIds(List<String> result)
Same as getAllProductComponentIds() but searches only in this repository and not the ones,
this repository depends on.
|
void |
getAllProductComponents(List<IProductComponent> result)
Same as getAllProductComponents() but searches only in this repository and not the ones, this
repository depends on.
|
void |
getAllProductComponents(String kindId,
List<IProductComponent> result)
Same as getAllProductComponent(String kindId) but searches only in this repository and not
the ones, this repository depends on.
|
protected void |
getAllTables(List<ITable<?>> result)
Same as
getAllTables() but searches only in this repository and not the ones,
this repository depends on. |
protected <T> T |
getCustomRuntimeObjectInternal(Class<T> type,
String id)
Same as
AbstractRuntimeRepository.getCustomRuntimeObject(Class, String) but searches only in this repository
and not the ones this repository depends on. |
protected <T> List<T> |
getEnumValuesInternal(Class<T> clazz)
Returns the list of enumeration values of the enumeration type that is identified by its
class which is provided to it.
|
protected IpsTestCaseBase |
getIpsTestCaseInternal(String qName,
IRuntimeRepository runtimeRepository)
Same as
AbstractRuntimeRepository.getIpsTestCase(String, IRuntimeRepository) but searches only in this
repository and not the ones, this repository depends on. |
protected void |
getIpsTestCasesStartingWith(String qNamePrefix,
List<IpsTest2> result,
IRuntimeRepository runtimeRepository)
Gets all ips test cases starting with the given qualified name prefix.
|
protected IProductComponentGeneration |
getLatestProductComponentGenerationInternal(IProductComponent productCmpt) |
protected IProductComponentGeneration |
getNextProductComponentGenerationInternal(IProductComponentGeneration generation) |
protected int |
getNumberOfProductComponentGenerationsInternal(IProductComponent productCmpt) |
protected IProductComponentGeneration |
getPreviousProductComponentGenerationInternal(IProductComponentGeneration generation) |
protected IProductComponentGeneration |
getProductComponentGenerationInternal(String productCmptId,
Calendar effectiveDate)
Same as getProductComponentGeneration(String id, Calendar effectiveDate) but searches only in
this repository and not the ones, this repository depends on.
|
void |
getProductComponentGenerations(IProductComponent productCmpt,
List<IProductComponentGeneration> result)
Same as getProductComponentGenerations() but searches only in this repository and not the
ones, this repository depends on.
|
protected IProductComponent |
getProductComponentInternal(String id)
Same as getProductComponent(String id) but searches only in this repository and not the ones,
this repository depends on.
|
protected IProductComponent |
getProductComponentInternal(String kindId,
String versionId)
Same as getProductComponent(String kindId, String versionId) but searches only in this
repository and not the ones, this repository depends on.
|
protected <T extends ITable<?>> |
getTableInternal(Class<T> tableClass)
InMemoryRepository also searches for tables that are instances of subclasses of the given
tableClass.
|
protected ITable<?> |
getTableInternal(String qualifiedTableName)
Same as
AbstractRuntimeRepository.getTable(String)) but searches only in this repository and not the ones,
this repository depends on. |
void |
initialize()
Nothing to do for the in memory repository.
|
boolean |
isModifiable()
Returns
true if the repository's content is modifiable. |
<T extends IRuntimeObject> |
putCustomRuntimeObject(Class<T> type,
String ipsObjectQualifiedName,
T runtimeObject)
Puts the runtimeObject into the repository.
|
<T> void |
putEnumValues(Class<T> enumType,
List<T> enumValues)
Puts the given enum values in the repository replacing all existing values for the given
enumType.
|
void |
putIpsTestCase(IpsTestCaseBase test)
Puts the test case into the repository.
|
void |
putProductCmptGeneration(IProductComponentGeneration generation)
Puts the product component generation and it's product componet into the repository.
|
void |
putProductComponent(IProductComponent productCmpt)
Puts the product component into the repository.
|
void |
putTable(ITable<?> table)
Puts the table into the repository.
|
void |
putTable(ITable<?> table,
String qName)
Puts the table with the indicated name into the repository with .
|
addDirectlyReferencedRepository, addEnumValueLookupService, getAllIpsTestCases, getAllModelTypeImplementationClasses, getAllProductComponentIds, getAllProductComponents, getAllProductComponents, getAllProductComponents, getAllProductComponentsInternal, getAllReferencedRepositories, getAllTables, getClassLoader, getCustomRuntimeObject, getDirectlyReferencedRepositories, getEnumValue, getEnumValue, getEnumValueLookupService, getEnumValues, getEnumValuesDefinedInType, getExistingEnumValue, getExistingProductComponent, getExistingProductComponentGeneration, getFormulaEvaluatorFactory, getIpsTest, getIpsTest, getIpsTestCase, getIpsTestCase, getIpsTestCasesStartingWith, getIpsTestSuite, getIpsTestSuite, getLatestProductComponentGeneration, getModelType, getModelType, getModelType, getName, getNextProductComponentGeneration, getNumberOfProductComponentGenerations, getPreviousProductComponentGeneration, getProductComponent, getProductComponent, getProductComponentGeneration, getProductComponentGenerations, getRuntimeRepositoryLookup, getTable, getTable, newJAXBContext, newJAXBContext, removeEnumValueLookupService, setFormulaEvaluatorFactory, setRuntimeRepositoryLookup, toStringpublic InMemoryRuntimeRepository()
public InMemoryRuntimeRepository(String name)
protected IProductComponent getProductComponentInternal(String id)
AbstractRuntimeRepositorygetProductComponentInternal in class AbstractRuntimeRepositoryprotected IProductComponent getProductComponentInternal(String kindId, String versionId)
AbstractRuntimeRepositorygetProductComponentInternal in class AbstractRuntimeRepositorypublic void getAllProductComponents(String kindId, List<IProductComponent> result)
AbstractRuntimeRepositorygetAllProductComponents in class AbstractRuntimeRepositorypublic void getProductComponentGenerations(IProductComponent productCmpt, List<IProductComponentGeneration> result)
AbstractRuntimeRepositorygetProductComponentGenerations in class AbstractRuntimeRepositorypublic void initialize()
protected void getAllTables(List<ITable<?>> result)
AbstractRuntimeRepositorygetAllTables() but searches only in this repository and not the ones,
this repository depends on. Adds the tables found to the given result list.getAllTables in class AbstractRuntimeRepositoryprotected <T extends ITable<?>> T getTableInternal(Class<T> tableClass)
Same as AbstractRuntimeRepository.getTable(Class) but searches only in this repository and not the ones, this
repository depends on.
getTableInternal in class AbstractRuntimeRepositorypublic void putTable(ITable<?> table)
NullPointerException - if table is null.public void putTable(ITable<?> table, String qName)
NullPointerException - if table or qName is null.public <T> void putEnumValues(Class<T> enumType, List<T> enumValues)
enumType - The Java class representing the enumeration type.enumValues - The value of the enumeration type as list.protected ITable<?> getTableInternal(String qualifiedTableName)
AbstractRuntimeRepositoryAbstractRuntimeRepository.getTable(String)) but searches only in this repository and not the ones,
this repository depends on.getTableInternal in class AbstractRuntimeRepositorypublic void getAllProductComponents(List<IProductComponent> result)
AbstractRuntimeRepositorygetAllProductComponents in class AbstractRuntimeRepositorypublic void getAllProductComponentIds(List<String> result)
AbstractRuntimeRepositorygetAllProductComponentIds in class AbstractRuntimeRepositorypublic 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
programmatically. Returns false otherwise.public void putProductComponent(IProductComponent productCmpt)
IllegalRepositoryModificationException - if this repository does not allows to modifyNullPointerException - if cmpt is null it's contents.IRuntimeRepository.isModifiable()protected IProductComponentGeneration getProductComponentGenerationInternal(String productCmptId, Calendar effectiveDate)
AbstractRuntimeRepositorygetProductComponentGenerationInternal in class AbstractRuntimeRepositorypublic void putProductCmptGeneration(IProductComponentGeneration generation)
IllegalRepositoryModificationException - if this repository does not allows to modify it's
contents.NullPointerException - if generation is nullIRuntimeRepository.isModifiable()protected void getAllIpsTestCases(List<IpsTest2> result, IRuntimeRepository runtimeRepository)
AbstractRuntimeRepositoryAbstractRuntimeRepository.getAllIpsTestCases(IRuntimeRepository) but searches only in this repository
and not the ones, this repository depends on. Adds the components found to the given result
list.getAllIpsTestCases in class AbstractRuntimeRepositoryprotected void getIpsTestCasesStartingWith(String qNamePrefix, List<IpsTest2> result, IRuntimeRepository runtimeRepository)
AbstractRuntimeRepositorygetIpsTestCasesStartingWith in class AbstractRuntimeRepositoryprotected IpsTestCaseBase getIpsTestCaseInternal(String qName, IRuntimeRepository runtimeRepository)
AbstractRuntimeRepositoryAbstractRuntimeRepository.getIpsTestCase(String, IRuntimeRepository) but searches only in this
repository and not the ones, this repository depends on. The given runtimeRepository
specifies the repository which will be used to instantiate the test case (e.g. the first
repository which contains all dependence repositories).getIpsTestCaseInternal in class AbstractRuntimeRepositorypublic void putIpsTestCase(IpsTestCaseBase test)
protected void getAllModelTypeImplementationClasses(Set<String> result)
AbstractRuntimeRepositorygetAllModelTypeImplementationClasses in class AbstractRuntimeRepositoryprotected IProductComponentGeneration getNextProductComponentGenerationInternal(IProductComponentGeneration generation)
getNextProductComponentGenerationInternal in class AbstractRuntimeRepositoryprotected int getNumberOfProductComponentGenerationsInternal(IProductComponent productCmpt)
getNumberOfProductComponentGenerationsInternal in class AbstractRuntimeRepositoryprotected IProductComponentGeneration getPreviousProductComponentGenerationInternal(IProductComponentGeneration generation)
getPreviousProductComponentGenerationInternal in class AbstractRuntimeRepositoryprotected IProductComponentGeneration getLatestProductComponentGenerationInternal(IProductComponent productCmpt)
getLatestProductComponentGenerationInternal in class AbstractRuntimeRepositoryprotected <T> List<T> getEnumValuesInternal(Class<T> clazz)
AbstractRuntimeRepositorygetEnumValuesInternal in class AbstractRuntimeRepositorypublic void addEnumXmlAdapter(XmlAdapter<?,?> enumXmlAdapter)
XmlAdapter for a Faktor-IPS enumeration that defers its content to a enumeration
content to this repository.protected List<XmlAdapter<?,?>> getAllInternalEnumXmlAdapters(IRuntimeRepository repository)
AbstractRuntimeRepositorygetAllInternalEnumXmlAdapters in class AbstractRuntimeRepositoryrepository - the runtime repository that needs to be used by the XmlAdapters that are
returned by this methodpublic <T extends IRuntimeObject> void putCustomRuntimeObject(Class<T> type, String ipsObjectQualifiedName, T runtimeObject)
protected <T> T getCustomRuntimeObjectInternal(Class<T> type, String id)
AbstractRuntimeRepositoryAbstractRuntimeRepository.getCustomRuntimeObject(Class, String) but searches only in this repository
and not the ones this repository depends on.getCustomRuntimeObjectInternal in class AbstractRuntimeRepositoryCopyright © 2020. All rights reserved.