Examples of User


Examples of net.paoloambrosio.model.User

    @Autowired
    private UserRepository userRepository;

    @Test
    public void somethingMeaningful() {
        User user = make(a(TestUser));
        userRepository.save(user);
        assertEquals(1, userRepository.findAll().size());

        Message message = make(a(TestMessage, with(author, user)));
        messageRepository.save(message);
View Full Code Here

Examples of net.petrikainulainen.spring.social.signinmvc.user.model.User

            return VIEW_NAME_REGISTRATION_PAGE;
        }

        LOGGER.debug("No validation errors found. Continuing registration process.");

        User registered = createUserAccount(userAccountData, result);

        //If email address was already found from the database, render the form view.
        if (registered == null) {
            LOGGER.debug("An email address was found from the database. Rendering form view.");
            return VIEW_NAME_REGISTRATION_PAGE;
        }

        LOGGER.debug("Registered user account with information: {}", registered);

        //Logs the user in.
        SecurityUtil.logInUser(registered);
        LOGGER.debug("User {} has been signed in", registered);
        //If the user is signing in by using a social provider, this method call stores
        //the connection to the UserConnection table. Otherwise, this method does not
        //do anything.
        ProviderSignInUtils.handlePostSignUp(registered.getEmail(), request);

        return "redirect:/";
    }
View Full Code Here

Examples of net.sf.archimede.model.user.User

    }
   
    public String retrieveOwnerFolders() {
        VisitBean visitBean = (VisitBean) FacesContext.getCurrentInstance().getApplication().createValueBinding(VisitBean.BEAN_REF).getValue(FacesContext.getCurrentInstance());
        String username = visitBean.getCredentials().getUsername();
        User user = UserDao.createInstance().retrieve(username);
        List ownerFolders = FolderDao.createInstance().ownerList(user);
        List ownerViewFolders = new ArrayList(ownerFolders.size());
        for (Iterator it = ownerFolders.iterator(); it.hasNext(); ) {
            ownerViewFolders.add(new ViewFolder((Folder) it.next()));
        }
View Full Code Here

Examples of net.sf.arianne.marboard.client.entity.meta.User

   */
  public static Entity create(RPObject rpobject) {
    String rpclass = rpobject.getRPClass().getName();

    if (rpclass.equals("user")) {
      return new User(rpobject);
    } else if (rpclass.equals("dot")) {
      return new Dot(rpobject);
    } else if (rpclass.equals("rectangle")) {
      return new Rectangle(rpobject);
    } else if (rpclass.equals("straight_line")) {
View Full Code Here

Examples of net.sf.arianne.marboard.server.entity.meta.User

  @Override
  public RPObject transform(RPObject object) {
    String rpclass = object.getRPClass().getName();

    if (rpclass.equals("user")) {
      return new User(object);
    } else if (rpclass.equals("dot")) {
      return new Dot(object);
    } else if (rpclass.equals("rectangle")) {
      return new Rectangle(object);
    } else if (rpclass.equals("straight_line")) {
View Full Code Here

Examples of net.sf.chellow.physical.User

    if (method.equals(HttpMethod.GET)
        && (pathInfo.equals("/") || pathInfo.startsWith("/style/"))) {
      return;
    }
    User user = inv.getUser();
    if (user == null) {
      user = ImplicitUserSource.getUser(inv);
    }
    if (user == null) {
      try {
        Long userCount = (Long) Hiber.session()
            .createQuery("select count(*) from User user")
            .uniqueResult();
        if (userCount == null
            || userCount == 0
            && InetAddress.getByName(
                inv.getRequest().getRemoteAddr())
                .isLoopbackAddress()) {
          return;
        }
      } catch (UnknownHostException e) {
        throw new InternalException(e);
      }
      throw new UnauthorizedException();
    }
    UserRole role = user.getRole();
    String roleCode = role.getCode();
    if (roleCode.equals(UserRole.VIEWER)) {
      if (pathInfo.startsWith("/reports/")
          && pathInfo.endsWith("/output/")
          && (method.equals(HttpMethod.GET) || method
              .equals(HttpMethod.HEAD))) {
        return;
      }
    } else if (roleCode.equals(UserRole.EDITOR)) {
      return;
    } else if (roleCode.equals(UserRole.PARTY_VIEWER)) {
      if (method.equals(HttpMethod.GET) || method.equals(HttpMethod.HEAD)) {
        Party party = user.getParty();
        char marketRoleCode = party.getRole().getCode();
        if (marketRoleCode == MarketRole.HHDC) {
          Long hhdcContractId = inv.getLong("hhdc-contract-id");
          if (!inv.isValid()) {
            throw new ForbiddenException(
View Full Code Here

Examples of net.sf.esims.model.entity.User

      List listOfUsers = this.getSession().createCriteria(User.class)
      .add(Expression.like("userName", userName))
      .add(Expression.like("userPassword", password))
      .list();
      if(listOfUsers.size()!=0){
        User u = (User)listOfUsers.get(0);
        UserCredential credentials = new UserCredential();
        credentials.setUser(u);
        return credentials;
      }
      else{
View Full Code Here

Examples of net.sf.gilead.sample.domain.User

  //
    if (countUsers() == 0)
    {
    //  Create test user
    //
      User user = new User();
      user.setLogin("test");
      user.setPassword("secret");
      user.setFirstName("Test");
      user.setLastName("user");
       
      // create welcome messages
      Message message1 = new Message();
      message1.setMessage("First message");
      message1.setDate(new Date());
      user.addMessage(message1);
     
      // create welcome messages
      Message message2 = new Message();
      message2.setMessage("Another message");
      message2.setDate(new Date());
      user.addMessage(message2);
       
      // save user (message are cascaded)
      saveUser(user);
    }
  }
View Full Code Here

Examples of net.sf.jportlet.portlet.User

        Portlet.Mode mode = request.getMode(  );
        id.append( '/' ).append( mode ).append( '/' ).append( request.getWindow(  ).getState(  ) );

        if ( !cache.isShared(  ) )
        {
            User usr = request.getUser(  );
            if ( usr == null )
            {
                id.append( '/' ).append( ANONYMOUS_ID );
            }
            else
            {
                id.append( '/' ).append( usr.getId(  ) );
            }
        }

        return id.toString(  );
    }
View Full Code Here

Examples of net.sf.pmr.core.domain.user.User

       
        calendar.set(Calendar.YEAR, 2005);
        calendar.set(Calendar.MONTH, 10);
        calendar.set(Calendar.DAY_OF_MONTH, 03);
       
        User user = new UserImpl();
        user.setPersistanceId(1);
        user.setPersistanceVersion(2);

        chargeToFind.setPersistanceId(1);
        chargeToFind.setDay(calendar.getTime());
        chargeToFind.setTimeUsedToday(1);
        chargeToFind.setDaysNeededToFinish(2);
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.