Package org.sonatype.nexus.rest.model

Examples of org.sonatype.nexus.rest.model.ScheduledServiceBaseResource.addProperty()


    scheduledTask.setEnabled(true);
    scheduledTask.setId(null);
    scheduledTask.setName(name);
    scheduledTask.setTypeId(SnapshotRemovalTaskDescriptor.ID);
    scheduledTask.setSchedule("manual");
    scheduledTask.addProperty(repositoryProp);
    scheduledTask.addProperty(keepSnapshotsProp);
    scheduledTask.addProperty(ageProp);
    scheduledTask.addProperty(removeReleasedProp);

    Status status = TaskScheduleUtil.create(scheduledTask);
View Full Code Here


    scheduledTask.setId(null);
    scheduledTask.setName(name);
    scheduledTask.setTypeId(SnapshotRemovalTaskDescriptor.ID);
    scheduledTask.setSchedule("manual");
    scheduledTask.addProperty(repositoryProp);
    scheduledTask.addProperty(keepSnapshotsProp);
    scheduledTask.addProperty(ageProp);
    scheduledTask.addProperty(removeReleasedProp);

    Status status = TaskScheduleUtil.create(scheduledTask);
View Full Code Here

    scheduledTask.setEnabled(true);
    scheduledTask.setId(null);
    scheduledTask.setName(taskName);
    scheduledTask.setTypeId(UpdateIndexTaskDescriptor.ID);
    scheduledTask.setSchedule("manual");
    scheduledTask.addProperty(prop);
    Status status = TaskScheduleUtil.create(scheduledTask);

    Assert.assertTrue(status.isSuccess());

    return TaskScheduleUtil.getTask(taskName).getId();
View Full Code Here

    scheduledTask.setName(taskName);
    scheduledTask.setTypeId(typeId);
    scheduledTask.setSchedule("manual");

    for (ScheduledServicePropertyResource property : properties) {
      scheduledTask.addProperty(property);
    }

    Status status = create(scheduledTask);
    assertThat("Unable to create task:" + scheduledTask.getTypeId(), status.isSuccess(), is(true));
View Full Code Here

    scheduledTask.setName(name);
    scheduledTask.setTypeId(SnapshotRemovalTaskDescriptor.ID);
    scheduledTask.setSchedule("manual");
    scheduledTask.addProperty(repositoryProp);
    scheduledTask.addProperty(keepSnapshotsProp);
    scheduledTask.addProperty(ageProp);
    scheduledTask.addProperty(removeReleasedProp);

    Status status = TaskScheduleUtil.create(scheduledTask);

    Assert.assertTrue(status.isSuccess());
View Full Code Here

    scheduledTask.setTypeId(SnapshotRemovalTaskDescriptor.ID);
    scheduledTask.setSchedule("manual");
    scheduledTask.addProperty(repositoryProp);
    scheduledTask.addProperty(keepSnapshotsProp);
    scheduledTask.addProperty(ageProp);
    scheduledTask.addProperty(removeReleasedProp);

    Status status = TaskScheduleUtil.create(scheduledTask);

    Assert.assertTrue(status.isSuccess());
  }
View Full Code Here

    changed.setEnabled(true);
    changed.setId(resource.getId());
    changed.setName("otherName");
    changed.setTypeId(resource.getTypeId());
    changed.setSchedule(resource.getSchedule());
    changed.addProperty(TaskScheduleUtil.newProperty("repositoryId", getTestRepositoryId()));
    changed.addProperty(TaskScheduleUtil.newProperty("time", String.valueOf(10)));

    Status status = TaskScheduleUtil.update(changed);

    assertThat("Should not have been able to update task with state " + resource.getStatus() + ", "
View Full Code Here

    changed.setId(resource.getId());
    changed.setName("otherName");
    changed.setTypeId(resource.getTypeId());
    changed.setSchedule(resource.getSchedule());
    changed.addProperty(TaskScheduleUtil.newProperty("repositoryId", getTestRepositoryId()));
    changed.addProperty(TaskScheduleUtil.newProperty("time", String.valueOf(10)));

    Status status = TaskScheduleUtil.update(changed);

    assertThat("Should not have been able to update task with state " + resource.getStatus() + ", "
        + status.getDescription(), status, isClientError());
View Full Code Here

    scheduledTask.setTypeId(UpdateIndexTaskDescriptor.ID);

    ScheduledServicePropertyResource prop = new ScheduledServicePropertyResource();
    prop.setKey("repositoryId");
    prop.setValue("all_repo");
    scheduledTask.addProperty(prop);

    Status status = TaskScheduleUtil.create(scheduledTask);
    Assert.assertTrue("Unable to create a task " + status, status.isSuccess());

    List<ScheduledServiceListResource> tasks = TaskScheduleUtil.getTasks();
View Full Code Here

    base.setEnabled(true);

    ScheduledServicePropertyResource prop1 = new ScheduledServicePropertyResource();
    prop1.setKey("id1");
    prop1.setValue("value1");
    base.addProperty(prop1);

    ScheduledServicePropertyResource prop2 = new ScheduledServicePropertyResource();
    prop2.setKey("id2");
    prop2.setValue("value2");
    base.addProperty(prop2);
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.