Package org.internna.ossmoney.model

Examples of org.internna.ossmoney.model.FinancialInstitution


    @RequestMapping(value = "/import", method = RequestMethod.POST)
    public String upload(byte[] input, byte[] investment, String locale, long institution, ModelMap modelMap) {
      String[] splitted = locale.split("_");
      Locale currency = new Locale(splitted[0], splitted[1], "");
      FinancialInstitution financialInstitution = FinancialInstitution.findFinancialInstitution(institution);
      List<Message> messages = qifService.importQIF(currency, financialInstitution, new ByteArrayInputStream(input), investment != null && investment.length > 0 ? new ByteArrayInputStream(investment) : null);
      modelMap.addAttribute("messages", messages);
      return "qif/result";
    }
View Full Code Here


  @Test
  public void testCreateInstitution() {
    service.createInstitution("foobar", "http://www.google.com", "http://www.google.com/logo");
    assertNotNull("Payee created", Payee.findByName("foobar"));
    FinancialInstitution institution = FinancialInstitution.findByName("foobar");
    assertNotNull("Institution created", institution);
    assertEquals("Icon URL persisted", "http://www.google.com/logo", institution.getIcon());
  }
View Full Code Here

    createInstitution(user, name, web, icon);
  }

  @Override public void createInstitution(UserDetails owner, String name, String web, String icon) {
    if (hasText(name) && (owner != null)) {
      FinancialInstitution institution = new FinancialInstitution();
      institution.setWeb(web);
      institution.setIcon(icon);
      institution.setName(name);
      institution.setOwner(owner);
      institution.persist();
      owner.getInstitutions().add(institution);
      owner.merge();
      createPayee(owner, name);
    }
  }
View Full Code Here

            }
            if (account.getAccountType() != null) {
                account.setAccountType(AccountType.entityManager().getReference(AccountType.class, account.getAccountType().getId()));
            }
            if (account.getHeldAt() != null) {
              FinancialInstitution institution = FinancialInstitution.findFinancialInstitution(account.getHeldAt().getId());
                institution.addAccount(account);
            }
            if ((account.getInitialBalance() == null) || (account.getInitialBalance().doubleValue() < 0)) {
                account.setInitialBalance(BigDecimal.ZERO);
            }
            account.persist();
View Full Code Here

TOP

Related Classes of org.internna.ossmoney.model.FinancialInstitution

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.