Examples of User


Examples of com.joshlong.userregistrationexample.model.User

        ApplicationContext context = new ClassPathXmlApplicationContext("service-context.xml");

        UserManagmentService ums = (UserManagmentService) context.getBean("userManagmentService");

        // are hashes redeemable for a user?
        User user = ums.createUser("josh@joshlong.com", "password", "Josh", "Long");
        String hashForUser = ums.getHashForUser(user.getId());

        assertTrue("a User ID and a user hash should be exchangeable!",
                ums.getUserForHash(hashForUser).getId().equals(user.getId()));

        // does invalid data get across?
        try {
            user = ums.createUser(null, null, "First1", "Last1");
            fail("You shouldnt be allowed to get this far!");
View Full Code Here

Examples of com.jpoweredcart.common.entity.user.User

  @Override
  public UserDetails loadUserByUsername(String username)
      throws UsernameNotFoundException {
   
    try{
      User user = userService.getSystemUserByUsername(username);
      if(user==null) throw new EmptyResultDataAccessException(1);
     
      CartUserDetails userDetails = new CartUserDetails();
      userDetails.userId = user.getId();
      userDetails.salt = user.getSalt();
      userDetails.password = user.getPassword();
      userDetails.username = user.getUsername();
      userDetails.enabled = user.getStatus()==1;
      UserGroup userGroup = userService.getSystemUserGroupById(user.getUserGroupId());
      if(userGroup!=null){
        userDetails.authorities.add(userGroup.getName());
        String permString = userGroup.getPermission();
        userDetails.permissions = UserPermissions.unserializePermissions(permString);
      }
View Full Code Here

Examples of com.jstl.example.spring.aop.User

    WebApplicationContext ctx = ContextLoader.getCurrentWebApplicationContext();
    TestLogger logger = ctx.getBean("testLogger", TestLogger.class);
    logger.start("lalala");
   
   
    User user = userService.getUserByName("sergey");
    userService.save(user);
    userService.update(user);
    try {
      //instanceof doesn't work with proxy aop object aop:declare-parents
      EntityHeader entHeader =  (EntityHeader)userService;
View Full Code Here

Examples of com.juggernet.impl.domain.User

  @Override
  public Boolean Authenticate(String username, String password) {

    logger.debug("Authenticate({},{})", username, password);

    User u = new User();
    u.setFirstName("Juan");
    u.setLastName("Ayala");

    User saved = _userRepo.save(u);
    return saved.getId() > 0;
  }
View Full Code Here

Examples of com.kanner.domain.User

   * @return
   */
  public String create(User user) {
   
    Boolean created = false;
    User currentUser = readUserById(user.getEmail());
   
    if (currentUser == null) {
     
      pm = PMF.get().getPersistenceManager();
     
View Full Code Here

Examples of com.ketayao.ketacustom.entity.main.User

  }
 
  @ModelAttribute("preloadUser")
  public User preload(@RequestParam(value = "id", required = false) Long id) {
    if (id != null) {
      User user = userService.get(id);
      user.setOrganization(null);
      return user;
    }
    return null;
  }
View Full Code Here

Examples of com.keybox.manage.model.User

    )
    public String saveUser() {

        if (user.getId() != null) {
            if(user.getPassword()==null || user.getPassword().trim().equals("")){
                User tmpUser = UserDB.getUser(getUser().getId());
                user.setPassword(tmpUser.getPassword());
            }
            UserDB.updateUser(user);
        } else {
            UserDB.insertUser(user);
        }
View Full Code Here

Examples of com.krminc.phr.domain.User

    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
    public UserConverter get() {
        PersistenceService persistenceSvc = PersistenceService.getInstance();
        try {
            persistenceSvc.beginTx();
            User user = null;
            if (username != null) {
                user = getEntityByUsername();
            } else {
                user = getEntity();
            }
View Full Code Here

Examples of com.kylin.infinispan.common.User

    System.out.println("name = " + cache.getName() + ", version = " + cache.getVersion() + ", status = " + cache.getStatus());
    System.out.println("name = " + cache01.getName() + ", version = " + cache01.getVersion() + ", status = " + cache01.getStatus());
    System.out.println("name = " + cache02.getName() + ", version = " + cache02.getVersion() + ", status = " + cache02.getStatus());
    System.out.println("name = " + cache03.getName() + ", version = " + cache03.getVersion() + ", status = " + cache03.getStatus());
   
    cache.put("key", new User(1, "Kylin Soong", "IT"));
   
    System.out.println(cache.size());
    System.out.println(cache.containsKey("key"));
    System.out.println(cache.get("key"));
   
    Object obj = cache.remove("key");
    System.out.println(obj);
    System.out.println(cache.size());
   
    cache.put("key", new User(1, "Kylin Soong", "Software Engineer"));
    cache.put("key", new User(2, "Kobe Bryant", " Basketball Player"));
    System.out.println(cache.get("key"));
   
    cache.put("key", new User(1, "Kylin Soong", "Software Engineer"), 5, TimeUnit.SECONDS);
    System.out.println(cache.get("key"));
    Thread.sleep(5 * 1000);
    System.out.println(cache.get("key"));
  }
 
View Full Code Here

Examples of com.kylin.jgroups.User

    for (int i = 0; i < 5; i++){
      Util.sleep(100);
      System.out.println("Invoke all members 'getUser' method");
      rsp_list = disp.callRemoteMethods(null
                      , "getUser"
                      , new Object[]{101, "RPC remote test", new User(1000, "Kylin Soong", "IT")}
                      , new Class[]{int.class, String.class, User.class}
                      , requestOptions);
      System.out.println("Responses:\n" + rsp_list);
    }
  }
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.