Examples of MileStone


Examples of com.github.api.v2.schema.Milestone

  public Milestone createMilestone(String userName, String repositoryName,
      String title, String description,
      com.github.api.v2.schema.Milestone.State state, Date dueDate) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.IssueApiUrls.CREATE_MILESTONE_URL);
        String                apiUrl  = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).buildUrl();
        Milestone bean = new Milestone();
        bean.setTitle(title);
        bean.setDescription(description);
        bean.setState(state);
        bean.setDueOn(dueDate);
        JsonObject json = unmarshall(callApiMethod(apiUrl, marshall(bean), ApplicationConstants.CONTENT_TYPE_JSON, HttpMethod.POST, 201));
       
        return unmarshall(new TypeToken<Milestone>(){}, json);
  }
View Full Code Here

Examples of com.github.api.v2.schema.Milestone

  public Milestone updateMilestone(String userName, String repositoryName,
      String milestoneId, String title, String description,
      com.github.api.v2.schema.Milestone.State state, Date dueDate) {
    GitHubApiUrlBuilder builder = createGitHubApiUrlBuilder(GitHubApiUrls.IssueApiUrls.UPDATE_MILESTONE_URL);
    String apiUrl = builder.withField(ParameterNames.USER_NAME, userName).withField(ParameterNames.REPOSITORY_NAME, repositoryName).withField(ParameterNames.MILESTONE_ID, milestoneId).buildUrl();
    Milestone milestone = new Milestone();
    milestone.setTitle(title);
    milestone.setDescription(description);
    milestone.setState(state);
    milestone.setDueOn(dueDate);
        JsonObject json = unmarshall(callApiMethod(apiUrl, marshall(milestone), ApplicationConstants.CONTENT_TYPE_JSON, HttpMethod.POST, 200));
        return unmarshall(new TypeToken<Milestone>(){}, json);
  }
View Full Code Here

Examples of com.jcabi.github.Milestone

     * @throws Exception - if something goes wrong.
     */
    @Test
    public void createsMilestone() throws Exception {
        final Milestones milestones = this.repo().milestones();
        final Milestone milestone = milestones.create("test milestone");
        MatcherAssert.assertThat(milestone, Matchers.notNullValue());
        MatcherAssert.assertThat(
            milestones.create("another milestone"),
            Matchers.notNullValue()
        );
View Full Code Here

Examples of com.jcabi.github.Milestone

     * @throws Exception - if something goes wrong.
     */
    @Test
    public void getsMilestone() throws Exception {
        final Milestones milestones = this.repo().milestones();
        final Milestone created = milestones.create("test");
        MatcherAssert.assertThat(
            milestones.get(created.number()),
            Matchers.notNullValue()
        );
    }
View Full Code Here

Examples of com.jcabi.github.Milestone

     * @throws Exception - if something goes wrong.
     */
    @Test
    public void removesMilestone() throws Exception {
        final Milestones milestones = this.repo().milestones();
        final Milestone created = milestones.create("testTitle");
        MatcherAssert.assertThat(
            milestones.iterate(new ArrayMap<String, String>()),
            Matchers.<Milestone>iterableWithSize(1)
        );
        milestones.remove(created.number());
        MatcherAssert.assertThat(
            milestones.iterate(new ArrayMap<String, String>()),
            Matchers.<Milestone>iterableWithSize(0)
        );
    }
View Full Code Here

Examples of com.nineteendrops.tracdrops.client.api.ticket.milestone.Milestone

        if(parameter == null){
            throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "Milestone", this.getClass().getName()));
        }

        Milestone milestone = (Milestone)parameter;

        // check for mandatory fields
        String name = milestone.getName();
        if(name == null || name.trim().equals("")){
            throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "Milestone.name", this.getClass().getName()));
        }

        Date due = milestone.getDue();
        if(due == null){
            throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "Milestone.due", this.getClass().getName()));
        }

        String description = milestone.getDescription();
        if(description == null){
            description = "";
        }

View Full Code Here

Examples of com.nineteendrops.tracdrops.client.api.ticket.milestone.Milestone

public class HashMapToMilestoneDecoder implements ReturnDecoder {

    public Object decode(Object result, TracProperties tracProperties, ArrayList keptParametersForDecoder) {

        HashMap map = (HashMap)result;
        Milestone milestone =  new Milestone((String)map.get(MilestoneKeys.NAME),
                                             (String)map.get(MilestoneKeys.DESCRIPTION),
                                             (Integer)map.get(MilestoneKeys.COMPLETED) == 1,
                                             (Date)map.get(MilestoneKeys.DUE));

        return milestone;
View Full Code Here

Examples of com.nineteendrops.tracdrops.client.api.ticket.milestone.Milestone

    private Log log = LogFactory.getLog(MilestoneTestCreate.class);

    public void create(){

        Milestone milestone = new Milestone("M1TESTNG", "test de create", true, new Date());

        Integer returnValue = milestoneManager.create(milestone);

        System.out.println(returnValue);
    }
View Full Code Here

Examples of com.nineteendrops.tracdrops.client.api.ticket.milestone.Milestone

    }

    @Test (dataProvider = "milestoneProvider", dependsOnMethods = "milestoneDelete")
    public void milestoneCreate(String name, String description, Date due){

        milestoneManager.create(new Milestone(name, description, false, due));
    }
View Full Code Here

Examples of de.arago.rike.commons.data.Milestone

        long now = new Date().getTime();

        int i = 1;

        for (OverdueMilestone o : milestones) {
            Milestone stone = o.getMilestone();

            ticks.add("<a href='/web/guest/rike/-/show/milestone/"+stone.getId()+"'>"+StringEscapeUtils.escapeHtml(stone.getTitle()) + "</a>");

            GregorianCalendar c = new GregorianCalendar();
            c.setTime(stone.getDueDate());
            c.add(Calendar.HOUR_OF_DAY, -((o.getWorkLeftInHours()-o.getWorkInProgressInHours()) * 7 * 24) / stone.getPerformance());
            long time1 = c.getTimeInMillis();
            c.add(Calendar.HOUR_OF_DAY, -(o.getWorkInProgressInHours() * 7 * 24) / stone.getPerformance());
            long time2 = c.getTimeInMillis();
            c.add(Calendar.HOUR_OF_DAY, -(o.getWorkDoneInHours() * 7 * 24) / stone.getPerformance());
            long time3 = c.getTimeInMillis();

            List item = new ArrayList();
            item.add(time1);
            item.add(i);
            item.add(stone.getDueDate().getTime());
            item.add("");
            openData.add(item);


            item = new ArrayList();
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.