Examples of ProjectDirectory


Examples of com.denimgroup.threadfix.framework.engine.ProjectDirectory

  public JSPMappings(@Nonnull File rootFile) {
    if (rootFile.exists()) {

      this.projectRoot = rootFile;

            projectDirectory = new ProjectDirectory(rootFile);
     
      String jspRootString = CommonPathFinder.findOrParseProjectRootFromDirectory(rootFile, "jsp");

            LOG.info("Calculated JSP root to be: " + jspRootString);
     
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.ProjectDirectory

    log.info("File: " + rootFile);
   
    FrameworkType frameworkType = FrameworkType.NONE;
   
    if (rootFile.exists() && rootFile.isDirectory()) {
            ProjectDirectory projectDirectory = new ProjectDirectory(rootFile);

            for (FrameworkChecker checker : INSTANCE.frameworkCheckers) {
                frameworkType = checker.check(projectDirectory);
                if (frameworkType != FrameworkType.NONE) {
                    break;
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.ProjectDirectory

    ///////////////////////////// Tests ////////////////////////////
    ////////////////////////////////////////////////////////////////

    @Test
    public void testWebXmlParserForContextClass() {
        ProjectDirectory directory = new ProjectDirectory(new File(TestConstants.getFolderName("spring-mvc-ajax")));
        ServletMappings mappings = WebXMLParser.getServletMappings(directory.findWebXML(), directory);
        for (ClassMapping classMapping : mappings.getClassMappings()) {
            if (classMapping.getClassWithPackage().equals(SpringServletConfigurationChecker.DISPATCHER_SERVLET)) {
                assertTrue("missing context class", "org.springframework.web.context.support.AnnotationConfigWebApplicationContext".equals(classMapping.getContextClass()));
                assertTrue("missing context location", "com.codetutr.springconfig".equals(classMapping.getContextConfigLocation()));
            }
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.ProjectDirectory

    ////////////////////////////////////////////////////////////////
    ///////////////////////////// Utils ////////////////////////////
    ////////////////////////////////////////////////////////////////

    private ServletMappings getTestMappings() throws IOException {
        return new ServletMappings(sampleServletMappings, sampleServlets, new ProjectDirectory(File.createTempFile("test", "test")), null);
    }
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.ProjectDirectory

     
      for (int i = 0; i < sourceLocations.length; i++) {
        File projectDirectory = new File(sourceLocations[i]);
        assertTrue(projectDirectory.exists());
       
        File file = new ProjectDirectory(projectDirectory).findWebXML();
            assertTrue("File was null, check that " + projectDirectory + " is a valid directory.", file != null);
        assertTrue(file.getName().equals("web.xml"));
       
        assertTrue(file.getAbsolutePath() + " wasn't " + webXMLLocations[i],
                    file.getAbsolutePath().equals(webXMLLocations[i]));
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.ProjectDirectory

      assertTrue(bodgeIt.guessApplicationType() == FrameworkType.JSP);
    }

    @Test(expected=NullPointerException.class)
    public void testNullInput() {
        new ProjectDirectory(null).findWebXML();
    }
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.ProjectDirectory

    @Test
    public void testBadInput() {
      File doesntExist = new File("This/path/doesnt/exist");

      assertTrue(new ProjectDirectory(doesntExist).findWebXML() == null);
     
     
    }
View Full Code Here

Examples of org.jitterbit.integration.client.project.ProjectDirectory

        String name = getSuggestedProjectName(location);
        return new ProjectLocation(name, location);
    }

    private String getSuggestedProjectName(File suggestedProjectLocation) {
        ProjectDirectory projectDir = projectManager.getProjectDirectory();
        return projectDir.getSuggestedNewProjectName(suggestedProjectLocation);
    }
View Full Code Here

Examples of org.jitterbit.integration.client.project.ProjectDirectory

    private void createNewNamedProject(String[] params) throws CommandException {
        String[] nameParts = new String[params.length - 1];
        System.arraycopy(params, 1, nameParts, 0, nameParts.length);
        String name = StringUtils.join(nameParts, " ");
        ProjectDirectory projectsRoot = view.getProjectManager().getProjectDirectory();
        File dir = new File(projectsRoot.getLocation(), name);
        String projectName = getNewProjectName(dir);
        ProjectLocation projectLoc = new ProjectLocation(projectName, dir);
        WaitLock waitLock = view.getWindow().startWait();
        NewProjectCreator creator = new NewProjectCreator(view.getProjectManager(), view.getWindow(), projectLoc, waitLock);
        Application.getWorker().submitForParallel(creator);
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.