Package org.nxplanner.domain

Examples of org.nxplanner.domain.Project


        expectObjectRepositoryAccess(Project.class);
        action.setMetaRepository(mockMetaRepository);
        support.request.setParameterValue(AbstractAction.TYPE_KEY,
                new String[]{ Project.class.getName() });
        support.setForward("display", "editor.jsp");
        mockObjectRepositoryControl.expectAndReturn(mockObjectRepository.load(11), new Project());
        replay();

        ActionForward forward = support.executeAction(action);

        verify();
View Full Code Here


        expectObjectRepositoryAccess(Project.class);
        action.setMetaRepository(mockMetaRepository);
        support.request.setParameterValue(AbstractAction.TYPE_KEY,
                new String[]{ Project.class.getName() });
        support.setForward("display", "editor.jsp");
        mockObjectRepositoryControl.expectAndReturn(mockObjectRepository.load(11), new Project());
        replay();

        ActionForward forward = support.executeAction(action);

        verify();
View Full Code Here

        mockQuery = (Query)mockQueryControl.getMock();
        ThreadSession.set(mockSession);
        support = new XPlannerTestSupport();
        support.setUpSubjectInRole("editor");
        ThreadServletRequest.set(support.request);
        domainObject = new Project();
        adapter = new RepositoryHistoryAdapter(Project.class, mockObjectRepository);
    }
View Full Code Here

        mockQuery = (Query)mockQueryControl.getMock();
        ThreadSession.set(mockSession);
        support = new XPlannerTestSupport();
        support.setUpSubjectInRole("editor");
        ThreadServletRequest.set(support.request);
        domainObject = new Project();
        adapter = new RepositoryHistoryAdapter(Project.class, mockObjectRepository);
    }
View Full Code Here

    protected Task task;

    protected void setUp() throws Exception {
        super.setUp();

        Project project = newProject();
        iteration = newIteration(project);
        story = newUserStory(iteration);
    }
View Full Code Here

                skipBody = checkPermission(session, projectId, principalId);
                if (skipBody == true && projectId == 0) {
                    // Has permission for any...
                    Collection projects = session.find("from project in "+Project.class);
                    for (Iterator iterator = projects.iterator(); iterator.hasNext();) {
                        Project project = (Project)iterator.next();
                        skipBody = checkPermission(session, project.getId(), principalId);
                        if (!skipBody) {
                            break;
                        }
                    }
                }
View Full Code Here

                skipBody = checkPermission(session, projectId, principalId);
                if (skipBody == true && projectId == 0) {
                    // Has permission for any...
                    Collection projects = session.find("from project in "+Project.class);
                    for (Iterator iterator = projects.iterator(); iterator.hasNext();) {
                        Project project = (Project)iterator.next();
                        skipBody = checkPermission(session, project.getId(), principalId);
                        if (!skipBody) {
                            break;
                        }
                    }
                }
View Full Code Here

        mockAbstractEditorFormControl.expectAndReturn(mockAbstractEditorForm.getId(), 0);
        mockAbstractEditorFormControl.expectAndReturn(mockAbstractEditorForm.getAction(),
                EditObjectAction.CREATE_ACTION);
        mockAbstractEditorForm.setAction(null);
        mockAbstractEditorForm.setId(OID);
        mockObjectRepository.insert(new Project());
        mockObjectRepositoryControl.setMatcher(new ArgumentsTypeMatcher());
        mockObjectRepositoryControl.setReturnValue(OID);
        support.request.setParameterValue("returnto", new String[]{"object.jsp"});
        replay();
View Full Code Here

        mockAbstractEditorFormControl.expectAndReturn(mockAbstractEditorForm.getId(), OID);
        mockAbstractEditorFormControl.expectAndReturn(mockAbstractEditorForm.getAction(),
                EditObjectAction.CREATE_ACTION);
        mockAbstractEditorForm.setAction(null);
        mockAbstractEditorForm.setId(OID);
        mockObjectRepository.insert(new Project());
        mockObjectRepositoryControl.setMatcher(new ArgumentsTypeMatcher());
        mockObjectRepositoryControl.setReturnValue(OID);
        support.setForward("view/projects", "projects.jsp");

        replay();
View Full Code Here

        ResultSet rs = null;
        try {
            rs = statement.executeQuery("select person_id,role from personrole");
            while (rs.next()) {
                for (int i = 0; i < projects.size(); i++) {
                    Project project = (Project)projects.get(i);
                    Role role = getRole(session, rs.getString("role"));
                    int personId = rs.getInt("person_id");
                    session.save(new RoleAssociation(project.getId(), personId, role.getId()));
                    // Person should have permission to read/edit their own profile
                    session.save(new Permission("system.person", 0, personId, "read%"));
                    session.save(new Permission("system.person", personId, personId, "edit%"));
                }
            }
View Full Code Here

TOP

Related Classes of org.nxplanner.domain.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.