Examples of browseForGoal()


Examples of org.springframework.hateoas.client.Agent.browseForGoal()

    // 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 ---");
    System.out.println(result.toString());
    System.out.println("--------------\n");
  }
View Full Code Here

Examples of org.springframework.hateoas.client.Agent.browseForGoal()

    // 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
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.