Interface TorgDataSource

All Known Implementing Classes:
CsvTorgDataSource, DatabaseTorgDataSource

public interface TorgDataSource
Interface for loading Technical Requirements Documents (TORG) from various data sources.

Implementations can load TORG data from:

  • CSV files
  • Databases
  • JSON/XML configuration files
  • Web services/APIs
Version:
1.0
Author:
esol
  • Method Details

    • loadByProjectId

      Optional<TechnicalRequirementsDocument> loadByProjectId(String projectId)
      Load a TORG document by project identifier.
      Parameters:
      projectId - the project identifier
      Returns:
      optional containing the TORG if found
    • loadByCompanyAndProject

      Optional<TechnicalRequirementsDocument> loadByCompanyAndProject(String companyIdentifier, String projectName)
      Load a TORG document by company and project name.
      Parameters:
      companyIdentifier - the company identifier
      projectName - the project name
      Returns:
      optional containing the TORG if found
    • getAvailableProjectIds

      List<String> getAvailableProjectIds()
      Get a list of available project identifiers.
      Returns:
      list of project IDs available in this data source
    • getAvailableCompanies

      List<String> getAvailableCompanies()
      Get a list of available companies.
      Returns:
      list of company identifiers
    • hasProject

      default boolean hasProject(String projectId)
      Check if a project exists in this data source.
      Parameters:
      projectId - the project identifier
      Returns:
      true if the project exists
    • store

      default boolean store(TechnicalRequirementsDocument torg)
      Create a new TORG and store it (if the data source supports writing).
      Parameters:
      torg - the TORG document to store
      Returns:
      true if successfully stored
      Throws:
      UnsupportedOperationException - if this data source is read-only
    • update

      default boolean update(TechnicalRequirementsDocument torg)
      Update an existing TORG (if the data source supports writing).
      Parameters:
      torg - the TORG document to update
      Returns:
      true if successfully updated
      Throws:
      UnsupportedOperationException - if this data source is read-only
    • isWritable

      default boolean isWritable()
      Check if this data source supports write operations.
      Returns:
      true if write operations are supported