org.deepamehta.plugins.review
Class ReviewPlugin
java.lang.Object
de.deepamehta.core.osgi.PluginActivator
org.deepamehta.plugins.review.ReviewPlugin
- All Implemented Interfaces:
- de.deepamehta.core.osgi.PluginContext, de.deepamehta.core.service.PluginService, ReviewService, org.osgi.framework.BundleActivator
public class ReviewPlugin
- extends de.deepamehta.core.osgi.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-SNAPSHOT
- Author:
- Malte Reißig ()
Fields inherited from class de.deepamehta.core.osgi.PluginActivator |
bundle, dms |
Method Summary |
de.deepamehta.core.Topic |
addToGood(long resourceId,
de.deepamehta.core.service.ClientState clientState)
Increments the number of supportive voices (yelling "Good!"). |
de.deepamehta.core.Topic |
addToSoso(long resourceId,
de.deepamehta.core.service.ClientState clientState)
|
de.deepamehta.core.Topic |
downvoteResourceById(long resourceId,
de.deepamehta.core.service.ClientState clientState)
Decrements the score of any given topic. |
de.deepamehta.core.Topic |
upvoteResourceById(long resourceId,
de.deepamehta.core.service.ClientState clientState)
Increments the score of any given topic. |
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 de.deepamehta.core.Topic addToGood(long resourceId,
@HeaderParam(value="Cookie")
de.deepamehta.core.service.ClientState clientState)
- Increments the number of supportive voices (yelling "Good!").
- Specified by:
addToGood
in interface ReviewService
addToSoso
public de.deepamehta.core.Topic addToSoso(long resourceId,
@HeaderParam(value="Cookie")
de.deepamehta.core.service.ClientState clientState)
- Specified by:
addToSoso
in interface ReviewService
upvoteResourceById
public de.deepamehta.core.Topic upvoteResourceById(long resourceId,
@HeaderParam(value="Cookie")
de.deepamehta.core.service.ClientState clientState)
- Increments the score of any given topic.
- Specified by:
upvoteResourceById
in interface ReviewService
downvoteResourceById
public de.deepamehta.core.Topic downvoteResourceById(long resourceId,
@HeaderParam(value="Cookie")
de.deepamehta.core.service.ClientState clientState)
- Decrements the score of any given topic.
- Specified by:
downvoteResourceById
in interface ReviewService
Copyright © 2014. All Rights Reserved.