Package org.encuestame.persistence.domain.security

Examples of org.encuestame.persistence.domain.security.UserAccount


        log.debug("loggin with username: {"+username+"}");
        log.debug("loggin with user dao instance: {"+this.accountDao+"}");
        //filter username.
        final HTMLInputFilter filter = new HTMLInputFilter(true);
        username = filter.filter(username);
        final UserAccount user = this.accountDao.getUserByUsername(username);
        log.debug("fetch username filtered: {"+user+"}");
        if (user == null) {
            log.error("user not found :{"+username);
            throw new UsernameNotFoundException("user not found");
        } else {
            log.debug("Logged with username: {"+user.getUsername()+" id: "+user.getUid()+"}");
            this.updateLoggedInfo(user);
            return SecurityUtils.convertUserAccountToUserDetails(user, this.roleUserAuth);
        }
    }
View Full Code Here


     */
    public List<UtilNotification> retrieveLastNotifications(
            final Integer limit, final Boolean onlyReaded,
            final HttpServletRequest request)
            throws EnMeNoResultsFoundException {
        UserAccount user = getUserAccount(getUserPrincipalUsername());
        final List<Notification> notifications = getNotificationDao()
                .loadNotificationByUserAndLimit(user.getAccount(), limit,
                        defaultStart, onlyReaded);
        return convertNotificationList(notifications, request);
    }
View Full Code Here

     */
    @Test
    public void testQuickService() throws IOException, EnMeNoResultsFoundException, ParseException{
       
      final Account account = createAccount();
        final UserAccount userAccount = getSpringSecurityLoggedUserAccount();
       
        createHashTag("nicaragua");
        final Question question = createQuestion("Has scala great future as program language?", account);
        createQuestion("What is your favorite program language?", account);
   
View Full Code Here

   */
  @Category(DefaultTest.class)
  public void testSaveTweetId() throws EnMeExpcetion {
    Question questionSave = createQuestion("how much or How Many?", "html");
    final Account usersave = createUser("dianmora", "xxxxxxx");
    final UserAccount account = createUserAccount("jota", usersave);
    final String tweetUrl = "http://www.encuestame.org";
    final TweetPoll tweetPoll = createTweetPollPublicated(true, true,
        new Date(), account, questionSave);

    answersSaveTweet = new ArrayList<QuestionAnswerBean>();
View Full Code Here

    final Question question2 = createQuestion("Why the sea is big?", "html");
    createTweetPollPublicated(true, true, new Date(), this.userAccount,
        question1);
    createTweetPollPublicated(true, true, new Date(), this.userAccount,
        question2);
    final UserAccount secUser = createUserAccount("diana", this.user);
    final TweetPollSearchBean tpSearchBean = createTweetpollSearchBean(
        Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE,
        "xxx", "7", 10, 0, TypeSearch.BYOWNER);
    List<SocialProvider> enums = new ArrayList<SocialProvider>();
    enums.add(SocialProvider.FACEBOOK);
View Full Code Here

    /**
    * Test SecUser Secondary Domain.
    **/
    @Test
    public void testSecUserSecondary(){
        final UserAccount userSec = new UserAccount();
        userSec.setCompleteName("Juan Carlos Picado");
        userSec.setUserEmail("juan@encuestame.org");
        userSec.setUsername("jpicado");
        userSec.setPassword("123456");
        userSec.setInviteCode("S");
        userSec.setEnjoyDate(new Date());
        userSec.setUserStatus(true);
        userSec.setAccount(createAccount());
        getAccountDao().saveOrUpdate(userSec);
        assertNotNull(userSec.getUid());
    }
View Full Code Here

     /** Gadget domain **/
     @Test
     public void testGadget(){
        final Gadget gadget = new Gadget();
        final UserAccount user = createUserAccount("diana paola", createAccount());
        gadget.setGadgetName("Notifications");
        gadget.setGadgetType(GadgetType.ACTIVITY_STREAM);
        gadget.setGadgetColor("blue");
        gadget.setGadgetColumn(1);
        gadget.setGadgetPosition(1);
View Full Code Here

     }

     /** Gadget Properties **/
     @Test
     public void testGadgetProperties(){
         final UserAccount user = createUserAccount("diana paola", createAccount());
         final Dashboard board = createDashboardDefault(user);
         final GadgetProperties gadgetProp = new GadgetProperties();
         gadgetProp.setGadgetPropName("maxResults");
         gadgetProp.setGadgetPropValue("10");
         gadgetProp.setUserAccount(user);
View Full Code Here

    /**
     * Test get comments by TweetPoll.
     */
    @Test
    public void testGetCommentsbyTweetPoll(){
        final UserAccount userAcc2 = createUserAccount("anita", createAccount());
        assertNotNull(userAcc2);
        createDefaultTweetPollComment("I was watching tv", this.tpoll, userAcc2);
        final List<Comment> commentbyTweetPoll = getCommentsOperations()
                .getCommentsbyTweetPoll(tpoll, this.MAX_RESULTS, this.START);
        assertEquals("Should be equals", 2, commentbyTweetPoll.size());
View Full Code Here

     /** Test Comments **/
     @Test
     public void testComments(){
         final Comment comments = new Comment();
         final UserAccount user = createUserAccount("diana", createAccount());
         final Question question = createQuestion("Who I am?", "");
         final TweetPoll tpoll = createPublishedTweetPoll(user.getAccount(), question);
         comments.setComment("First comment");
         comments.setCreatedAt(new Date());
         comments.setLikeVote(1L);
         comments.setDislikeVote(2L);
         comments.setUser(user);
View Full Code Here

TOP

Related Classes of org.encuestame.persistence.domain.security.UserAccount

Copyright © 2018 www.massapicom. 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.