Examples of User


Examples of twitter4j.User

    avroSchema.setFields(fields);
    return avroSchema;
  }

  private Record extractRecord(String idPrefix, Schema avroSchema, Status status) {
    User user = status.getUser();
    Record doc = new Record(avroSchema);

    doc.put("id", idPrefix + status.getId());
    doc.put("created_at", formatterTo.format(status.getCreatedAt()));
    doc.put("retweet_count", status.getRetweetCount());
    doc.put("retweeted", status.isRetweet());
    doc.put("in_reply_to_user_id", status.getInReplyToUserId());
    doc.put("in_reply_to_status_id", status.getInReplyToStatusId());

    addString(doc, "source", status.getSource());
    addString(doc, "text", status.getText());

    MediaEntity[] mediaEntities = status.getMediaEntities();
    if (mediaEntities.length > 0) {
      addString(doc, "media_url_https", mediaEntities[0].getMediaURLHttps());
      addString(doc, "expanded_url", mediaEntities[0].getExpandedURL());
    }

    doc.put("user_friends_count", user.getFriendsCount());
    doc.put("user_statuses_count", user.getStatusesCount());
    doc.put("user_followers_count", user.getFollowersCount());
    addString(doc, "user_location", user.getLocation());
    addString(doc, "user_description", user.getDescription());
    addString(doc, "user_screen_name", user.getScreenName());
    addString(doc, "user_name", user.getName());
    return doc;
  }
View Full Code Here

Examples of ua.ck.geekhub.entity.User

    public void deleteUser(User user) {
        sessionFactory.getCurrentSession().delete(user);
    }

  public void createUser(String firstName, String lastName, String email) {
    User user = new User();
    user.setFirstName(firstName);
    user.setLastName(lastName);
    user.setEmail(email);
    saveUser(user);
  }
View Full Code Here

Examples of uk.co.froot.demo.openid.model.security.User

  @GET
  @Path("/logout")
  public Response logout() {

    BaseModel model = modelBuilder.newBaseModel(httpHeaders);
    User user = model.getUser();
    if (user != null) {
      // Invalidate the session token
      user.setSessionToken(null);
      // (We'll delete the user but really this would just be an update)
      InMemoryUserCache.INSTANCE.hardDelete(user);
      model.setUser(null);
    }
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.User

    CannedQueries.save(orgWcf);
   
    Unit unit1 = new Unit(TestConstants.UNIT1_NAME, orgWcf, true);
    CannedQueries.save(unit1);
   
    User rootUser = new User("globaladmin@example.com", "Global Admin 1", "password", Accesslevel.GLOBAL_ADMIN);
    rootUser.setOrganisationKey(orgWcf.getKeyCheckNotNull());
    rootUser.setUnitKey(unit1.getKeyCheckNotNull());
    CannedQueries.save(rootUser);

    User orgUser = new User("orgbooking@example.com", "Org Booking Secretary 1", "password", Accesslevel.ORG_ADMIN);
    orgUser.setOrganisationKey(orgWcf.getKeyCheckNotNull());
    orgUser.setUnitKey(unit1.getKeyCheckNotNull());
    CannedQueries.save(orgUser);

    User unitUser = new User("unitbooking@example.com", "Unit Booking Secretary 1", "password", Accesslevel.UNIT_ADMIN);
    unitUser.setOrganisationKey(orgWcf.getKeyCheckNotNull());
    unitUser.setUnitKey(unit1.getKeyCheckNotNull());
    CannedQueries.save(unitUser);
   
   
    // And don't let this be repeated!
    AppSetting setupCompleteSetting = new AppSetting(AppSetting.SETUP_COMPLETE, "true");
View Full Code Here

Examples of unibg.overencrypt.core.User

  @Override
  public String getName() {
    String name = realFile.getName();
    if(realFile.getAbsolutePath().equals(factory.root.getAbsolutePath())){
      int userID = Utils.retrieveUserID(realFile.getAbsolutePath());
      User loggedUser = new User(String.valueOf(userID));
      name = loggedUser.getName() + " " + loggedUser.getSurname() + "'s OverEncrypted root folder";
    }
    return name;
  }
View Full Code Here

Examples of us.jyg.freshet.dao.model.User

        }

        if (name == null || host == null || password == null)
            throw new LoginException("Empty name, host or password");

        User user = userManager.getUser(name);

        if (user == null)
            throw new LoginException("No such user \""+name+"\"");

        if (canAuthenticate(name, password)) {
View Full Code Here

Examples of user.User

      return rep.get(0);
    return null;
  }

  public User subscribe(String mail, String pseudo, String password) {
    User user = new User(mail, pseudo, password);
    if(create(user))
      return findOne(mail);
    return null;
  }
View Full Code Here

Examples of userManagement.User

            HttpSession session = request.getSession();
            dbManager db = new dbManager();
            String date = db.getDBtime();
            db.releaseConnection();
            session.setAttribute("date", date);
            User doctor = (User) request.getSession().getAttribute("loggedUser");//recupero il profilo del medico
           
            String[] patientsList = request.getParameterValues(checkboxname);//recupero gli id passati per POST
           
            htmlPage += "<div class=\"container\">";
            htmlPage += "<div class=\"header\">";
View Full Code Here

Examples of vn.pyco.tinycms.model.User

   
    /*
     * @seeorg.springframework.security.userdetails.UserDetailsService#loadUserByUsername(java.lang.String)
     */
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException {
        User user = getUserByUsername(username);
        if (user == null) {
            throw new UsernameNotFoundException("There is no User with login/username: " + username);
        }
        return new UserDetailsImpl(user);
    }
View Full Code Here

Examples of voxo.common.entities.User

import voxo.server.services.NetworkService;

public class UserLogoutAction {
  public UserLogoutAction(String ip, String username) throws UnknownHostException, IOException, SQLException, RequestException {
    // Check Login
    ArrayList<User> alu = UserManager.searchUserAbsolute(new User(null, username, null, null, null, null, null));

    // Not found / logged
    if (alu.size() == 0) {
      throw new RequestException(Messages.getString("UserLogoutAction.ERR_UserNotFound")); //$NON-NLS-1$
    }

    // Set offline
    User u = alu.get(0);
    u.setOnline(false);
    u.setIp(""); //$NON-NLS-1$
    UserManager.updateUserById(u);

    // Update contact list to his online members
    ArrayList<User> alcu = UserManager.getUserContactsByUser(u);
    for (User iU : alcu) {
      if (iU.getOnline() && (iU.getIp() != null)) {
        new SendContactListAction(iU);
        NetworkService.sendPacket(iU.getIp(), new Packet(EnumPacket.SERVER_Notice, String.format(Messages.getString("UserLogoutAction.UserDisconnect"), u.getUsername()))); //$NON-NLS-1$
      }
    }
  }
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.