Package org.faktorips.runtime
Interface IModifiableRuntimeRepository
- All Superinterfaces:
IRuntimeRepository
- All Known Implementing Classes:
InMemoryRuntimeRepository
An extension of the
IRuntimeRepository that allows to put files in the repository.- Since:
- 24.1
-
Method Summary
Modifier and TypeMethodDescription<T extends IRuntimeObject>
voidputCustomRuntimeObject(Class<T> type, String ipsObjectQualifiedName, T runtimeObject) Puts the runtimeObject into the repository.default <T> voidputEnumValues(Class<T> enumTypeClass, List<T> enumValues) Puts the given enum values in the repository replacing all existing values for the given enumType, removing any description.<T> voidputEnumValues(Class<T> enumTypeClass, List<T> enumValues, org.faktorips.values.InternationalString description) Puts the given enum values and description in the repository replacing all existing values for the given enumType.voidPuts the test case into the repository.voidputProductCmptGeneration(IProductComponentGeneration generation) Puts the product component generation and its product component into the repository.voidputProductComponent(IProductComponent productCmpt) Puts the product component into the repository.Puts the table into the repository.<T> booleanremoveCustomRuntimeObject(Class<T> type, String ipsObjectQualifiedName) removes the runtimeObject from the repository.<T> booleanremoveEnumValues(Class<T> enumTypeClass) removes the enum values and description of the given enumType from the repository.booleanRemoves the specified IPS test case.booleanremoveProductCmptGeneration(IProductComponentGeneration productCmptGeneration) Removes the given product component generation from the list of generationsbooleanremoveProductComponent(IProductComponent productCmpt) Removes the product component from the repository.booleanremoveTable(ITable<?> table) Removes the table from the repository.Methods inherited from interface org.faktorips.runtime.IRuntimeRepository
addDirectlyReferencedRepository, addEnumValueLookupService, getAllEnumClasses, getAllIpsTestCases, getAllModelTypeImplementationClasses, getAllProductComponentIds, getAllProductComponents, getAllProductComponents, getAllProductComponents, getAllReferencedRepositories, getAllTableIds, getAllTables, getClassLoader, getCustomRuntimeObject, getDirectlyReferencedRepositories, getEnumDescription, getEnumValue, getEnumValue, getEnumValueLookupService, getEnumValues, 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, isModifiable, newJAXBContext, removeEnumValueLookupService, setRuntimeRepositoryLookup
-
Method Details
-
putCustomRuntimeObject
<T extends IRuntimeObject> void putCustomRuntimeObject(Class<T> type, String ipsObjectQualifiedName, T runtimeObject) Puts the runtimeObject into the repository. -
removeCustomRuntimeObject
removes the runtimeObject from the repository.- Parameters:
type- the Java class representing the runtime objectipsObjectQualifiedName- the qualified name of the runtime object- Returns:
- whether the given runtime object was part of this repository
- Since:
- 25.1
-
putEnumValues
<T> void putEnumValues(Class<T> enumTypeClass, List<T> enumValues, org.faktorips.values.InternationalString description) Puts the given enum values and description in the repository replacing all existing values for the given enumType.- Parameters:
enumTypeClass- the Java class representing the enumeration typeenumValues- the value of the enumeration type as listdescription- the description of the enumeration
-
putEnumValues
Puts the given enum values in the repository replacing all existing values for the given enumType, removing any description.- Parameters:
enumTypeClass- The Java class representing the enumeration type.enumValues- The value of the enumeration type as list.- See Also:
-
removeEnumValues
removes the enum values and description of the given enumType from the repository.- Parameters:
enumTypeClass- the Java class representing the enumeration type- Returns:
- whether the given enum type was part of this repository and was successfully removed
- Since:
- 25.1
-
putIpsTestCase
Puts the test case into the repository. -
putProductCmptGeneration
Puts the product component generation and its product component into the repository. If the repository already contains a generation with the same id, the new component replaces the old one. The same applies for the product component.- Throws:
IllegalRepositoryModificationException- if this repository does not allows to modify its contents.NullPointerException- if generation isnull- See Also:
-
putProductComponent
Puts the product component into the repository. If the repository already contains a component with the same id, the new component replaces the old one.- Throws:
NullPointerException- if productCmpt isnull.- See Also:
-
removeProductComponent
Removes the product component from the repository.- Returns:
- whether the given product component was part of this repository
- Throws:
NullPointerException- if productCmpt isnull.IllegalArgumentException- if productCmpt has no ID.- Since:
- 24.7
- See Also:
-
putTable
Puts the table into the repository. Replaces any table instance of the same class or any of its superclasses. The latter check is needed to replace tables with mock implementations.- Returns:
- an
Optionalcontaining the old single content table if a single content table of the same class has been replaced, or an emptyOptionalif a multi-content table has been added. - Throws:
NullPointerException- if table isnullor has noname.
-
removeTable
Removes the table from the repository.- Returns:
- whether the given table component was part of this repository
- Throws:
NullPointerException- if table isnull.IllegalArgumentException- if table has no name.
-
removeProductCmptGeneration
Removes the given product component generation from the list of generations- Parameters:
productCmptGeneration- the product component generation to be removed;- Returns:
trueif the product component generation was successfully removed,falseif the generation was not found in the list of generations.- Throws:
NullPointerException- ifproductCmptGenisnull.IllegalArgumentException- if the associated product component of the generation has no valid ID, or if no generations are found for the product component.- Since:
- 25.1
-
removeIpsTestCase
Removes the specified IPS test case.- Parameters:
test- the IPS test case to be removed. It must not benull.- Returns:
trueif the test case was successfully removed,falseif no test case with the given test case's qualified name exists.- Throws:
NullPointerException- iftestisnull.IllegalArgumentException- if the given test case has no qualified name.- Since:
- 25.1
-