Package org.openengsb.domain.userprojects.model

Examples of org.openengsb.domain.userprojects.model.Project


        revokePersistenceAccess();
    }

    @Override
    public void deleteProjectByName(String projectName) {
        deleteProject(new Project(projectName));
    }
View Full Code Here


    public void deleteProjectsByName(List<String> projectNames) {

        List<Project> projects = Lists.newArrayList();

        for (String projectName : projectNames) {
            projects.add(new Project(projectName));
        }

        deleteProjects(projects);
    }
View Full Code Here

        }
        return projects;
    }

    private Project createProject(BasicProject jiraProject) {
        Project project = new Project();
        project.setName(jiraProject.getName());
        project.setAttributes(createAttributes(createProjectAttributeMap(jiraProject), jiraProject.getName()));
        return project;
    }
View Full Code Here

    private List<Project> createProjects(List<Entry> projectEntries) throws NoSuchNodeException,
        MissingParentException {
        List<Project> projects = Lists.newArrayList();
        for (Entry entry : projectEntries) {
            Project project = new Project();
            project.setName(entry.getDn().getRdn().getValue().getString());
            project.setAttributes(createAttributes(ldapDao.getDirectChildren(DnFactory.projectAttributes(project)),
                    project.getName()));
            projects.add(project);
        }
        return projects;
    }
View Full Code Here

    }
   
    @Test
    @Ignore
    public void testFindProjects() throws InterruptedException {
        Project project = createTestProject();
        List<Project> expected = Arrays.asList(project);
        ldapService.updateProjects(expected);
        assertTrue(CollectionUtils.isEqualCollection(modelManager.findProjects(), expected));
    }
View Full Code Here

    }

    @Test
    public void testUpdateProjects_shouldCreateProject() throws LdapInvalidAttributeValueException,
        NoSuchNodeException, MissingParentException {
        Project project = createTestProject();
        ldapService.updateProjects(Lists.newArrayList(project));
        assertThat(ldapDao.exists(DnFactory.project(project)), is(true));
        assertAttributesCorrectlyStored(project);
    }
View Full Code Here

    }

    @Test
    public void testUpdateProjects_shouldUpdateProject() throws LdapInvalidAttributeValueException,
        NoSuchNodeException, MissingParentException {
        Project project = createTestProject();
        ldapService.updateProjects(Lists.newArrayList(project));
        project.getAttributes().add(createTestAttribute("attr88", "val88"));
        ldapService.updateProjects(Lists.newArrayList(project));
        assertAttributesCorrectlyStored(project);
    }
View Full Code Here

        assertThat(ldapDao.exists(dn), is(false));
    }

    @Test
    public void testDeleteProjects_shouldDelete() {
        Project project = createTestProject();
        List<Project> list = Lists.newArrayList(project);
        ldapService.updateProjects(list);
        Dn dn = DnFactory.project(project);
        assertThat(ldapDao.exists(dn), is(true));
        ldapService.deleteProjects(list);
View Full Code Here

        assignment.setUser("user");
        return assignment;
    }

    protected Project createTestProject() {
        Project project = new Project();
        project.setName("project");
        project.setAttributes(Lists.newArrayList(createTestAttribute("att", "val1", "val2")));
        return project;
    }
View Full Code Here

TOP

Related Classes of org.openengsb.domain.userprojects.model.Project

Copyright © 2018 www.massapicom. 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.