Interface IModifiableRuntimeRepository

All Superinterfaces:
IRuntimeRepository
All Known Implementing Classes:
InMemoryRuntimeRepository

public interface IModifiableRuntimeRepository extends IRuntimeRepository
An extension of the IRuntimeRepository that allows to put files in the repository.
Since:
24.1
  • Method Details

    • putCustomRuntimeObject

      <T extends IRuntimeObject> void putCustomRuntimeObject(Class<T> type, String ipsObjectQualifiedName, T runtimeObject)
      Puts the runtimeObject into the repository.
    • removeCustomRuntimeObject

      <T> boolean removeCustomRuntimeObject(Class<T> type, String ipsObjectQualifiedName)
      removes the runtimeObject from the repository.
      Parameters:
      type - the Java class representing the runtime object
      ipsObjectQualifiedName - 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 type
      enumValues - the value of the enumeration type as list
      description - the description of the enumeration
    • putEnumValues

      default <T> void putEnumValues(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.
      Parameters:
      enumTypeClass - The Java class representing the enumeration type.
      enumValues - The value of the enumeration type as list.
      See Also:
    • removeEnumValues

      <T> boolean removeEnumValues(Class<T> enumTypeClass)
      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

      void putIpsTestCase(IpsTestCaseBase test)
      Puts the test case into the repository.
    • putProductCmptGeneration

      void putProductCmptGeneration(IProductComponentGeneration generation)
      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 is null
      See Also:
    • putProductComponent

      void putProductComponent(IProductComponent productCmpt)
      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 is null.
      See Also:
    • removeProductComponent

      boolean removeProductComponent(IProductComponent productCmpt)
      Removes the product component from the repository.
      Returns:
      whether the given product component was part of this repository
      Throws:
      NullPointerException - if productCmpt is null.
      IllegalArgumentException - if productCmpt has no ID.
      Since:
      24.7
      See Also:
    • putTable

      Optional<ITable<?>> putTable(ITable<?> table)
      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 Optional containing the old single content table if a single content table of the same class has been replaced, or an empty Optional if a multi-content table has been added.
      Throws:
      NullPointerException - if table is null or has no name.
    • removeTable

      boolean removeTable(ITable<?> table)
      Removes the table from the repository.
      Returns:
      whether the given table component was part of this repository
      Throws:
      NullPointerException - if table is null.
      IllegalArgumentException - if table has no name.
    • removeProductCmptGeneration

      boolean removeProductCmptGeneration(IProductComponentGeneration productCmptGeneration)
      Removes the given product component generation from the list of generations
      Parameters:
      productCmptGeneration - the product component generation to be removed;
      Returns:
      true if the product component generation was successfully removed, false if the generation was not found in the list of generations.
      Throws:
      NullPointerException - if productCmptGen is null.
      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

      boolean removeIpsTestCase(IpsTestCaseBase test)
      Removes the specified IPS test case.
      Parameters:
      test - the IPS test case to be removed. It must not be null.
      Returns:
      true if the test case was successfully removed, false if no test case with the given test case's qualified name exists.
      Throws:
      NullPointerException - if test is null.
      IllegalArgumentException - if the given test case has no qualified name.
      Since:
      25.1