Package com.nomagic.requirements.reqif
Class ReqIFUtils
java.lang.Object
com.nomagic.requirements.reqif.ReqIFUtils
ReqIF import utility.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkSourceTool
(String sourceToolId) Check if given source tool (ReqIF flavor) is available.static void
exportReqIFElements
(File file, Collection<Class> classes, String sourceToolId, ProgressStatus progressStatus) Exports given classes as ReqIF objects.static void
exportReqIFSpecifications
(File file, Collection<Package> specifications, String sourceToolId, ProgressStatus progressStatus) Exports given packages as ReqIF specifications.static Collection<String>
Get supported ReqIF source tools ids to export to.static void
importReqIF
(File reqIfFile, Project project) Imports ReqIF file.static void
importReqIF
(File reqIfFile, Project project, ReqIFObjectOwnerProvider ownerProvider) Import ReqIF file.static void
importReqIFSpecification
(File reqIfFile, Package specificationPackage) Imports (updates) ReqIF specification.
-
Constructor Details
-
ReqIFUtils
public ReqIFUtils()
-
-
Method Details
-
importReqIF
public static void importReqIF(File reqIfFile, Project project) throws IllegalArgumentException, ReqIFException Imports ReqIF file.- Parameters:
reqIfFile
- ReqIF file.project
- project to import to.- Throws:
IllegalArgumentException
- if illegal arguments are passed.ReqIFException
- if fails to import ReqIF file.
-
importReqIF
public static void importReqIF(File reqIfFile, Project project, ReqIFObjectOwnerProvider ownerProvider) throws IllegalArgumentException, ReqIFException Import ReqIF file.- Parameters:
reqIfFile
- ReqIF file.project
- project to import to.ownerProvider
- call back to provide an owner element for new ReqIF objects (if objects without specifications are imported).- Throws:
IllegalArgumentException
- if illegal arguments are passed.ReqIFException
- if fails to import ReqIF file.
-
importReqIFSpecification
public static void importReqIFSpecification(File reqIfFile, Package specificationPackage) throws IllegalArgumentException Imports (updates) ReqIF specification.- Parameters:
reqIfFile
- ReqIF file.specificationPackage
- specification package to update.- Throws:
IllegalArgumentException
- if illegal arguments are passed.
-
getSourceToolIds
Get supported ReqIF source tools ids to export to.- Returns:
- supported source tools ids
-
exportReqIFSpecifications
public static void exportReqIFSpecifications(File file, Collection<Package> specifications, @CheckForNull String sourceToolId, ProgressStatus progressStatus) throws Exception Exports given packages as ReqIF specifications. Classes contained by packages are exported as ReqIF objects.- Parameters:
file
- destination file.specifications
- specifications to export.sourceToolId
- source tool format.progressStatus
- progress status.- Throws:
Exception
- export exception.
-
exportReqIFElements
public static void exportReqIFElements(File file, Collection<Class> classes, @CheckForNull String sourceToolId, ProgressStatus progressStatus) throws Exception Exports given classes as ReqIF objects.- Parameters:
file
- destination file.classes
- specifications to export.sourceToolId
- source tool format.progressStatus
- progress status.- Throws:
Exception
- export exception.
-
checkSourceTool
public static void checkSourceTool(@CheckForNull String sourceToolId) throws IllegalArgumentException Check if given source tool (ReqIF flavor) is available.- Parameters:
sourceToolId
- source tool to check.- Throws:
IllegalArgumentException
- if given source tool is not supported.
-