Examples of vote()


Examples of com.gitblit.models.TicketModel.Change.vote()

        public void onClick(AjaxRequestTarget target) {
          Change change = new Change(user.username);
          if (ticket.isVoter(user.username)) {
            change.unvote(user.username);
          } else {
            change.vote(user.username);
          }
          app().tickets().updateTicket(repository, ticket.number, change);
          setResponsePage(TicketsPage.class, getPageParameters());
        }
      };
View Full Code Here

Examples of com.gitblit.models.TicketModel.Change.vote()

        public void onClick(AjaxRequestTarget target) {
          Change change = new Change(user.username);
          if (ticket.isVoter(user.username)) {
            change.unvote(user.username);
          } else {
            change.vote(user.username);
          }
          app().tickets().updateTicket(repository, ticket.number, change);
          setResponsePage(TicketsPage.class, getPageParameters());
        }
      };
View Full Code Here

Examples of com.github.jreddit.action.MarkActions.vote()

      // Retrieve the 25 hottest submissions of the subreddit
      List<Submission> submissions = subms.ofSubreddit("programming", SubmissionSort.HOT, 0, 25, null, null, true);

      // Upvote each submission
      for (Submission submission : submissions) {
        if (!submAct.vote(submission.getFullName(), 1)) {
          System.out.println("Could not upvote.");
        }
      }
   
    } catch (RetrievalFailedException e) {
View Full Code Here

Examples of models.Album.vote()

    /**
     * @param id
     */
    public static void vote(String id) {
        Album album = Album.findById(Long.parseLong(id));
        album.vote();
        renderText(album.nbVotes);
    }

    /**
     * Years to display for top albums form
View Full Code Here

Examples of org.acegisecurity.vote.AccessDecisionVoter.vote()

    public void decide(Authentication auth, Object arg1, ConfigAttributeDefinition arg2)
            throws AccessDeniedException, InsufficientAuthenticationException {

        AccessDecisionVoter voter = (AccessDecisionVoter) this.getDecisionVoters().get(0);
        int decision = voter.vote(auth, arg1, arg2);
        if (decision != AccessDecisionVoter.ACCESS_GRANTED) {
            throw new AccessDeniedException("Access Denied: " + arg1.toString());
        }
    }
View Full Code Here

Examples of org.geoserver.xacml.acegi.XACMLFilterDecisionVoter.vote()

                .anyTimes();

        org.easymock.classextension.EasyMock.replay(filter);

        XACMLFilterDecisionVoter voter = new XACMLFilterDecisionVoter();
        return voter.vote(aut, filter, new ConfigAttributeDefinition());

    }

}
View Full Code Here

Examples of org.geoserver.xacml.spring.security.XACMLFilterDecisionVoter.vote()

                .anyTimes();

        org.easymock.classextension.EasyMock.replay(filter);

        XACMLFilterDecisionVoter voter = new XACMLFilterDecisionVoter();
        return voter.vote(aut, filter, new ConfigAttributeDefinition("xacml"));

    }

}
View Full Code Here

Examples of org.geoserver.xacml.spring.security.XACMLFilterDecisionVoter.vote()

                .anyTimes();

        org.easymock.classextension.EasyMock.replay(filter);

        XACMLFilterDecisionVoter voter = new XACMLFilterDecisionVoter();
        return voter.vote(aut, filter, new ConfigAttributeDefinition("xacml"));

    }

}
View Full Code Here

Examples of org.internna.iwebmvc.model.PollOption.vote()

        PollOption option = dao.find(PollOption.class, pollOptionId);
        User user = userManager.getActiveUser(request);
        String IPAddress = request.getRemoteAddr();
        if (poll.getUserVote(user, IPAddress, dao) == null) {
            if (poll.isAllowAnonymousVotes() | !user.isAnonymous()) {
                option.vote();
                dao.update(option);
                if (poll.isStoreVotes()) {
                    PollVote pollVote = new PollVote();
                    pollVote.setVoteTime(new Date());
                    pollVote.setIP(IPAddress);
View Full Code Here

Examples of org.springframework.security.access.vote.AuthenticatedVoter.vote()

    }

    public void testAnonymousWorks() {
        AuthenticatedVoter voter = new AuthenticatedVoter();
        List<ConfigAttribute> def = SecurityConfig.createList(AuthenticatedVoter.IS_AUTHENTICATED_ANONYMOUSLY);
        assertEquals(AccessDecisionVoter.ACCESS_GRANTED, voter.vote(createAnonymous(), null, def));
        assertEquals(AccessDecisionVoter.ACCESS_GRANTED, voter.vote(createRememberMe(), null, def));
        assertEquals(AccessDecisionVoter.ACCESS_GRANTED, voter.vote(createFullyAuthenticated(), null, def));
    }

    public void testFullyWorks() {
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.