public class VotingHelper extends Object
Constructor and Description |
---|
VotingHelper() |
Modifier and Type | Method and Description |
---|---|
static VotingView |
getWinningVoting(org.apache.sling.api.resource.ResourceResolver resourceResolver,
Config config)
Return the still valid (ongoing) and winning (received a yes vote
from everybody) voting
|
static List<VotingView> |
getYesVotingsOf(org.apache.sling.api.resource.ResourceResolver resourceResolver,
Config config,
String slingId)
Returns the voting for which the given slingId has vote yes or was the
initiator (which is equal to yes).
|
static List<VotingView> |
listOpenNonWinningVotings(org.apache.sling.api.resource.ResourceResolver resourceResolver,
Config config)
List all the votings that are currently 'open' but 'not winning'.
|
static List<VotingView> |
listTimedoutVotings(org.apache.sling.api.resource.ResourceResolver resourceResolver,
Config config)
List all the votings that have timed out
|
static List<VotingView> |
listVotings(org.apache.sling.api.resource.ResourceResolver resourceResolver,
Config config) |
public static List<VotingView> listOpenNonWinningVotings(org.apache.sling.api.resource.ResourceResolver resourceResolver, Config config)
'Open' means that they have not expired yet, have zero no-votes, and match the view that this instance has of the cluster.
'Not winning' means that a voting still did not receive a vote from everybody
public static List<VotingView> listTimedoutVotings(org.apache.sling.api.resource.ResourceResolver resourceResolver, Config config)
public static VotingView getWinningVoting(org.apache.sling.api.resource.ResourceResolver resourceResolver, Config config)
public static List<VotingView> getYesVotingsOf(org.apache.sling.api.resource.ResourceResolver resourceResolver, Config config, String slingId)
slingId
- the instance for which its yes vote should be looked uppublic static List<VotingView> listVotings(org.apache.sling.api.resource.ResourceResolver resourceResolver, Config config)
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.