org.springframework.social.alfresco.api.entities
Class Rating

java.lang.Object
  extended by org.springframework.social.alfresco.api.entities.Rating

public class Rating
extends Object

Author:
jottley

Nested Class Summary
static class Rating.Aggregate
          An object with properties specific to the rating scheme.
 
Field Summary
static String LIKES
          Rating Type: Likes
static String STARS
          Rating Type: Five Stars
 
Constructor Summary
Rating()
           
 
Method Summary
 Rating.Aggregate getAggregate()
           
 String getId()
           
 Object getMyRating()
           
 Date getRatedAt()
           
 void setAggregate(Rating.Aggregate aggregate)
          Set Aggregate object with properties specific to the rating scheme
 void setId(String id)
          Set the rating scheme id.
 void setMyRating(Object myRating)
          Set the value of the rating.
 void setRatedAt(Date ratedAt)
          Set the date time the current authenticated user rated the item of content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STARS

public static final String STARS
Rating Type: Five Stars

See Also:
Constant Field Values

LIKES

public static final String LIKES
Rating Type: Likes

See Also:
Constant Field Values
Constructor Detail

Rating

public Rating()
Method Detail

getId

public String getId()
Returns:
The rating scheme id. Currently there are two schemes defined, likes and fiveStar. Only the likes scheme is used in Alfresco Cloud.

setId

public void setId(String id)
Set the rating scheme id. Currently there are two schemes defined, likes and fiveStar. Only the likes scheme is used in Alfresco Cloud.

Parameters:
id -

getAggregate

public Rating.Aggregate getAggregate()
Returns:
Aggregate object with properties specific to the rating scheme

setAggregate

public void setAggregate(Rating.Aggregate aggregate)
Set Aggregate object with properties specific to the rating scheme

Parameters:
aggregate -

getRatedAt

public Date getRatedAt()
Returns:
The date time the current authenticated user rated the item of content.

setRatedAt

public void setRatedAt(Date ratedAt)
Set the date time the current authenticated user rated the item of content.

Parameters:
ratedAt -

setMyRating

public void setMyRating(Object myRating)
Set the value of the rating. For the likes scheme, values are true or true. For the fiveStar scheme, the value is an integer between one and five inclusively.

Parameters:
myRating -

getMyRating

public Object getMyRating()
Returns:
The value of the rating. For the likes scheme, values are true or true. For the fiveStar scheme, the value is an integer between one and five inclusively.


Copyright © 2012 Alfresco Software Inc.. All Rights Reserved.