Package com.jalios.jcms.mention
Class MentionManager
java.lang.Object
com.jalios.jcms.mention.MentionManager
- All Implemented Interfaces:
JPropertiesListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDataSelector used to find any member whose mail starts with given emailPrefix -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetDBMemberFromEmailPrefix(String emailPrefix) Returns aDBMember, which is an account, and whose mail starts with the given email prefixstatic MentionManagergetMemberFromEmailPrefix(String emailPrefix) Returns a member by searching in Store Members and DBMembers any matching member with email starting with the given email prefixgetMemberFromEmailPrefixCache(String emailPrefix) 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 stategetMentionedMemberSet(TypeFieldEntry tfe, String text) Retrieve member mentionned in the specified text.getMentionedMemberSet(String text) Deprecated.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 usedgetTypeEntryMentionableFields(TypeEntry typeEntry) booleanbooleanvoidnotifyMention(Publication pub, Member opAuthor, Set<Member> memberSet) Notifies mentioned member set on the given PublicationvoidnotifyMention(Publication pub, Set<Member> memberSet) Deprecated.since jcms-9.0.2 : usenotifyMention(Publication, Member, Set)voidpropertiesChange(JProperties properties) Invoked after properties have been modified in JCMS and save on disk.
-
Field Details
-
mentionableTFEByTypeMap
-
-
Method Details
-
getInstance
-
propertiesChange
Description copied from interface:JPropertiesListenerInvoked after properties have been modified in JCMS and save on disk.You cannot alter the value received in parameters.
Note that properties parameter may be null, a limited set of site properties, or all site properties.
To check that a property has been modified, reload the "current" property instead using
channel.getPropertiesorchannel.getProperty.- Specified by:
propertiesChangein interfaceJPropertiesListener- Parameters:
properties- the properties which have been submitted to change
-
getMentionMailPrefixRegex
- Returns:
- the mention regexp property value
- Since:
- jcms-9.0.1
-
getMentionPattern
- Returns:
- the mention regexp
Pattern - Since:
- jcms-9.0.1
-
getMentionMailPrefixPattern
- Returns:
- the mention mail prefix regexp
Pattern - Since:
- jcms-9.0.1
-
isMentionEnabled
public boolean isMentionEnabled()- Returns:
- true if mentions are enabled on this webapp
- Since:
- jcms-9.0.1
-
getHtmlPrefix
- Returns:
- the html prefix that will be added to the html of a mentioned member
- Since:
- jcms-9.0.1
-
getIconPrefixProp
- Returns:
- the icon prefix that will be added to the html of a mentioned member
- Since:
- jcms-9.0.1
-
hasWhiteSpacePrefix
public boolean hasWhiteSpacePrefix()- Returns:
- true if there must be a white space before the rendered mention in wiki
- Since:
- jcms-9.0.1
-
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
- Returns:
- the prefix that is displayed before the member name when rendered in a wiki
- Since:
- jcms-9.0.1
-
getMentionedMemberSet
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- Parameters:
pub- thePublication- Returns:
- the
SetofMembermentioned in givenPublication - Since:
- jcms-9.0.1
-
getMentionedMemberSet
Deprecated. -
getMentionedMemberSet
Retrieve member mentionned in the specified text. -
getMemberFromEmailPrefix
Returns a member by searching in Store Members and DBMembers any matching member with email starting with the given email prefix- Parameters:
emailPrefix- the prefix of the member email- Returns:
- a member based on given email prefix
- Since:
- jcms-9.0.1
-
getMentionEmailPrefixFromString
- Parameters:
text- the text to extract mail from- Returns:
- the string matched after the @ symbol of given text
- Since:
- jcms-9.0.2
-
getMemberFromEmailPrefixCache
- Parameters:
emailPrefix- the email prefix- Returns:
- a member from the cache
- Since:
- jcms-9.0.1
-
getDBMemberFromEmailPrefix
Returns aDBMember, which is an account, and whose mail starts with the given email prefix- Parameters:
emailPrefix- the email prefix- Returns:
- a
DBMemberwhose mail starts with the given email prefix - Since:
- jcms-9.0.1
-
getTypeEntryMentionableFields
- Parameters:
typeEntry- theTypeEntry- Returns:
- the list of wiki
TypeFieldEntryfor givenTypeEntry - Since:
- jcms-9.0.1
-
notifyMention
Deprecated.since jcms-9.0.2 : usenotifyMention(Publication, Member, Set)Notifies mentioned member set on the given Publication- Parameters:
pub- thePublicationmemberSet- the set of members that will receive the alert- Since:
- jcms-9.0.1
-
notifyMention
Notifies mentioned member set on the given Publication- Parameters:
pub- thePublicationopAuthor- the op authormemberSet- the set of members that will receive the alert- Since:
- jcms-9.0.2
-
getMentionedMemberSet(TypeFieldEntry, String)