Package org.springframework.hateoas.action

Examples of org.springframework.hateoas.action.ActionDescriptor


    return new HttpEntity<PersonResource>(resource);
  }

  @RequestMapping(value = "/customer", method = RequestMethod.GET)
  public HttpEntity<ActionDescriptor> searchPersonForm() {
    ActionDescriptor form = ControllerActionBuilder.createActionFor(methodOn(PersonController.class).showPerson(1L),
        "searchPerson");
    return new HttpEntity<ActionDescriptor>(form);
  }
View Full Code Here


  @RequestMapping(value = "/customer/{personId}/edit")
  public HttpEntity<ActionDescriptor> editPersonForm(@RequestParam Long personId) {

    Person person = personAccess.getPerson(personId);

    ActionDescriptor descriptor = ControllerActionBuilder.createActionFor(
        methodOn(PersonController.class).editPerson(person.getId(), person.getFirstname(), person.getLastname()),
        "changePerson");

    return new HttpEntity<ActionDescriptor>(descriptor);
  }
View Full Code Here

    return new HttpEntity<Model>(model);
  }

  @RequestMapping(value = { "/account" }, method = RequestMethod.GET)
  public HttpEntity<ActionDescriptor> bankAccountForm() {
    ActionDescriptor form = ControllerActionBuilder.createActionFor(methodOn(BankingController.class).bankAccount(null),
        "bankAccountForm");
    return new HttpEntity<ActionDescriptor>(form);
  }
View Full Code Here

  }

  @RequestMapping("/account/{accountNumber}/transfer")
  public HttpEntity<ActionDescriptor> moneyTransferForm(@PathVariable String accountNumber) {

    ActionDescriptor form = createActionFor(methodOn(BankingController.class).moneyTransfer(accountNumber, null, null),
        "moneyTransferForm");
    return new HttpEntity<ActionDescriptor>(form);
  }
View Full Code Here

TOP

Related Classes of org.springframework.hateoas.action.ActionDescriptor

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.