public interface Badge extends CaptainUpObject
Modifier and Type | Method and Description |
---|---|
java.util.Collection<Condition> |
getConditions()
List of all the badge conditions for achievement
|
java.util.Map<java.lang.String,java.lang.Long> |
getCurrencies()
Get the currencies awarded when achieving this badge.
|
java.util.Map<java.lang.String,java.lang.Object> |
getCustomData()
The badge custom data
|
java.lang.String |
getDescription()
The badge description
|
java.lang.String |
getID()
The badge ID
|
ImageFiles |
getImageFiles()
Details on the badge's image files
|
java.lang.String |
getName()
The name of the badge
|
long |
getPoints()
The number of points that will be awarded to the user for achieving this badge
|
Reward |
getReward()
The Badge Reward Object
|
java.util.Collection<Reward> |
getRewards()
The Badge Rewards Array
|
int |
getWeight()
The badge weight affect the weight given to each badge when
we sort, display and recommend the badges to users.
|
boolean |
hasReward()
Does the badge has a reward object that is safe to sue
|
boolean |
isHidden()
Whether the badge is "hidden".
|
boolean |
isRepeatable()
A repeatable badge is a badge that can be achieved multiple times.
|
boolean |
isSegmented()
Segmented badges can be used to filter the badge presentation according to different user attributes.
|
boolean |
isSegmentedForUser(User user)
Use this function to know if a badge should be displayed for your specific user
For example: badge.isSegmentedForUser(CaptainUp.getLoggedInUser())
|
boolean |
isVisible()
A badge that is not visible will be hidden from users that have not achieved it.
|
java.lang.String getID()
java.lang.String getName()
java.lang.String getDescription()
boolean isHidden()
true
if the badge is hidden, false
otherwise.boolean isVisible()
long getPoints()
int getWeight()
java.util.Map<java.lang.String,java.lang.Object> getCustomData()
ImageFiles getImageFiles()
java.util.Collection<Condition> getConditions()
Condition
java.util.Collection<Reward> getRewards()
Collection
Array or Null if there is no reward for this badgeReward getReward()
Object or Null if there is no reward for this badge
boolean hasReward()
true if the badge has a reward object or false if reward object is null
boolean isRepeatable()
CaptainUp.getLoggedInUser().getBadgeProgress().get(badge.getID()).getTimesCompleted()
java.util.Map<java.lang.String,java.lang.Long> getCurrencies()
boolean isSegmented()
User.getUnavailableSegmentedBadgesIDs()
-
A badge that is both segmented and appears in the user restricted segmented badges list should not be shown to that user.boolean isSegmentedForUser(User user)
user
-