Examples of UserInfo


Examples of com.founder.fix.bpmn2extensions.coreconfig.UserInfo

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetUserInfo(UserInfo newUserInfo, NotificationChain msgs) {
    UserInfo oldUserInfo = userInfo;
    userInfo = newUserInfo;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CoreconfigPackage.GROUP_INFO__USER_INFO, oldUserInfo, newUserInfo);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

Examples of com.freewebsys.blog.pojo.UserInfo

      // 比较特殊需要知道ID.
      boolean updateUrl = false;

      if (post.getId() == null) {
        // 获得session.
        UserInfo userInfo = (UserInfo) request.getSession()
            .getAttribute(GlobalConf.USER_SESSION);
        // 设置作者.
        post.setAuthorId(userInfo.getId());
        // 设置创建时间.
        post.setCreateDate(new Date().getTime());
        // 设置修改时间.
        post.setModifiedDate(new Date().getTime());
        updateUrl = true;
View Full Code Here

Examples of com.freewebsys.sns.pojo.UserInfo

  @Transactional
  public PageConf findFriendPageList(int start, int limit, Map map)
      throws FriendException {

    try {
      UserInfo userInfo = (UserInfo) map.get("userInfo");
      map.remove("userInfo");
      String hql = " select module from UserInfo module ";
      // 通用查询匹配
      Object[] values = CommonDaoUtil.commonQuery(map);
      hql += values[0].toString();
      // Object[]需要进行强制转换.
      PageConf pageConf = baseDao.findPage(start, limit, hql,
          (Object[]) values[1]);
      if (pageConf != null && pageConf.getData() != null) {
        List list = pageConf.getData();
        for (int i = 0; i < list.size(); i++) {
          UserInfo friendUser = (UserInfo) list.get(i);
          System.out.println(userInfo.getId() + "/"
              + friendUser.getId());
          String hql_2 = "select friend.status from Friend friend where friend.userId = ? and friend.friend.id = ? ";
          Integer status = (Integer) baseDao.findFirstOne(hql_2,
              userInfo.getId(), friendUser.getId());
          friendUser.setMyFriendState(status);
          System.out.println(status);
        }
      }
      return pageConf;
    } catch (Exception e) {
View Full Code Here

Examples of com.getit.todoapp.domain.Userinfo

  @RequestMapping(method = RequestMethod.POST, headers = "Accept=application/json")
    public ResponseEntity<String> createFromJson(@RequestBody String json,Authentication authentication) {
        Todo todo = Todo.fromJsonToTodo(json);
        User user=(User) authentication.getPrincipal();
        Userinfo userinfo=userService.findByUserName(user.getUsername()).get(0);
        todo.setUserName(userinfo);
        todoService.saveTodo(todo);
        HttpHeaders headers = new HttpHeaders();
        headers.add("Content-Type", "application/json");
        return new ResponseEntity<String>(headers, HttpStatus.CREATED);
View Full Code Here

Examples of com.getit.todoapp.domain.Userinfo

      Collection<GrantedAuthority> userAuthorities = new ArrayList<GrantedAuthority>();
      userAuthorities.add(new SimpleGrantedAuthority(ROLE_USER));

      List<Userinfo> userinfos = userService.findByUserName(username);

      Userinfo userinfo = userinfos.get(0);

      User user = new User(userinfo.getUserName(),
          userinfo.getPassword(), true, true, true, true,
          userAuthorities);
      currentUser.set(user);
      return user;

    } catch (Exception e) {
View Full Code Here

Examples of com.getit.todoapp.domain.Userinfo

    UserService userService;

  @RequestMapping(value = "/{id}", method = RequestMethod.GET, headers = "Accept=application/json")
    @ResponseBody
    public ResponseEntity<String> showJson(@PathVariable("id") Long id) {
        Userinfo userinfo = userService.findUserinfo(id);
        HttpHeaders headers = new HttpHeaders();
        headers.add("Content-Type", "application/json; charset=utf-8");
        if (userinfo == null) {
            return new ResponseEntity<String>(headers, HttpStatus.NOT_FOUND);
        }
        return new ResponseEntity<String>(userinfo.toJson(), headers, HttpStatus.OK);
    }
View Full Code Here

Examples of com.getit.todoapp.domain.Userinfo

        return new ResponseEntity<String>(Userinfo.toJsonArray(result), headers, HttpStatus.OK);
    }

  @RequestMapping(method = RequestMethod.POST, headers = "Accept=application/json")
    public ResponseEntity<String> createFromJson(@RequestBody String json) {
        Userinfo userinfo = Userinfo.fromJsonToUserinfo(json);
        userService.saveUserinfo(userinfo);
        HttpHeaders headers = new HttpHeaders();
        headers.add("Content-Type", "application/json");
        return new ResponseEntity<String>(headers, HttpStatus.CREATED);
    }
View Full Code Here

Examples of com.getit.todoapp.domain.Userinfo

  @RequestMapping(value = "/{id}", method = RequestMethod.PUT, headers = "Accept=application/json")
    public ResponseEntity<String> updateFromJson(@RequestBody String json, @PathVariable("id") Long id) {
        HttpHeaders headers = new HttpHeaders();
        headers.add("Content-Type", "application/json");
        Userinfo userinfo = Userinfo.fromJsonToUserinfo(json);
        if (userService.updateUserinfo(userinfo) == null) {
            return new ResponseEntity<String>(headers, HttpStatus.NOT_FOUND);
        }
        return new ResponseEntity<String>(headers, HttpStatus.OK);
    }
View Full Code Here

Examples of com.getit.todoapp.domain.Userinfo

        return new ResponseEntity<String>(headers, HttpStatus.OK);
    }

  @RequestMapping(value = "/{id}", method = RequestMethod.DELETE, headers = "Accept=application/json")
    public ResponseEntity<String> deleteFromJson(@PathVariable("id") Long id) {
        Userinfo userinfo = userService.findUserinfo(id);
        HttpHeaders headers = new HttpHeaders();
        headers.add("Content-Type", "application/json");
        if (userinfo == null) {
            return new ResponseEntity<String>(headers, HttpStatus.NOT_FOUND);
        }
View Full Code Here

Examples of com.github.jreddit.entity.UserInfo

    @Test
    public void getUserInformationSuccessfully() {
        response = new UtilResponse(null, createUserInfo(USERNAME), 200);
        when(restClient.get(ApiEndpointUtils.USER_INFO, COOKIE)).thenReturn(response);

        UserInfo info = subject.getUserInformation();
        assertNotNull(info);
    }
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.