public final class MentionManager extends java.lang.Object implements JPropertiesListener
Modifier and Type | Class and Description |
---|---|
static class |
MentionManager.EmailSelector
DataSelector used to find any member whose mail starts with given
emailPrefix
|
Modifier and Type | Field and Description |
---|---|
java.util.Map<TypeEntry,java.util.List<TypeFieldEntry>> |
mentionableTFEByTypeMap |
REVISION
Modifier and Type | Method and Description |
---|---|
DBMember |
getDBMemberFromEmailPrefix(java.lang.String emailPrefix)
Returns a
DBMember , which is an account, and whose mail starts with the given email prefix |
java.lang.String |
getHtmlPrefix() |
java.lang.String |
getIconPrefixProp() |
static MentionManager |
getInstance() |
Member |
getMemberFromEmailPrefix(java.lang.String emailPrefix)
Returns a member by searching in Store Members and DBMembers any matching
member with email starting with the given email prefix
|
Member |
getMemberFromEmailPrefixCache(java.lang.String emailPrefix) |
java.util.Set<Member> |
getMentionedMemberSet(Publication pub)
Returns mentioned member set in the given publication by searching through all
its values (multivaluated && multilingual)
An empty set is returned if the Publication is not in a visible state
|
java.util.Set<Member> |
getMentionedMemberSet(java.lang.String text)
Deprecated.
|
java.util.Set<Member> |
getMentionedMemberSet(TypeFieldEntry tfe,
java.lang.String text)
Retrieve member mentionned in the specified text.
|
java.lang.String |
getMentionEmailPrefixFromString(java.lang.String text) |
java.lang.String |
getMentionHtmlPrefix()
Returns the html prefix build with the following properties :
mention.htmlprefix : an html prefix
mention.html.icon.prefix-prop: an icon property
mention.html.whitespace.prefix: a boolean to define if a whitespace is needed
Note : if an icon is defined, the htmlprefix is not used
|
java.util.regex.Pattern |
getMentionMailPrefixPattern() |
java.lang.String |
getMentionMailPrefixRegex() |
java.util.regex.Pattern |
getMentionPattern() |
java.util.List<TypeFieldEntry> |
getTypeEntryMentionableFields(TypeEntry typeEntry) |
boolean |
hasWhiteSpacePrefix() |
boolean |
isMentionEnabled() |
void |
notifyMention(Publication pub,
Member opAuthor,
java.util.Set<Member> memberSet)
Notifies mentioned member set on the given Publication
|
void |
notifyMention(Publication pub,
java.util.Set<Member> memberSet)
Deprecated.
since jcms-9.0.2 : use
notifyMention(Publication, Member, Set) |
void |
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.
|
public java.util.Map<TypeEntry,java.util.List<TypeFieldEntry>> mentionableTFEByTypeMap
public static MentionManager getInstance()
public void propertiesChange(JProperties properties)
JPropertiesListener
You cannot alter the value received in parameters.
propertiesChange
in interface JPropertiesListener
properties
- the properties which have been modified (may not contain all JCMS properties)public java.lang.String getMentionMailPrefixRegex()
public java.util.regex.Pattern getMentionPattern()
Pattern
public java.util.regex.Pattern getMentionMailPrefixPattern()
Pattern
public boolean isMentionEnabled()
public java.lang.String getHtmlPrefix()
public java.lang.String getIconPrefixProp()
public boolean hasWhiteSpacePrefix()
public java.lang.String getMentionHtmlPrefix()
public java.util.Set<Member> getMentionedMemberSet(Publication pub)
pub
- the Publication
Set
of Member
mentioned in given Publication
public java.util.Set<Member> getMentionedMemberSet(java.lang.String text)
getMentionedMemberSet(TypeFieldEntry, String)
text
- the text to parseSet
of Member
mentioned in given textpublic java.util.Set<Member> getMentionedMemberSet(TypeFieldEntry tfe, java.lang.String text)
tfe
- the TypeFieldEntry corresponding to the field in which text is stored, used to detect wiki vs wysiwyg field, may be null but not recommended.text
- the text to parseSet
of Member
mentioned in given textpublic Member getMemberFromEmailPrefix(java.lang.String emailPrefix)
emailPrefix
- the prefix of the member emailpublic java.lang.String getMentionEmailPrefixFromString(java.lang.String text)
text
- the text to extract mail frompublic Member getMemberFromEmailPrefixCache(java.lang.String emailPrefix)
emailPrefix
- the email prefixpublic DBMember getDBMemberFromEmailPrefix(java.lang.String emailPrefix)
DBMember
, which is an account, and whose mail starts with the given email prefixemailPrefix
- the email prefixDBMember
whose mail starts with the given email prefixpublic java.util.List<TypeFieldEntry> getTypeEntryMentionableFields(TypeEntry typeEntry)
typeEntry
- the TypeEntry
TypeFieldEntry
for given TypeEntry
@Deprecated public void notifyMention(Publication pub, java.util.Set<Member> memberSet)
notifyMention(Publication, Member, Set)
pub
- the Publication
memberSet
- the set of members that will receive the alertpublic void notifyMention(Publication pub, Member opAuthor, java.util.Set<Member> memberSet)
pub
- the Publication
opAuthor
- the op authormemberSet
- the set of members that will receive the alertCopyright © 2001-2018 Jalios SA. All Rights Reserved.