Examples of User


Examples of net.yura.lobby.database.User

       
        boolean resignFromAllGames = false;
       
        try {
            database.startTransaction();
            User user = database.getUser(username);
            if (user==null) {
                throw new IllegalStateException("can not find user "+username);
            }
            String registrationId = user.getAndroidId();
           
            if (registrationId!=null) {
                Sender sender = new Sender(myApiKey);
                Message.Builder message = new Message.Builder();
                for (Map.Entry<String, String> entry : data.entrySet()) {
                    message.addData(entry.getKey(), entry.getValue());
                }
                Result result = sender.send(message.build(), registrationId, 5);

                if (result.getMessageId() != null) {
                    String canonicalRegId = result.getCanonicalRegistrationId();
                    if (canonicalRegId != null) {
                        // same device has more than on registration ID: update database
                        user.setAndroidId(canonicalRegId);
                        database.saveUser(user);
                    }
                }
                else {
                    String error = result.getErrorCodeName();
                    if (error.equals(Constants.ERROR_NOT_REGISTERED)) {
                        // application has been removed from device - unregister database
                        user.setAndroidId(null);
                        database.saveUser(user);
                       
                        resignFromAllGames = true;
                    }
                }
View Full Code Here

Examples of ngdemo.domain.User

public class DummyMockRepositoryImpl extends GenericMockRepository<User> implements DummyRepository {

    @Override
    public User getDefaultUser() {
        User user = new User();
        user.setFirstName("JonFromREST");
        user.setLastName("DoeFromREST");
        return user;
    }
View Full Code Here

Examples of niso.User

      //Get the users
      Users.removeAll(Users);
      try{
        ResultSet RS=Parent.getDBHandler().MySQLSelect("SELECT * from UserAccount where UserName!='"+Parent.getUser().getUserName()+"';");
        while(RS.next())
          Users.add(new User(RS.getString(1),RS.getString(2),RS.getString(3)));
        RS.close();
      }catch(Exception ex){System.out.println("Problem "+ex);}
      cb.removeAllItems();
     
      for(int ctr=0;ctr<Users.size();ctr++){
View Full Code Here

Examples of nl.oneday.data.domain.users.User

  @PreAuthorize("(hasAnyRole('ROLE_USER','ROLE_ADMIN'))")
  @RequestMapping(value = Paths.USER_PROFILE)
  public String profile(Model model) {
    String pageTitel = "user profile";
    UserDetails userDetails = getCurrentUserDetails();
    User user = userService.getUserByUserName(userDetails.getUsername());


    model.addAttribute("id", user.getId());
    model.addAttribute("username", user.getUsername());
    model.addAttribute("firstname", user.getFirstName());
    model.addAttribute("lastname", user.getLastName());
    model.addAttribute("fileList", fileService.listAll());

    Long profileImageId = null;

    model.addAttribute("action", "viewProfile");
View Full Code Here

Examples of nz.govt.natlib.meta.config.User

  void userSelect_itemStateChanged(ItemEvent e) {
    Object user = userSelect.getSelectedItem();
    if ((user != null) && (user instanceof User)
        && (e.getStateChange() == ItemEvent.SELECTED)) {
      User usr = (User) user;
      Config.getInstance().setDefaultUser(usr);
      LogManager.getInstance().logMessage(LogMessage.WORTHLESS_CHATTER,
          "Current user set to :" + usr.getName());
    }
  }
View Full Code Here

Examples of opensnap.domain.User

  @BeforeTest
  public void setup() {
    MockitoAnnotations.initMocks(this);
    CompletableFuture<User> eric = new CompletableFuture<>();
    eric.complete(new User("eric", "3r1c", Arrays.asList("USER")));
    when(userService.getByUsername("eric")).thenReturn(eric);
    CompletableFuture<User> michel = new CompletableFuture<>();
    michel.complete(new User("michel", "m1ch3l", Arrays.asList("USER", "ADMIN")));
    when(userService.getByUsername("michel")).thenReturn(michel);
    this.interceptor = new SecurityChannelInterceptor(this.userService);
    this.interceptor.loadConfiguration("test-security.yml");
  }
View Full Code Here

Examples of oracle.security.idm.User

            IdentityStoreService service =
                  jpsCtx.getServiceInstance(IdentityStoreService.class);
           
            idStore = service.getIdmStore();

            User user = idStore.searchUser(secCntx.getUserName());
            if (user != null) {
                userProfile = user.getUserProfile();
                PropertySet propSet = userProfile.getAllUserProperties();

                Iterator it = propSet.getAll();
                while (it.hasNext()) {
                    Property prop = (Property)it.next();
View Full Code Here

Examples of org.acegisecurity.userdetails.User

   
    public UserDetails loadUserByUsername(String string) throws UsernameNotFoundException, DataAccessException {
        GrantedAuthority[] authorities =  new GrantedAuthority[] {
            new GrantedAuthorityImpl("editor"),
            new GrantedAuthorityImpl("admin")};     
        return new User("test", "test", true, true, true, true, authorities);
    }
View Full Code Here

Examples of org.activiti.engine.identity.User

  @Rule public ActivitiRule activitiRule = new ActivitiRule();

  @Test
  public void testAuthentication() {
    IdentityService identityService = activitiRule.getIdentityService();
    User user = identityService.newUser("johndoe");
    user.setPassword("xxx");
    identityService.saveUser(user);

    assertTrue(identityService.checkPassword("johndoe", "xxx"));
    assertFalse(identityService.checkPassword("johndoe", "invalid pwd"));
View Full Code Here

Examples of org.albertsanso.web20.core.model.User

 
  private void createPeople() {
   
    em.getTransaction().begin();
   
    User user1 = new User();
    user1.setFirstName("Albert");
    user1.setSecondName("Sans�");
   
    User user2 = new User();
    user2.setFirstName("Sergi");
    user2.setSecondName("Alegre");
   
    User user3 = new User();
    user3.setFirstName("Helena");
    user3.setSecondName("Trenchs");
   
    em.persist(user1);
    em.persist(user2);
    em.persist(user3);
   
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.