Examples of FrameworkType


Examples of com.denimgroup.threadfix.data.enums.FrameworkType

        LOG.info("Determining proper FindingProcesser implementation for application " + application.getName() + " and new scan.");

        SourceCodeAccessLevel accessLevel = getSourceCodeAccessLevel(application, scan);
        File rootFile = getRootFile(application);
        FrameworkType frameworkType = getFrameworkType(application, accessLevel, rootFile, scan);

        ProjectConfig config = new ProjectConfig(frameworkType, accessLevel, rootFile, "/");

        FindingProcessor processor;
View Full Code Here

Examples of com.denimgroup.threadfix.data.enums.FrameworkType

  @Nonnull
  private static FrameworkType getFrameworkType(Application application,
      SourceCodeAccessLevel accessLevel, File rootFile, Scan scan) {
   
    FrameworkType frameworkType = application.getFrameworkTypeEnum();

        LOG.info("Initial frameworkType was " + frameworkType);

    if (frameworkType == FrameworkType.DETECT) {
      if (accessLevel == SourceCodeAccessLevel.FULL) {
View Full Code Here

Examples of com.denimgroup.threadfix.data.enums.FrameworkType

    return frameworkType;
  }
 
  // TODO cache this information so we don't have to calculate every time
  private static FrameworkType guessFrameworkTypeFromDataFlows(Application application, Scan scan) {
    FrameworkType returnType = guessFrameworkType(scan);
   
    if (returnType == FrameworkType.NONE && application != null && application.getScans() != null) {
      for (Scan applicationScan : application.getScans()) {
        FrameworkType scanType = guessFrameworkType(applicationScan);
        if (scanType != FrameworkType.NONE) {
          returnType = scanType;
          break;
        }
      }
View Full Code Here

Examples of com.denimgroup.threadfix.data.enums.FrameworkType

  // TODO improve this
  private static FrameworkType guessFrameworkType(Scan scan) {

        LOG.info("Guessing framework type.");

    FrameworkType type = FrameworkType.NONE;
   
    if (scan != null && scan.isStatic() && scan.getFindings() != null &&
        !scan.getFindings().isEmpty()) {
      for (Finding finding : scan.getFindings()) {
        if (finding != null && finding.getStaticPathInformation() != null &&
View Full Code Here

Examples of com.denimgroup.threadfix.data.enums.FrameworkType

        for (File file : getSampleProjects()) {

            System.out.println(file.getName());

            FrameworkType type = FrameworkCalculator.getType(file);

            assert type == FrameworkType.DOT_NET_WEB_FORMS
                    : "Got " + type + " instead of DOT_NET_WEB_FORMS for " + file;
        }
    }
View Full Code Here

Examples of com.denimgroup.threadfix.data.enums.FrameworkType

            testTypeDetection(TestConstants.getFolderName(app));
        }
    }

    void testTypeDetection(String location) {
        FrameworkType type = FrameworkCalculator.getType(new File(location));
        assertTrue("Didn't find Spring in " + location + ". Got: " + type, type == FrameworkType.SPRING_MVC);
    }
View Full Code Here

Examples of com.denimgroup.threadfix.data.enums.FrameworkType

        return getDatabase(file);
  }

  @Nullable
    public static EndpointDatabase getDatabase(@Nonnull File rootFile) {
    FrameworkType type = FrameworkCalculator.getType(rootFile);
    return getDatabase(rootFile, type);
  }
View Full Code Here

Examples of com.denimgroup.threadfix.data.enums.FrameworkType

    return getDatabase(rootFile, type);
  }
 
  @Nullable
    public static EndpointDatabase getDatabase(@Nonnull File rootFile, List<PartialMapping> partialMappings) {
    FrameworkType type = FrameworkCalculator.getType(rootFile);
   
    return getDatabase(rootFile, type, partialMappings);
  }
View Full Code Here

Examples of org.apache.karaf.system.FrameworkType

        if (!debug^nodebug && framework == null) {
            System.out.printf("Current OSGi framework is %s%n", systemService.getFramework().name());
            return null;
        }
        if (framework != null) {
            FrameworkType frameworkType = FrameworkType.valueOf(framework);
            systemService.setFramework(frameworkType);
            System.out.println("Changed OSGi framework to " + frameworkType.toString().toLowerCase() + ". Karaf needs to be restarted to make the change effective");
        }
        if (debug) {
            FrameworkType frameworkType = systemService.getFramework();
            System.out.printf("Enabling debug for OSGi framework (%s)%n", frameworkType.name());
            systemService.setFrameworkDebug(true);
        }
        if (nodebug) {
            FrameworkType frameworkType = systemService.getFramework();
            System.out.printf("Disabling debug for OSGi framework (%s)%n", frameworkType.name());
            systemService.setFrameworkDebug(false);
        }

        return null;
    }
View Full Code Here

Examples of org.apache.karaf.system.FrameworkType

        if (!debug^nodebug && framework == null) {
            System.out.printf("Current OSGi framework is %s%n", systemService.getFramework().name());
            return null;
        }
        if (framework != null) {
            FrameworkType frameworkType = FrameworkType.valueOf(framework);
            systemService.setFramework(frameworkType);
            System.out.println("Changed OSGi framework to " + frameworkType.toString().toLowerCase() + ". Karaf needs to be restarted to make the change effective");
        }
        if (debug) {
            FrameworkType frameworkType = systemService.getFramework();
            System.out.printf("Enabling debug for OSGi framework (%s)%n", frameworkType.name());
            systemService.setFrameworkDebug(true);
        }
        if (nodebug) {
            FrameworkType frameworkType = systemService.getFramework();
            System.out.printf("Disabling debug for OSGi framework (%s)%n", frameworkType.name());
            systemService.setFrameworkDebug(false);
        }

        return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.