Package wt.workflow.work
Class WfTally
java.lang.Object
wt.workflow.work.WfTally
- All Implemented Interfaces:
Externalizable,Serializable
Public static class to abstract heinous tally expressions.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringall(ObjectReference self, String event1, String event2) This API returns "event1", only if all users selected "event1", else returns "event2"
Supported API: truestatic Vectorall(ObjectReference self, Vector events) This API return collection of all the event that are selected by all users and which are also present in input parameter "events".static Stringany(ObjectReference self, String event1, String event2) This API returns "event1", if even one user voted for "event1", else "event2" is returned.static Vectorany(ObjectReference self, Vector events) This API returns all the events that any of the user selected, and which are also present in input parameter "events"
Supported API: truestatic intcount(ObjectReference self, String eventToMatch) Supported API: truestatic intcount(ObjectReference self, String eventToMatch, String assigneeRole, Locale locale) Supported API: truestatic StringnotPlurality(ObjectReference self, String event1, String event2) If number of votes received by "event1" is not highest, return "event1".static VectornotPlurality(ObjectReference self, Vector events) Events that did not receive highest number of votes, and that are also part of input parameter "events", are added in the returned collection.static Stringnumber(ObjectReference self, String operator, int value, String event1, String event2) Suppose operator: > and value =2 If number of votes received for event1 > 2, then return event1; else return event2.static Vectornumber(ObjectReference self, String operator, int value, Vector events) Suppose operator: > and value =2.static Stringpercent(ObjectReference self, String operator, int value, String event1, String event2) Percent calc=(Total no.static Vectorpercent(ObjectReference self, String operator, int value, Vector events) Percent calc=(Total no.static Stringplurality(ObjectReference self, String event1, String event2) If number of votes received by "event1" is highest, return "event1".static Vectorplurality(ObjectReference self, Vector events) All those event that received highest number of votes, and which are also part of input parameter "events", are returned in the collection.
-
Method Details
-
any
This API returns "event1", if even one user voted for "event1", else "event2" is returned.
Supported API: true- Parameters:
self-event1-event2-- Returns:
- String
- Throws:
WfException
-
any
This API returns all the events that any of the user selected, and which are also present in input parameter "events"
Supported API: true- Parameters:
self-events-- Returns:
- Vector
- Throws:
WfException
-
all
This API returns "event1", only if all users selected "event1", else returns "event2"
Supported API: true- Parameters:
self-event1-event2-- Returns:
- String
- Throws:
WfException
-
all
This API return collection of all the event that are selected by all users and which are also present in input parameter "events".
Supported API: true- Parameters:
self-events-- Returns:
- Vector
- Throws:
WfException
-
plurality
public static String plurality(ObjectReference self, String event1, String event2) throws WfException If number of votes received by "event1" is highest, return "event1". Else returns "event2"
Supported API: true- Parameters:
self-event1-event2-- Returns:
- String
- Throws:
WfException
-
plurality
All those event that received highest number of votes, and which are also part of input parameter "events", are returned in the collection. If there are two events that have received highest vote, then both these events are returned in the collection.
Supported API: true- Parameters:
self-events-- Returns:
- Vector
- Throws:
WfException
-
notPlurality
public static String notPlurality(ObjectReference self, String event1, String event2) throws WfException If number of votes received by "event1" is not highest, return "event1". Else return "event2"
Supported API: true- Parameters:
self-event1-event2-- Returns:
- String
- Throws:
WfException
-
notPlurality
Events that did not receive highest number of votes, and that are also part of input parameter "events", are added in the returned collection.
Supported API: true- Parameters:
self-events-- Returns:
- Vector
- Throws:
WfException
-
percent
public static String percent(ObjectReference self, String operator, int value, String event1, String event2) throws WfException Percent calc=(Total no. of votes for event1/Total votes)*100 Suppose operator: > and value =100. Then only if percent calc > 100, return "event1". Else return "event2".
Supported API: true- Parameters:
self-operator-value-event1-event2-- Returns:
- String
- Throws:
WfException
-
percent
public static Vector percent(ObjectReference self, String operator, int value, Vector events) throws WfException Percent calc=(Total no. of votes for event/Total votes)*100 Suppose operator: > and value =100 Only if percent calc > 100 for event "e", and "e" is present in input parameter "events" add "e" in the returned collection
Supported API: true- Parameters:
self-operator-value-events-- Returns:
- Vector
- Throws:
WfException
-
number
public static String number(ObjectReference self, String operator, int value, String event1, String event2) throws WfException Suppose operator: > and value =2 If number of votes received for event1 > 2, then return event1; else return event2.
Supported API: true- Parameters:
self-operator-value-event1-event2-- Returns:
- String
- Throws:
WfException
-
number
public static Vector number(ObjectReference self, String operator, int value, Vector events) throws WfException Suppose operator: > and value =2. If number of votes received for event > 2, and event is present in input parameter "events" then add this event to returned collection.
Supported API: true- Parameters:
self-operator-value-events-- Returns:
- Vector
- Throws:
WfException
-
count
public static int count(ObjectReference self, String eventToMatch, String assigneeRole, Locale locale) throws WTException Supported API: true- Parameters:
self- :: WfAssignedActivity ObjectreferenceeventToMatch- : routing option/vote user wants to tally.assigneeRole- : the role for which user wants to tally routing option.locale- : The locale in which user has specified assignee role.- Returns:
- int : number of votes from the specificed role.
- Throws:
WTException
-
count
Supported API: true- Parameters:
self- : WfAssignedActivity ObjectreferenceeventToMatch- : routing option/vote user wants to tally.- Returns:
- int : number of votes from the specificed role.
- Throws:
WTException
-