Package io.meeds.social.reaction.service
Class ReactionServiceImpl
java.lang.Object
io.meeds.social.reaction.service.ReactionServiceImpl
- All Implemented Interfaces:
io.meeds.social.reaction.service.ReactionService
@Service
public class ReactionServiceImpl
extends Object
implements io.meeds.social.reaction.service.ReactionService
-
Field Summary
FieldsFields inherited from interface io.meeds.social.reaction.service.ReactionService
LIKE_REACTION_ID, METADATA_TYPE_NAME, REACTION_CREATED_EVENT_NAME, REACTION_DELETED_EVENT_NAME, REACTION_UPDATED_EVENT_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlugin(io.meeds.social.reaction.plugin.ReactionOptionPlugin reactionOptionPlugin) Allows registering options from another Spring context (cross-addon), in addition to same-context collection injection.countReactionsByOption(String objectType, String objectId, String username) voiddeleteReaction(String objectType, String objectId, String username) voiddeleteReactionItem(String objectType, String objectId, long reactorIdentityId) List<io.meeds.social.reaction.model.ReactionOption> List<io.meeds.social.reaction.model.ReactionOption> getReactionOptions(String objectType) List<io.meeds.social.reaction.model.Reaction> getReactions(String objectType, String objectId, String reactionId, long offset, long limit, String username) voidsetReaction(String objectType, String objectId, String reactionId, String username) voidsetReactionOptionPlugins(List<io.meeds.social.reaction.plugin.ReactionOptionPlugin> plugins)
-
Field Details
-
ACTIVITY_OBJECT_TYPE
- See Also:
-
-
Constructor Details
-
ReactionServiceImpl
public ReactionServiceImpl()
-
-
Method Details
-
setReactionOptionPlugins
@Autowired(required=false) public void setReactionOptionPlugins(List<io.meeds.social.reaction.plugin.ReactionOptionPlugin> plugins) -
addPlugin
public void addPlugin(io.meeds.social.reaction.plugin.ReactionOptionPlugin reactionOptionPlugin) Allows registering options from another Spring context (cross-addon), in addition to same-context collection injection. A later registration overrides an already registered option with the same id (edit). -
getReactionOptions
- Specified by:
getReactionOptionsin interfaceio.meeds.social.reaction.service.ReactionService
-
getReactionOptions
- Specified by:
getReactionOptionsin interfaceio.meeds.social.reaction.service.ReactionService
-
setReaction
public void setReaction(String objectType, String objectId, String reactionId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
setReactionin interfaceio.meeds.social.reaction.service.ReactionService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
deleteReaction
public void deleteReaction(String objectType, String objectId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
deleteReactionin interfaceio.meeds.social.reaction.service.ReactionService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
countReactionsByOption
public Map<String,Long> countReactionsByOption(String objectType, String objectId, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
countReactionsByOptionin interfaceio.meeds.social.reaction.service.ReactionService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
getReactions
public List<io.meeds.social.reaction.model.Reaction> getReactions(String objectType, String objectId, String reactionId, long offset, long limit, String username) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Specified by:
getReactionsin interfaceio.meeds.social.reaction.service.ReactionService- Throws:
org.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
deleteReactionItem
- Specified by:
deleteReactionItemin interfaceio.meeds.social.reaction.service.ReactionService
-