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 Summary
Modifier and TypeMethodDescriptionGet a list of available companies.Get a list of available project identifiers.default booleanhasProject(String projectId) Check if a project exists in this data source.default booleanCheck if this data source supports write operations.loadByCompanyAndProject(String companyIdentifier, String projectName) Load a TORG document by company and project name.loadByProjectId(String projectId) Load a TORG document by project identifier.default booleanCreate a new TORG and store it (if the data source supports writing).default booleanUpdate an existing TORG (if the data source supports writing).
-
Method Details
-
loadByProjectId
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 identifierprojectName- the project name- Returns:
- optional containing the TORG if found
-
getAvailableProjectIds
-
getAvailableCompanies
-
hasProject
Check if a project exists in this data source.- Parameters:
projectId- the project identifier- Returns:
- true if the project exists
-
store
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
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
-