Class ReqIFUtils

java.lang.Object
com.nomagic.requirements.reqif.ReqIFUtils

@OpenApiAll public class ReqIFUtils extends Object
ReqIF import utility.
  • 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

      public static Collection<String> 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.