Examples of Account


Examples of com.piercey.app.entities.Account

    final List<?> result = query.list();

    if (result.size() == 0)
    {
      final Account account = new Account(username, password, "buddy@waddya.at");
      final RandomNumberGenerator random = new SecureRandomNumberGenerator();

      account.setSalt(random.nextBytes().toBase64());
      account.setPassword(new Sha256Hash(account.getPassword(), account.getSalt(), 1024).toBase64());

      session.save(account);
    }
  }
View Full Code Here

Examples of com.rakaizsys.eims.model.finance.Account

        .showErrorMessage("Error: Cannot update customers list", ex);
  }
    }
    @Override
    protected void doNew() throws Exception {
  this.dbObject = new Account();
    }
View Full Code Here

Examples of com.restfb.types.Account

   * test reading in the sample account from <a
   * href="https://developers.facebook.com/docs/facebook-login/access-tokens/#pagetokens">here</a>
   */
  @Test
  public void accountTest() {
    Account account = createJsonMapper().toJavaObject(jsonFromClasspath("account"), Account.class);
    assertEquals("Product/service", account.getCategory());
    assertEquals("{access-token}", account.getAccessToken());
    assertEquals("1234567890", account.getId());
    assertEquals("Sample Page", account.getName());
    assertEquals(6, account.getPerms().size());
    assertTrue(account.getPerms().contains("ADMINISTER"));
    assertTrue(account.getPerms().contains("EDIT_PROFILE"));
    assertTrue(account.getPerms().contains("CREATE_CONTENT"));
    assertTrue(account.getPerms().contains("MODERATE_CONTENT"));
    assertTrue(account.getPerms().contains("CREATE_ADS"));
    assertTrue(account.getPerms().contains("BASIC_ADMIN"));
  }
View Full Code Here

Examples of com.sk89q.skmcl.session.Account

    private void updateSelection() {
        Object selected = idCombo.getSelectedItem();

        if (selected != null && selected instanceof Account) {
            Account account = (Account) selected;
            String password = account.getPassword();

            rememberIdCheck.setSelected(true);
            if (password != null) {
                rememberPassCheck.setSelected(true);
                passwordText.setText(password);
View Full Code Here

Examples of com.sm.web.rbac.pojo.Account

  @Override
  protected AuthorizationInfo doGetAuthorizationInfo(
      PrincipalCollection principalCollection) {
    String accountName = (String) principalCollection.fromRealm(getName())
        .iterator().next();
    Account account = accountService.getFullAccount(accountName);
    if (account != null) {
      SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo();
      for (Role role : account.getRoleList()) {
        authorizationInfo.addRole(role.getName());
        authorizationInfo.addStringPermissions(role
            .getOperationTitleList());
      }
      return authorizationInfo;
View Full Code Here

Examples of com.sonymobile.tools.gerrit.gerritevents.dto.attr.Account

        when(project.getFullName()).thenReturn("MockedProject");
        ParametersDefinitionProperty parameters = mock(ParametersDefinitionProperty.class);
        when(parameters.getParameterDefinitions()).thenReturn(Collections.EMPTY_LIST);
        when(project.getProperty(ParametersDefinitionProperty.class)).thenReturn(parameters);

        Account owner = new Account("Bobby", "bobby@somewhere.com");
        Account uploader = new Account("Nisse", "nisse@acme.org");

        PowerMockito.mockStatic(PluginImpl.class);
        PluginImpl plugin = PowerMockito.mock(PluginImpl.class);
        PowerMockito.when(PluginImpl.getInstance()).thenReturn(plugin);
        GerritServer server = mock(GerritServer.class);
        when(plugin.getServer(any(String.class))).thenReturn(server);
        GerritHandler handler = mock(GerritHandler.class);
        when(plugin.getHandler()).thenReturn(handler);

        GerritTrigger trigger = Setup.createDefaultTrigger(project);
        when(project.getTrigger(GerritTrigger.class)).thenReturn(trigger);
        trigger.setEscapeQuotes(false);
        PatchsetCreated event = Setup.createPatchsetCreatedWithAccounts(owner, uploader, uploader);
        GerritCause gerritCause = new GerritCause(event, true);
        gerritCause = spy(gerritCause);
        doReturn("http://mock.url").when(gerritCause).getUrl();
        IGerritHudsonTriggerConfig config = Setup.createConfig();
        config = spy(config);
        doReturn("http://mock.url").when(config).getGerritFrontEndUrlFor(any(String.class), any(String.class));
        when(plugin.getServer(any(String.class)).getConfig()).thenReturn(config);

        trigger.schedule(gerritCause, event);

        verify(project).scheduleBuild2(
                anyInt(),
                same(gerritCause),
                isA(Action.class),
                isA(Action.class),
                isA(Action.class),
                isParameterActionWithStringParameterValues(
                        nameVal(GERRIT_CHANGE_OWNER.name(), owner.getNameAndEmail()),
                        nameVal(GERRIT_CHANGE_OWNER_NAME.name(), owner.getName()),
                        nameVal(GERRIT_CHANGE_OWNER_EMAIL.name(), owner.getEmail()),
                        nameVal(GERRIT_PATCHSET_UPLOADER.name(), uploader.getNameAndEmail()),
                        nameVal(GERRIT_PATCHSET_UPLOADER_NAME.name(), uploader.getName()),
                        nameVal(GERRIT_PATCHSET_UPLOADER_EMAIL.name(), uploader.getEmail())));
    }
View Full Code Here

Examples of com.springsource.greenhouse.account.Account

    this.mailer = mailer;
  }

  @Transactional
  public void sendResetMail(String username) throws SignInNotFoundException {
    Account account = accountRepository.findBySignin(username);
    String token = tokenGenerator.generateKey();
     jdbcTemplate.update("insert into ResetPassword (token, member) values (?, ?)", token, account.getId());
     mailer.send(new ResetPasswordRequest(token, account));
  }
View Full Code Here

Examples of com.stormpath.sdk.account.Account

                // An account can also be retrieved from the DataStore,
                // like the way we do it to get an Application or Directory object,
                // if the account's Rest URL is known to the application.

                User sessionUser = (User) session.getAttribute("sessionUser");
                Account account = sessionUser.getAccount();
                account.setGivenName(user.getFirstName());
                account.setSurname(user.getLastName());
                account.setEmail(user.getEmail());
                account.setUsername(user.getFirstName().toLowerCase() + user.getLastName().toLowerCase());

                String existingGroupUrl = null;
                if (account.getGroupMemberships().iterator().hasNext()) {
                    GroupMembership groupMembership = account.getGroupMemberships().iterator().next();
                    existingGroupUrl = groupMembership.getGroup().getHref();
                    if (!existingGroupUrl.equals(user.getGroupUrl())) {
                        groupMembership.delete();
                        existingGroupUrl = null;
                    }
                }

                if (user.getGroupUrl() != null && !user.getGroupUrl().isEmpty() && existingGroupUrl == null) {
                    account.addGroup(stormpath.getDataStore().getResource(user.getGroupUrl(), Group.class));
                }

                account.save();

                user.setAccount(account);
                user.setUserName(sessionUser.getUserName());
                user.setTootList(sessionUser.getTootList());
View Full Code Here

Examples of com.streamreduce.core.model.Account

    private String twitterOAuthSecret = twitterProperties.getString("nodeable.integrations.twitter.oauth_secret");
    private Connection connection;

    @Before
    public void setUp() throws Exception {
        Account testAccount = new Account.Builder()
                .url("http://nodeable.com")
                .description("Nodeable Test Account")
                .name("Nodeable Testing")
                .build();
View Full Code Here

Examples of com.stripe.model.Account

    assertEquals("https://api.stripe.com", Stripe.getApiBase());
  }

  @Test
  public void testAccountRetrieve() throws StripeException {
    Account retrievedAccount = Account.retrieve();
    assertEquals("test+bindings@stripe.com", retrievedAccount.getEmail());
    assertEquals(false, retrievedAccount.getChargesEnabled());
    assertEquals(false, retrievedAccount.getDetailsSubmitted());
    assertEquals(null, retrievedAccount.getStatementDescriptor());
    assertEquals(false, retrievedAccount.getTransfersEnabled());
    assertEquals("usd", retrievedAccount.getDefaultCurrency());
  }
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.