Examples of Account


Examples of org.ethereum.core.Account

      data = new byte[] {};
    }

        byte[] contractAddress = Hex.decode( contractAddrInput.getText());

        Account account = ((AccountWrapper)creatorAddressCombo.getSelectedItem()).getAccount();

        byte[] senderPrivKey = account.getEcKey().getPrivKeyBytes();

        BigInteger nonce = account.getNonce();
        BigInteger gasPrice = new BigInteger("10000000000000");

        BigInteger gasBI = new BigInteger(gasInput.getText());
        byte[] gasValue  = BigIntegers.asUnsignedByteArray(gasBI);
        BigInteger endowment = new BigInteger("1000");
View Full Code Here

Examples of org.eurekaj.api.datatypes.Account

       
        if ((isPost(e) || isPut(e)) && isAdmin(loggedInUser)) {
          AccessTokenModel accessTokenModel = new Gson().fromJson(getHttpMessageContent(e), AccessTokenModel.class);
          BasicAccessToken newAccessToken = accessTokenModel.getAccessToken();
         
          Account account = getAccountService().getAccount(loggedInUser.getAccountName());
         
          if (account != null && newAccessToken != null && newAccessToken.getId() != null && newAccessToken.getId().length() >= 16) {
            newAccessToken.setAccountName(account.getId());
            logger.info("Persisting AccessToken: " + new Gson().toJson(newAccessToken));
            getAccountService().persistAccessToken(newAccessToken);
            if (account.getAccessTokens() == null) {
              BasicAccount newAccount = new BasicAccount(account);
              newAccount.setAccessTokens(new ArrayList<String>());
              account = newAccount;
            }
            account.getAccessTokens().add(newAccessToken.getId());
            getAccountService().persistAccount(account);
          }
         
          jsonResponse = new Gson().toJson(accessTokenModel);
        } else if (isGet(e) && isAdmin(loggedInUser)) {
          logger.info("Account Name: " + loggedInUser.getAccountName());
          Account account = getAccountService().getAccount(loggedInUser.getAccountName());
          logger.info("Account: " + account);
          List<String> accessTokens = account.getAccessTokens();
          if (accessTokens == null) {
            accessTokens = new ArrayList<>();
          }
         
          JsonArray accessTokenArray = new JsonArray();
          for (String accessToken : accessTokens) {
            AccessToken accessTokenObject = getAccountService().getAccessToken(accessToken);
            if (accessTokenObject != null && accessTokenObject.getAccountName().equals(account.getId())) {
              accessTokenArray.add(new Gson().toJsonTree(accessTokenObject));
            }
          }
         
          JsonObject accessTokensJson = new JsonObject();
View Full Code Here

Examples of org.exist.security.Account

                }

                DBBroker broker = null;
                try {
                    broker = getDatabase().get(null);
                    final Account user = broker.getSubject();

                    if(!(account.getName().equals(user.getName()) || user.hasDbaRole()) ) {
                        throw new PermissionDeniedException("You are not allowed to delete '" +account.getName() + "' user");
                    }

                    remove_account.setRemoved(true);
                    remove_account.setCollection(broker, collectionRemovedAccounts, XmldbURI.create(UUIDGenerator.getUUID()+".xml"));
View Full Code Here

Examples of org.fenixedu.academic.domain.accounting.Account

        super.setNationality(country);
    }

    public Account createAccount(AccountType accountType) {
        checkAccountsFor(accountType);
        return new Account(accountType, this);
    }
View Full Code Here

Examples of org.gestern.gringotts.Account

    public double getBalance(String playerName){
        AccountHolder owner = gringotts.accountHolderFactory.getAccount(playerName);
        if (owner == null) {
            return 0;
        }
        Account account = gringotts.accounting.getAccount(owner);
        return account.balance();
    }
View Full Code Here

Examples of org.hfuu.uaadac.domain.Account

      HttpSession session, HttpServletResponse resp) {
    // cookie 存在,则直接登录完成
    if (!"".equals(accountId)) {
      accountId = CipherHelper.decrypt(accountId.getBytes(Charsets.UTF_8));
     
      Account account = accountService.getAccount(Long.getLong(accountId));
      if (null != account) {
        OnlineAccount onlineAccount = new OnlineAccount();
        onlineAccount.setAccount(account.getAccounts());
        onlineAccount.setAccountId(account.getId());
        onlineAccount.setSessionId(session.getId());
        onlineAccount.setAccountStatus(true);
       
        onlineAccountService.addOnlineAccount(onlineAccount);
       
View Full Code Here

Examples of org.hibernate.ogm.backendtck.embeddable.Account

  @Before
  public void preapreDB() throws Exception {
    getTransactionManager().begin();
    final EntityManager em = getFactory().createEntityManager();

    account = new Account();
    account.setLogin( "emmanuel" );
    account.setPassword( "like I would tell ya" );
    account.setHomeAddress( new Address() );

    address = account.getHomeAddress();
View Full Code Here

Examples of org.hibernate.test.cache.infinispan.functional.classloader.Account

      Integer id = new Integer(1);
      dao0.createAccount(dao0.getSmith(), id, new Integer(5), DualNodeTestCase.LOCAL);

      // Basic sanity check
      Account acct1 = dao1.getAccount(id);
      assertNotNull(acct1);
      assertEquals(DualNodeTestCase.LOCAL, acct1.getBranch());

      // This dao's session factory isn't caching, so cache won't see this change
      dao1.updateAccountBranch(id, DualNodeTestCase.REMOTE);

      // dao1's session doesn't touch the cache,
      // so reading from dao0 should show a stale value from the cache
      // (we check to confirm the cache is used)
      Account acct0 = dao0.getAccount(id);
      assertNotNull(acct0);
      assertEquals(DualNodeTestCase.LOCAL, acct0.getBranch());
      log.debug("Contents when re-reading from local: " + TestingUtil.printCache(localCache));

      // Now call session.refresh and confirm we get the correct value
      acct0 = dao0.getAccountWithRefresh(id);
      assertNotNull(acct0);
      assertEquals(DualNodeTestCase.REMOTE, acct0.getBranch());
      log.debug("Contents after refreshing in remote: " + TestingUtil.printCache(localCache));

      // Double check with a brand new session, in case the other session
      // for some reason bypassed the 2nd level cache
      ClassLoaderTestDAO dao0A = new ClassLoaderTestDAO(localFactory, localTM);
      Account acct0A = dao0A.getAccount(id);
      assertNotNull(acct0A);
      assertEquals(DualNodeTestCase.REMOTE, acct0A.getBranch());
      log.debug("Contents after creating a new session: " + TestingUtil.printCache(localCache));
   }
View Full Code Here

Examples of org.hibernate.test.cache.jbc.functional.classloader.Account

     
      Integer id = new Integer(1);
      dao0.createAccount(dao0.getSmith(), id, new Integer(5), DualNodeTestUtil.LOCAL);
     
      // Basic sanity check
      Account acct1 = dao1.getAccount(id);
      assertNotNull(acct1);
      assertEquals(DualNodeTestUtil.LOCAL, acct1.getBranch());
     
      // This dao's session factory isn't caching, so cache won't see this change
      dao1.updateAccountBranch(id, DualNodeTestUtil.REMOTE);
     
      // dao1's session doesn't touch the cache,
      // so reading from dao0 should show a stale value from the cache
      // (we check to confirm the cache is used)
      Account acct0 = dao0.getAccount(id);
      assertNotNull(acct0);
      assertEquals(DualNodeTestUtil.LOCAL, acct0.getBranch());
     
      // Now call session.refresh and confirm we get the correct value
      acct0 = dao0.getAccountWithRefresh(id);
      assertNotNull(acct0);
      assertEquals(DualNodeTestUtil.REMOTE, acct0.getBranch());
     
      // Double check with a brand new session, in case the other session
      // for some reason bypassed the 2nd level cache
      ClassLoaderTestDAO dao0A = new ClassLoaderTestDAO(localFactory, localTM);
      Account acct0A = dao0A.getAccount(id);
      assertNotNull(acct0A);
      assertEquals(DualNodeTestUtil.REMOTE, acct0A.getBranch());
   }
View Full Code Here

Examples of org.hibernate.test.cache.jbc2.functional.classloader.Account

     
      Integer id = new Integer(1);
      dao0.createAccount(dao0.getSmith(), id, new Integer(5), DualNodeTestUtil.LOCAL);
     
      // Basic sanity check
      Account acct1 = dao1.getAccount(id);
      assertNotNull(acct1);
      assertEquals(DualNodeTestUtil.LOCAL, acct1.getBranch());
     
      // This dao's session factory isn't caching, so cache won't see this change
      dao1.updateAccountBranch(id, DualNodeTestUtil.REMOTE);
     
      // dao1's session doesn't touch the cache,
      // so reading from dao0 should show a stale value from the cache
      // (we check to confirm the cache is used)
      Account acct0 = dao0.getAccount(id);
      assertNotNull(acct0);
      assertEquals(DualNodeTestUtil.LOCAL, acct0.getBranch());
     
      // Now call session.refresh and confirm we get the correct value
      acct0 = dao0.getAccountWithRefresh(id);
      assertNotNull(acct0);
      assertEquals(DualNodeTestUtil.REMOTE, acct0.getBranch());
     
      // Double check with a brand new session, in case the other session
      // for some reason bypassed the 2nd level cache
      ClassLoaderTestDAO dao0A = new ClassLoaderTestDAO(localFactory, localTM);
      Account acct0A = dao0A.getAccount(id);
      assertNotNull(acct0A);
      assertEquals(DualNodeTestUtil.REMOTE, acct0A.getBranch());
   }
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.