Package org.exoplatform.news.utils
Class NewsUtils
java.lang.Object
org.exoplatform.news.utils.NewsUtils
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbroadcastEvent(String eventName, Object source, Object data) static booleancanManageNewsPublishTargets(org.exoplatform.services.security.Identity currentIdentity) static booleancanPublishNews(String spaceId, org.exoplatform.services.security.Identity currentIdentity) static List<org.exoplatform.social.core.space.model.Space>getAllowedDraftNewsSpaces(org.exoplatform.services.security.Identity userIdentity) static List<org.exoplatform.social.core.space.model.Space>getAllowedScheduledNewsSpaces(org.exoplatform.services.security.Identity currentIdentity) static org.exoplatform.services.security.IdentitygetUserIdentity(String username) processMentions(String content, org.exoplatform.social.core.space.model.Space space) Processes Mentioners who has been mentioned via the news body.
-
Field Details
-
POST_NEWS
- See Also:
-
POST_NEWS_ARTICLE
- See Also:
-
PUBLISH_NEWS
- See Also:
-
VIEW_NEWS
- See Also:
-
SHARE_NEWS
- See Also:
-
ARCHIVE_NEWS
- See Also:
-
UNARCHIVE_NEWS
- See Also:
-
COMMENT_NEWS
- See Also:
-
LIKE_NEWS
- See Also:
-
DELETE_NEWS
- See Also:
-
UPDATE_NEWS
- See Also:
-
SCHEDULE_NEWS
- See Also:
-
UNSCHEDULE_NEWS
- See Also:
-
NEWS_METADATA_OBJECT_TYPE
- See Also:
-
DISPLAYED_STATUS
- See Also:
-
TARGET_PERMISSIONS
- See Also:
-
SPACE_NEWS_AUDIENCE
- See Also:
-
ALL_NEWS_AUDIENCE
- See Also:
-
-
Constructor Details
-
NewsUtils
public NewsUtils()
-
-
Method Details
-
broadcastEvent
-
processMentions
public static Set<String> processMentions(String content, org.exoplatform.social.core.space.model.Space space) Processes Mentioners who has been mentioned via the news body.- Parameters:
content- : the content in which update mentionspace- : the space of the news (for group mentioning)- Returns:
- set of mentioned users
-
getAllowedDraftNewsSpaces
public static List<org.exoplatform.social.core.space.model.Space> getAllowedDraftNewsSpaces(org.exoplatform.services.security.Identity userIdentity) throws Exception - Throws:
Exception
-
getAllowedScheduledNewsSpaces
public static List<org.exoplatform.social.core.space.model.Space> getAllowedScheduledNewsSpaces(org.exoplatform.services.security.Identity currentIdentity) throws Exception - Throws:
Exception
-
canPublishNews
public static boolean canPublishNews(String spaceId, org.exoplatform.services.security.Identity currentIdentity) -
canManageNewsPublishTargets
public static boolean canManageNewsPublishTargets(org.exoplatform.services.security.Identity currentIdentity) -
getUserIdentity
-