Package org.xwiki.mentions.script
Class MentionsScriptService
- java.lang.Object
-
- org.xwiki.mentions.script.MentionsScriptService
-
- All Implemented Interfaces:
org.xwiki.script.service.ScriptService
@Component @Singleton @Named("mentions") public class MentionsScriptService extends Object implements org.xwiki.script.service.ScriptService
Script service for the Mentions application.- Since:
- 12.5RC1
- Version:
- $Id: 49ced2eec94b985c9efa3976fc88428a1a9015ee $
-
-
Constructor Summary
Constructors Constructor Description MentionsScriptService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
format(String actorReference, DisplayStyle style, String type)
Format an actor mention according to its type.String
getMentionsColor()
long
getQueueSize()
String
getSelfMentionsColor()
boolean
isQuoteActivated()
-
-
-
Method Detail
-
getMentionsColor
public String getMentionsColor()
- Returns:
- the mentions color configuration value.
- See Also:
MentionsConfiguration.getMentionsColor()
-
getSelfMentionsColor
public String getSelfMentionsColor()
- Returns:
- the mentions colors configuration value for the current user.
- See Also:
MentionsConfiguration.getSelfMentionsColor()
-
getQueueSize
public long getQueueSize()
- Returns:
- the current size of the queue of elements (page, comments...) with mentions to analyze
- Since:
- 12.6
-
isQuoteActivated
public boolean isQuoteActivated()
- Returns:
true
if the mentions quote feature is activated.- Since:
- 12.6
- See Also:
MentionsConfiguration.isQuoteActivated()
-
format
public String format(String actorReference, DisplayStyle style, String type)
Format an actor mention according to its type.- Parameters:
actorReference
- the reference of the mentioned actorstyle
- the display styletype
- the type of the actor to format- Returns:
- the formatted actor mention
- Since:
- 12.10
- See Also:
MentionsFormatter.formatMention(String, DisplayStyle)
-
-