com.silverpeas.notation.ejb
Interface RatingBm

All Known Implementing Classes:
RatingBmEJB

public interface RatingBm


Method Summary
 void deleteComponentRatings(String componentInstanceId)
          Remove all resources notations of given app
 void deleteRaterRating(RaterRatingPK pk)
          Remove rater rating of identified resource
 void deleteRating(ContributionRatingPK pk)
          Remove all notations of identified resource
 ContributionRating getRating(ContributionRatingPK pk)
          Getting notation about once given resource identified by its PK.
 ContributionRating getRating(SilverpeasContent contribution)
          Getting notation about the given contribution.
 Map<String,ContributionRating> getRatings(SilverpeasContent... contributions)
          Getting notation about the given contributions.
 boolean hasUserRating(RaterRatingPK pk)
          Checking if user has given a rating on this resource
 void moveRating(ContributionRatingPK pk, String componentInstanceId)
          Remove all notations of identified resource to the specified component instance identifier.
 void updateRating(RaterRatingPK pk, int note)
          Save user notation.
 

Method Detail

updateRating

void updateRating(RaterRatingPK pk,
                  int note)
Save user notation. Create it or update it if it already exists.

Parameters:
pk - identifying the rated resource and the rater
note - the rate given to this resource by the user

moveRating

void moveRating(ContributionRatingPK pk,
                String componentInstanceId)
Remove all notations of identified resource to the specified component instance identifier.

Parameters:
pk - identifying the resource
componentInstanceId - the target component identified by its instance id.

deleteRating

void deleteRating(ContributionRatingPK pk)
Remove all notations of identified resource

Parameters:
pk - identifying the resource

deleteRaterRating

void deleteRaterRating(RaterRatingPK pk)
Remove rater rating of identified resource

Parameters:
pk - identifying the resource and the rater

deleteComponentRatings

void deleteComponentRatings(String componentInstanceId)
Remove all resources notations of given app

Parameters:
componentInstanceId - identitier of the component instance.

getRatings

Map<String,ContributionRating> getRatings(SilverpeasContent... contributions)
Getting notation about the given contributions. If a contribution has no notation, a ContributionRating instance is returned anyway.

Parameters:
contributions - the contributions which returned ratings must be attached.
Returns:
ContributionRating instances ralated to the given contributions indexed by contribution identifier.

getRating

ContributionRating getRating(SilverpeasContent contribution)
Getting notation about the given contribution. If the contribution has no notation, a ContributionRating instance is returned anyway.

Parameters:
contribution - the contribution which returned ratings must be attached.
Returns:
ContributionRating instance ralated to the given contribution.

getRating

ContributionRating getRating(ContributionRatingPK pk)
Getting notation about once given resource identified by its PK. If the resource has no notation, a NotationDetail is returned anyway.

Parameters:
pk - identity of resource
Returns:
Notation of identified resource

hasUserRating

boolean hasUserRating(RaterRatingPK pk)
Checking if user has given a rating on this resource

Parameters:
pk - identity of resource and rater
Returns:
true if user has already given a rate


Copyright © 2016 Silverpeas. All Rights Reserved.