org.deepamehta.plugins.review
Class ReviewPlugin
java.lang.Object
de.deepamehta.core.osgi.PluginActivator
org.deepamehta.plugins.review.ReviewPlugin
- All Implemented Interfaces:
- PluginContext, PluginService, ReviewService, org.osgi.framework.BundleActivator
public class ReviewPlugin
- extends PluginActivator
- implements ReviewService
A very stupid plugin for counting likes/dislikes on any kind of topics in DeepaMehta.
* Counting values seperately as "Good" and "So-so", depends on introducing Migration2 to your application model.
* Counting values as one accumulate "Score", depends on introducing Migration1 to your application model.
- Version:
- 0.3.6
- Author:
- Malte Reißig ()
Methods inherited from class de.deepamehta.core.osgi.PluginActivator |
getBundleContext, getUri, init, postInstall, publishDirectory, serviceArrived, serviceGone, setCoreService, shutdown, start, stop, toString |
log
private Logger log
SCORE_TYPE_URI
public static final String SCORE_TYPE_URI
- See Also:
- Constant Field Values
GOOD_TYPE_URI
public static final String GOOD_TYPE_URI
- See Also:
- Constant Field Values
SOSO_TYPE_URI
public static final String SOSO_TYPE_URI
- See Also:
- Constant Field Values
ReviewPlugin
public ReviewPlugin()
addToGood
public Topic addToGood(long resourceId,
@HeaderParam(value="Cookie")
ClientState clientState)
- Increments the number of supportive voices (yelling "Good!").
- Specified by:
addToGood
in interface ReviewService
- Parameters:
resourceId
- clientState
-
addToSoso
public Topic addToSoso(long resourceId,
@HeaderParam(value="Cookie")
ClientState clientState)
- Increments the number of supportive voices (yelling "Well, so so.").
- Specified by:
addToSoso
in interface ReviewService
- Parameters:
resourceId
- clientState
-
upvoteResourceById
public Topic upvoteResourceById(long resourceId,
@HeaderParam(value="Cookie")
ClientState clientState)
- Increments the score of any given topic.
- Specified by:
upvoteResourceById
in interface ReviewService
- Parameters:
resourceId
- clientState
-
downvoteResourceById
public Topic downvoteResourceById(long resourceId,
@HeaderParam(value="Cookie")
ClientState clientState)
- Decrements the score of any given topic.
- Specified by:
downvoteResourceById
in interface ReviewService
- Parameters:
resourceId
- clientState
-
Copyright © 2014. All Rights Reserved.