public abstract class AbstractRating extends AbstractTally implements RatingSocialComponent
RATING_RESOURCE_TYPE
DEFAULT_SELECTOR, INDEX_SELECTOR, QUERY_SELECTOR, TRANSLATE_SELECTOR
Constructor and Description |
---|
AbstractRating(Resource resource) |
AbstractRating(Resource resource,
ClientUtilities clientUtils) |
Modifier and Type | Method and Description |
---|---|
void |
addResponse(String value) |
Float |
getAverageRating() |
boolean |
getCanUserRespond() |
ResponseValue |
getCurrentUserResponse() |
String |
getFormattedAverageRating() |
String |
getName() |
List<String[]> |
getRatingResults() |
Map<String,Long> |
getResponseTallies() |
Long |
getTotalNumberOfResponses() |
void |
removeCurrentUserResponse() |
getFriendlyUrl
buildJSONString, getAsMap, getId, getParentComponent, getProperties, getResource, getResourceType, getSourceComponent, getUrl, toJSONString
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAsMap, getFriendlyUrl, getId, getParentComponent, getProperties, getResource, getResourceType, getSourceComponent, getUrl, toJSONString
public AbstractRating(Resource resource)
public AbstractRating(Resource resource, ClientUtilities clientUtils)
public String getName()
getName
in interface TallySocialComponent
getName
in class AbstractTally
public Long getTotalNumberOfResponses()
getTotalNumberOfResponses
in interface TallySocialComponent
getTotalNumberOfResponses
in class AbstractTally
public ResponseValue getCurrentUserResponse() throws TallyException
getCurrentUserResponse
in interface TallySocialComponent
getCurrentUserResponse
in class AbstractTally
TallyException
- if there was an error retrieving the current users response.public Map<String,Long> getResponseTallies()
getResponseTallies
in interface TallySocialComponent
getResponseTallies
in class AbstractTally
public void addResponse(String value)
addResponse
in class AbstractTally
public void removeCurrentUserResponse()
removeCurrentUserResponse
in class AbstractTally
public Float getAverageRating()
getAverageRating
in interface RatingSocialComponent
public String getFormattedAverageRating()
getFormattedAverageRating
in interface RatingSocialComponent
public List<String[]> getRatingResults()
getRatingResults
in interface RatingSocialComponent
public boolean getCanUserRespond()
getCanUserRespond
in interface TallySocialComponent
getCanUserRespond
in class AbstractTally
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"