Package com.nomagic.requirements.reqif
Class ReqIFUtils
- java.lang.Object
-
- com.nomagic.requirements.reqif.ReqIFUtils
-
@OpenApiAll public class ReqIFUtils extends java.lang.Object
ReqIF import utility.
-
-
Constructor Summary
Constructors Constructor Description ReqIFUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkSourceTool(java.lang.String sourceToolId)
Check if given source tool (ReqIF flavor) is available.static void
exportReqIFElements(java.io.File file, java.util.Collection<Class> classes, java.lang.String sourceToolId, ProgressStatus progressStatus)
Exports given classes as ReqIF objects.static void
exportReqIFSpecifications(java.io.File file, java.util.Collection<Package> specifications, java.lang.String sourceToolId, ProgressStatus progressStatus)
Exports given packages as ReqIF specifications.static java.util.Collection<java.lang.String>
getSourceToolIds()
Get supported ReqIF source tools ids to export to.static void
importReqIF(java.io.File reqIfFile, Project project)
Imports ReqIF file.static void
importReqIF(java.io.File reqIfFile, Project project, ReqIFObjectOwnerProvider ownerProvider)
Import ReqIF file.static void
importReqIFSpecification(java.io.File reqIfFile, Package specificationPackage)
Imports (updates) ReqIF specification.
-
-
-
Method Detail
-
importReqIF
public static void importReqIF(java.io.File reqIfFile, Project project) throws java.lang.IllegalArgumentException, ReqIFException
Imports ReqIF file.- Parameters:
reqIfFile
- ReqIF file.project
- project to import to.- Throws:
java.lang.IllegalArgumentException
- if illegal arguments are passed.ReqIFException
- if fails to import ReqIF file.
-
importReqIF
public static void importReqIF(java.io.File reqIfFile, Project project, ReqIFObjectOwnerProvider ownerProvider) throws java.lang.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:
java.lang.IllegalArgumentException
- if illegal arguments are passed.ReqIFException
- if fails to import ReqIF file.
-
importReqIFSpecification
public static void importReqIFSpecification(java.io.File reqIfFile, Package specificationPackage) throws java.lang.IllegalArgumentException
Imports (updates) ReqIF specification.- Parameters:
reqIfFile
- ReqIF file.specificationPackage
- specification package to update.- Throws:
java.lang.IllegalArgumentException
- if illegal arguments are passed.
-
getSourceToolIds
public static java.util.Collection<java.lang.String> getSourceToolIds()
Get supported ReqIF source tools ids to export to.- Returns:
- supported source tools ids
-
exportReqIFSpecifications
public static void exportReqIFSpecifications(java.io.File file, java.util.Collection<Package> specifications, @CheckForNull java.lang.String sourceToolId, ProgressStatus progressStatus) throws java.lang.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:
java.lang.Exception
- export exception.
-
exportReqIFElements
public static void exportReqIFElements(java.io.File file, java.util.Collection<Class> classes, @CheckForNull java.lang.String sourceToolId, ProgressStatus progressStatus) throws java.lang.Exception
Exports given classes as ReqIF objects.- Parameters:
file
- destination file.classes
- specifications to export.sourceToolId
- source tool format.progressStatus
- progress status.- Throws:
java.lang.Exception
- export exception.
-
checkSourceTool
public static void checkSourceTool(@CheckForNull java.lang.String sourceToolId) throws java.lang.IllegalArgumentException
Check if given source tool (ReqIF flavor) is available.- Parameters:
sourceToolId
- source tool to check.- Throws:
java.lang.IllegalArgumentException
- if given source tool is not supported.
-
-