Package org.springframework.hateoas.client

Examples of org.springframework.hateoas.client.SubmitFormAction


    // order of follow rel actions is significant
    agent.addFollowRelAction(new FollowRelAction("search"));
    agent.addFollowRelAction(new FollowRelAction("products"));

    // enable client to submit form when encountered
    agent.addSubmitFormAction(new SubmitFormAction("searchPerson", Args.of("personId", personId)));

    agent.setGoal(describedBy("http://example.com/doc#product").within(describedBy("http://example.com/doc#customer")));
    Browsable result = agent.browseForGoal();

    System.out.println("\n--- result ---");
View Full Code Here


    // could we construct schema.org actions for this?
    agent.identifyGoal("http://localhost:8080/banking/ns/transfer", browser.getCurrentContext());

    // enable client to submit forms
    // TODO: look into schema.org actions to see if they say something about required data for an action.
    agent.addSubmitFormAction(new SubmitFormAction("bankAccountForm", Args.of("accountNumber", fromAccount)));
    agent.addSubmitFormAction(new SubmitFormAction("moneyTransferForm", Args.of("amount", amount, "to", toAccount)));

    Browsable result = agent.browseForGoal();
    System.out.println("\n--- result ---");
    System.out.println(result.toString());
    System.out.println("--------------\n");
View Full Code Here

TOP

Related Classes of org.springframework.hateoas.client.SubmitFormAction

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.