Examples of CreateRequest


Examples of org.eclipse.wb.gef.core.requests.CreateRequest

  ////////////////////////////////////////////////////////////////////////////
  @Override
  protected boolean isRequestCondition(Request request) {
    // we understand only LayoutInfo drop
    if (request.getType() == Request.REQ_CREATE) {
      CreateRequest createRequest = (CreateRequest) request;
      return createRequest.getNewObject() instanceof LayoutInfo;
    }
    return false;
  }
View Full Code Here

Examples of org.graylog2.rest.resources.dashboards.requests.CreateRequest

            @ApiResponse(code = 403, message = "Request must be performed against master node.")
    })
    public Response create(@ApiParam(required = true) String body) {
        restrictToMaster();

        CreateRequest cr;
        try {
            cr = objectMapper.readValue(body, CreateRequest.class);
        } catch(IOException e) {
            LOG.error("Error while parsing JSON", e);
            throw new WebApplicationException(e, Response.Status.BAD_REQUEST);
View Full Code Here

Examples of org.graylog2.rest.resources.users.requests.CreateRequest

        if (body == null || body.isEmpty()) {
            LOG.error("Missing parameters. Returning HTTP 400.");
            throw new WebApplicationException(400);
        }

        CreateRequest cr = getCreateRequest(body);

        if (userService.load(cr.username) != null) {
            LOG.error("Cannot create user {}: username is already taken.", cr.username);
            return status(BAD_REQUEST).build();
        }
View Full Code Here

Examples of org.graylog2.rest.resources.users.requests.CreateRequest

                               @ApiParam(name = "JSON body", value = "Updated user information.", required = true) String body) {
        if (body == null || body.isEmpty()) {
            throw new BadRequestException("Missing request body.");
        }
        checkPermission(USERS_EDIT, username);
        CreateRequest cr = getCreateRequest(body);

        final User user = userService.load(username);
        if (user == null) {
            return status(NOT_FOUND).build();
        }
View Full Code Here

Examples of org.graylog2.rest.resources.users.requests.CreateRequest

        return map;
    }

    private CreateRequest getCreateRequest(String body) {
        CreateRequest cr;
        try {
            cr = objectMapper.readValue(body, CreateRequest.class);
        } catch(IOException e) {
            LOG.error("Error while parsing JSON", e);
            throw new WebApplicationException(e, BAD_REQUEST);
View Full Code Here

Examples of org.nimbustools.api.repr.CreateRequest

        logger.info(rm.getVMMReport());

        // Three regular VMs should preempt
        Caller caller = this.populator().getCaller();
        CreateRequest req = this.populator().getCreateRequest("regular", 1200, 256 , 3);
        rm.create(req, caller);

        logger.debug("Waiting 2 seconds for resources to be allocated.");
        Thread.sleep(2000);
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.