Examples of ProjectMetadata


Examples of com.denimgroup.threadfix.service.defects.ProjectMetadata

    }

    applicationService.decryptCredentials(application);

    AbstractDefectTracker dt = DefectTrackerFactory.getTracker(application);
    ProjectMetadata data = null;

        List<Defect> defectList = null;
        Map<String, Object> map = new HashMap<>();
    if (dt != null) {
            if (addDefectIds) {
                defectList = dt.getDefectList();
                if (dt.getLastError() != null && !dt.getLastError().isEmpty()) {
                    map.put(ERROR_MSG, dt.getLastError());
                    return map;
                }
            } else {
                defectList = list();
            }

      data = dt.getProjectMetadata();
            if (dt.getLastError() != null && !dt.getLastError().isEmpty()) {
                map.put(ERROR_MSG, dt.getLastError());
                return map;
            }

            // adding additional scanner info checkbox, checking for null dynamicformfields
            List<DynamicFormField> editableFields = data.getEditableFields();

            if (editableFields != null) {
                addAdditionalScannerInfoField(editableFields);

                //remove Order field in Version One dynamic form
View Full Code Here

Examples of com.google.refine.ProjectMetadata

        //FIXME - should we try and use mock(Project.class); - seems unnecessary complexity

        servlet = new RefineServletStub();
        ImportingManager.initialize(servlet);
        project = new Project();
        metadata = new ProjectMetadata();
        job = ImportingManager.createJob();
       
        options = Mockito.mock(JSONObject.class);
    }
View Full Code Here

Examples of com.google.refine.ProjectMetadata

    @BeforeMethod
    public void SetUp(){
        SUT = new XlsExporter(false);
        stream = new ByteArrayOutputStream();
        ProjectManager.singleton = new ProjectManagerStub();
        projectMetadata = new ProjectMetadata();
        project = new Project();
        projectMetadata.setName(TEST_PROJECT_NAME);
        ProjectManager.singleton.registerProject(project, projectMetadata);
        engine = new Engine(project);
        options = mock(Properties.class);
View Full Code Here

Examples of com.google.refine.ProjectMetadata

    @BeforeMethod
    public void SetUp(){
        SUT = new TemplatingExporter();
        writer = new StringWriter();
        ProjectManager.singleton = new ProjectManagerStub();
        projectMetadata = new ProjectMetadata();
        project = new Project();
        projectMetadata.setName(TEST_PROJECT_NAME);
        ProjectManager.singleton.registerProject(project, projectMetadata);
        engine = new Engine(project);
        options = mock(Properties.class);
View Full Code Here

Examples of com.google.refine.ProjectMetadata

        whenGetSaveTimes(project, metadata); //5 minute difference
        registerProject(project, metadata);

        //add a second project to the cache
        Project project2 = spy(new ProjectStub(2));
        ProjectMetadata metadata2 = mock(ProjectMetadata.class);
        whenGetSaveTimes(project2, metadata2, 10); //not modified since the last save but within 30 seconds flush limit
        registerProject(project2, metadata2);

        //check that the two projects are not the same
        Assert.assertFalse(project.id == project2.id);
View Full Code Here

Examples of com.google.refine.ProjectMetadata

    @Test
    public void canAddEntry(){
        //local dependencies
        HistoryEntry entry = mock(HistoryEntry.class);
        Project project = mock(Project.class);
        ProjectMetadata projectMetadata = mock(ProjectMetadata.class);

        when(projectManager.getProject(Mockito.anyLong())).thenReturn(project);
        when(projectManager.getProjectMetadata(Mockito.anyLong())).thenReturn(projectMetadata);

        SUT.addEntry(entry);
View Full Code Here

Examples of com.google.refine.ProjectMetadata

    @BeforeMethod
    public void SetUp(){
        SUT = new HtmlTableExporter();
        writer = new StringWriter();
        ProjectManager.singleton = new ProjectManagerStub();
        projectMetadata = new ProjectMetadata();
        project = new Project();
        projectMetadata.setName(TEST_PROJECT_NAME);
        ProjectManager.singleton.registerProject(project, projectMetadata);
        engine = new Engine(project);
        options = mock(Properties.class);
View Full Code Here

Examples of com.google.refine.ProjectMetadata

            writer.object();
            writer.key("projects");
                writer.object();
                Map<Long, ProjectMetadata> m = ProjectManager.singleton.getAllProjectMetadata();
                for (Entry<Long,ProjectMetadata> e : m.entrySet()) {
                    ProjectMetadata pm = e.getValue();
                    if (pm != null) {
                        writer.key(e.getKey().toString());
                        e.getValue().write(writer, options);
                    }
                }
View Full Code Here

Examples of com.google.refine.ProjectMetadata

     * @param projectID
     */
    @Override
    public boolean loadProjectMetadata(long projectID) {
        synchronized (this) {
            ProjectMetadata metadata = ProjectMetadataUtilities.load(getProjectDir(projectID));
            if (metadata != null) {
                _projectsMetadata.put(projectID, metadata);
                return true;
            } else {
                return false;
View Full Code Here

Examples of com.google.refine.ProjectMetadata

            JSONWriter jsonWriter = new JSONWriter(writer);
            jsonWriter.object();
            jsonWriter.key("projectIDs");
            jsonWriter.array();
            for (Long id : _projectsMetadata.keySet()) {
                ProjectMetadata metadata = _projectsMetadata.get(id);
                if (metadata != null) {
                    jsonWriter.value(id);

                    try {
                        ProjectMetadataUtilities.save(metadata, getProjectDir(id));
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.