Package org.sonatype.nexus.rest.model

Examples of org.sonatype.nexus.rest.model.ScheduledServiceResourceResponse


    ScheduledServicePropertyResource prop2 = new ScheduledServicePropertyResource();
    prop2.setKey("id2");
    prop2.setValue("value2");
    resource.addProperty(prop2);

    ScheduledServiceResourceResponse resourceResponse = new ScheduledServiceResourceResponse();
    resourceResponse.setData(resource);

    this.marshalUnmarchalThenCompare(resourceResponse);
    this.validateXmlHasNoPackageNames(resourceResponse);

  }
View Full Code Here


    ScheduledServicePropertyResource prop2 = new ScheduledServicePropertyResource();
    prop2.setKey("id2");
    prop2.setValue("value2");
    resource.addProperty(prop2);

    ScheduledServiceResourceResponse resourceResponse = new ScheduledServiceResourceResponse();
    resourceResponse.setData(resource);

    this.marshalUnmarchalThenCompare(resourceResponse);
    this.validateXmlHasNoPackageNames(resourceResponse);
  }
View Full Code Here

    ScheduledServicePropertyResource prop2 = new ScheduledServicePropertyResource();
    prop2.setKey("id2");
    prop2.setValue("value2");
    resource.addProperty(prop2);

    ScheduledServiceResourceResponse resourceResponse = new ScheduledServiceResourceResponse();
    resourceResponse.setData(resource);

    this.marshalUnmarchalThenCompare(resourceResponse);
    this.validateXmlHasNoPackageNames(resourceResponse);
  }
View Full Code Here

    ScheduledServicePropertyResource prop2 = new ScheduledServicePropertyResource();
    prop2.setKey("id2");
    prop2.setValue("value2");
    resource.addProperty(prop2);

    ScheduledServiceResourceResponse resourceResponse = new ScheduledServiceResourceResponse();
    resourceResponse.setData(resource);

    this.marshalUnmarchalThenCompare(resourceResponse);
    this.validateXmlHasNoPackageNames(resourceResponse);
  }
View Full Code Here

    ScheduledServicePropertyResource prop2 = new ScheduledServicePropertyResource();
    prop2.setKey("id2");
    prop2.setValue("value2");
    resource.addProperty(prop2);

    ScheduledServiceResourceResponse resourceResponse = new ScheduledServiceResourceResponse();
    resourceResponse.setData(resource);

    this.marshalUnmarchalThenCompare(resourceResponse);
    this.validateXmlHasNoPackageNames(resourceResponse);
  }
View Full Code Here

    ScheduledServicePropertyResource prop2 = new ScheduledServicePropertyResource();
    prop2.setKey("id2");
    prop2.setValue("value2");
    resource.addProperty(prop2);

    ScheduledServiceResourceResponse resourceResponse = new ScheduledServiceResourceResponse();
    resourceResponse.setData(resource);

    this.marshalUnmarchalThenCompare(resourceResponse);
    this.validateXmlHasNoPackageNames(resourceResponse);
  }
View Full Code Here

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

    ScheduledServiceResourceResponse resourceResponse = new ScheduledServiceResourceResponse();
    resourceResponse.setData(scheduledTask);

    // System.out.println( "xml:\n"+ this.xstreamXML.toXML( resourceResponse ) );

    this.marshalUnmarchalThenCompare(resourceResponse);
    this.validateXmlHasNoPackageNames(resourceResponse);
View Full Code Here

    this.setModifiable(true);
  }

  @Override
  public Object getPayloadInstance() {
    return new ScheduledServiceResourceResponse();
  }
View Full Code Here

  @Override
  @GET
  public ScheduledServiceResourceResponse get(Context context, Request request, Response response, Variant variant)
      throws ResourceException
  {
    ScheduledServiceResourceResponse result = new ScheduledServiceResourceResponse();
    try {
      ScheduledTask<?> task = getNexusScheduler().getTaskById(getScheduledServiceId(request));

      ScheduledServiceBaseResource resource = getServiceRestModel(task);

      if (resource != null) {
        result.setData(resource);
      }
      else {
        throw new ResourceException(Status.CLIENT_ERROR_NOT_FOUND, "Invalid schedule id ("
            + getScheduledServiceId(request) + "), can't load task.");
      }
View Full Code Here

  @Override
  @PUT
  public ScheduledServiceResourceStatusResponse put(Context context, Request request, Response response, Object payload)
      throws ResourceException
  {
    ScheduledServiceResourceResponse serviceRequest = (ScheduledServiceResourceResponse) payload;
    ScheduledServiceResourceStatusResponse result = null;

    if (serviceRequest != null) {
      ScheduledServiceBaseResource resource = serviceRequest.getData();

      try {
        // currently we allow editing of:
        // task name
        // task schedule (even to another type)
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.rest.model.ScheduledServiceResourceResponse

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.