Package org.zanata.rest.dto

Examples of org.zanata.rest.dto.ProjectIteration


                projectIterationDAO.getBySlug(projectSlug, versionSlug);
        if (hProjectIteration == null) {
            return Response.status(Response.Status.NOT_FOUND).build();
        }

        ProjectIteration it = new ProjectIteration();
        ProjectIterationService.transfer(hProjectIteration, it);

        return Response.ok(it).tag(etag).build();
    }
View Full Code Here


        project.setName(projectSlug);

        ClientResponse response = projectResource.put(project);
        checkStatusAndReleaseConnection(response);

        ProjectIteration iteration = new ProjectIteration();
        iteration.setId(iterationSlug);
        IProjectIterationResource projectIteration =
                zanataProxyFactory.getProjectIteration(projectSlug,
                        iterationSlug);

        ClientResponse iterationResponse = projectIteration.put(iteration);
View Full Code Here

                        getIterationSlug());
        if (hProjectIteration == null) {
            return Response.status(Status.NOT_FOUND).build();
        }

        ProjectIteration it = new ProjectIteration();
        transfer(hProjectIteration, it);

        return Response.ok(it).tag(etag).build();
    }
View Full Code Here

    public static Project toResource(HProject hProject, MediaType mediaType) {
        Project project = new Project();
        transfer(hProject, project);
        for (HProjectIteration pIt : hProject.getProjectIterations()) {
            ProjectIteration iteration = new ProjectIteration();
            ProjectIterationService.transfer(pIt, iteration);

            iteration
                    .getLinks(true)
                    .add(new Link(
                            URI.create("iterations/i/" + pIt.getSlug()),
                            "self",
                            MediaTypes
View Full Code Here

                // assertThat(project.getType(),
                // is(ProjectType.IterationProject));
                assertThat(project.getIterations().size(), is(3));

                // Iteration 1
                ProjectIteration iteration = project.getIterations().get(0);
                assertThat(iteration.getId(), is("1.0"));
                assertThat(iteration.getStatus(), is(EntityStatus.ACTIVE));

                // Iteration 2
                iteration = project.getIterations().get(1);
                assertThat(iteration.getId(), is("1.1"));
                assertThat(iteration.getStatus(), is(EntityStatus.ACTIVE));
            }
        }.run();
    }
View Full Code Here

                // assertThat(project.getType(),
                // is(ProjectType.IterationProject));
                assertThat(project.getIterations().size(), is(3));

                // Iteration 1
                ProjectIteration iteration = project.getIterations().get(0);
                assertThat(iteration.getId(), is("1.0"));
                assertThat(iteration.getStatus(), is(EntityStatus.ACTIVE));

                // Iteration 2
                iteration = project.getIterations().get(1);
                assertThat(iteration.getId(), is("1.1"));
                assertThat(iteration.getStatus(), is(EntityStatus.ACTIVE));
            }
        }.run();
    }
View Full Code Here

        final Project project =
                new Project("test-project", "Test Project",
                        ProjectType.Gettext.toString(),
                        "This is a Test project");
        project.setStatus(EntityStatus.ACTIVE);
        project.getIterations(true).add(new ProjectIteration("test-1.0"));
        project.getIterations(true).add(new ProjectIteration("test-2.0"));

        new ResourceRequest(getRestEndpointUrl("/projects/p/test-project"),
                "PUT", getAuthorizedEnvironment()) {
            @Override
            protected void prepareRequest(ClientRequest request) {
View Full Code Here

        final Project project =
                new Project("test-project", "Test Project",
                        ProjectType.Gettext.toString(),
                        "This is a Test project");
        project.setStatus(EntityStatus.ACTIVE);
        project.getIterations(true).add(new ProjectIteration("test-1.0"));
        project.getIterations(true).add(new ProjectIteration("test-2.0"));

        new ResourceRequest(
                getRestEndpointUrl("/projects/p/test-project-json"), "PUT",
                getAuthorizedEnvironment()) {
            @Override
View Full Code Here

            @Override
            protected void onResponse(ClientResponse response) {
                assertThat(response.getStatus(), is(200)); // Ok
                assertJaxbUnmarshal(response, ProjectIteration.class);

                ProjectIteration iteration =
                        jaxbUnmarshal(response, ProjectIteration.class);
                assertThat(iteration.getId(), is("1.0"));
                assertThat(iteration.getStatus(), is(EntityStatus.ACTIVE));
            }
        }.run();
    }
View Full Code Here

            @Override
            protected void onResponse(ClientResponse response) {
                assertThat(response.getStatus(), is(200)); // Ok
                assertJsonUnmarshal(response, ProjectIteration.class);

                ProjectIteration iteration =
                        jsonUnmarshal(response, ProjectIteration.class);
                assertThat(iteration.getId(), is("1.0"));
                assertThat(iteration.getStatus(), is(EntityStatus.ACTIVE));
            }
        }.run();
    }
View Full Code Here

TOP

Related Classes of org.zanata.rest.dto.ProjectIteration

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.