@RestController public class LedgerController extends Object
| Constructor and Description |
|---|
LedgerController(Principal principal,
LedgerService ledgerService) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<LedgerAccountBO> |
findLedgerAccount(String ledgerId,
String accountName)
Find the ledger account with the given name
|
org.springframework.http.ResponseEntity<LedgerAccountBO> |
findLedgerAccountById(String id) |
org.springframework.http.ResponseEntity<LedgerAccountBO> |
findLedgerAccountByName(String ledgerName,
String accountName)
Find the ledger account with the given ledger name and account name and reference date.
|
org.springframework.http.ResponseEntity<LedgerBO> |
findLedgerById(String id) |
org.springframework.http.ResponseEntity<LedgerBO> |
findLedgerByName(String ledgerName)
Find the ledger with the given name.
|
org.springframework.http.ResponseEntity<Void> |
newLedger(LedgerBO ledger,
org.springframework.web.util.UriBuilder uri)
Creates a new Ledger.
|
org.springframework.http.ResponseEntity<Void> |
newLedgerAccount(LedgerAccountBO ledgerAccount,
org.springframework.web.util.UriBuilder uri)
Create a new Ledger account.
|
public LedgerController(Principal principal, LedgerService ledgerService)
@PostMapping(path="/ledgers") public org.springframework.http.ResponseEntity<Void> newLedger(LedgerBO ledger, org.springframework.web.util.UriBuilder uri)
ledger - Ledger object@GetMapping(path="/ledgers/{id}")
public org.springframework.http.ResponseEntity<LedgerBO> findLedgerById(@PathVariable(value="id")
String id)
@GetMapping(path="/ledgers",
params="ledgerName")
public org.springframework.http.ResponseEntity<LedgerBO> findLedgerByName(@RequestParam(name="ledgerName")
String ledgerName)
ledgerName - name of corresponding Ledger@PostMapping(path="/accounts") public org.springframework.http.ResponseEntity<Void> newLedgerAccount(@RequestBody LedgerAccountBO ledgerAccount, org.springframework.web.util.UriBuilder uri)
While creating a ledger account, the parent hat to be specified.
ledgerAccount - Ledger account@GetMapping(path="/accounts/{id}")
public org.springframework.http.ResponseEntity<LedgerAccountBO> findLedgerAccountById(@PathVariable(value="id")
String id)
@GetMapping(path="/accounts",
params={"ledgerName","accountName"})
public org.springframework.http.ResponseEntity<LedgerAccountBO> findLedgerAccountByName(@RequestParam(name="ledgerName")
String ledgerName,
@RequestParam(name="accountName")
String accountName)
ledgerName - name of ledgeraccountName - name of account@GetMapping(path="/ledgers/{ledgerId}/accounts",
params="accountName")
public org.springframework.http.ResponseEntity<LedgerAccountBO> findLedgerAccount(@PathVariable(value="ledgerId")
String ledgerId,
@RequestParam(name="accountName")
String accountName)
accountName - name of corresponding accountCopyright © 2019. All rights reserved.