public class Utils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTENT_SPACES
The Constant Activity Type
|
static String |
DEFAULT_AVATAR |
static String |
EXO_RESOURCES_URI |
static String |
FILE_SPACES |
static String |
ICON_FILE_EXTENSION |
static String |
SHARE_CONTENT |
static String |
SHARE_FILE |
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static org.exoplatform.social.core.activity.model.ExoSocialActivity |
createActivity(org.exoplatform.social.core.manager.IdentityManager identityManager,
String activityOwnerId,
javax.jcr.Node node,
String activityMsgBundleKey,
String activityType)
Create ExoSocialActivity
|
static org.exoplatform.social.core.activity.model.ExoSocialActivity |
createActivity(org.exoplatform.social.core.manager.IdentityManager identityManager,
String activityOwnerId,
javax.jcr.Node node,
String activityMsgBundleKey,
String activityType,
boolean isSystemComment,
String systemComment,
String perm) |
static org.exoplatform.social.core.activity.model.ExoSocialActivity |
createShareActivity(javax.jcr.Node node,
String activityMsgBundleKey,
String activityType,
String comments,
String perm) |
static void |
deleteFileActivity(javax.jcr.Node node) |
static String |
generateThumbnailImageURI(javax.jcr.Node file)
Generate the Thumbnail Image URI.
|
static String |
getActivityType() |
static String |
getBundleValue(String key) |
static String |
getContentLink(javax.jcr.Node node)
Generate the viewer link to site explorer by node
|
static String |
getFirstSummaryLines(String source) |
static String |
getFirstSummaryLines(String source,
int linesCount) |
static String |
getIllustrativeImage(javax.jcr.Node node)
Gets the illustrative image.
|
static String |
getMimeType(javax.jcr.Node node)
Get the MimeType
|
static String |
getSummary(javax.jcr.Node node) |
static String[] |
getSystemCommentBundle(Map<String,String> activityParams) |
static String[] |
getSystemCommentTitle(Map<String,String> activityParams) |
static Map<String,String> |
populateActivityData(javax.jcr.Node node,
String activityOwnerId,
String activityMsgBundleKey)
Populate activity data with the data from Node
|
static Map<String,String> |
populateActivityData(javax.jcr.Node node,
String activityOwnerId,
String activityMsgBundleKey,
boolean isSystemComment,
String systemComment,
String perm) |
static void |
postActivity(javax.jcr.Node node,
String activityMsgBundleKey)
see the postActivity(Node node, String activityMsgBundleKey, Boolean isSystemComment, String systemComment, String perm)
|
static org.exoplatform.social.core.activity.model.ExoSocialActivity |
postActivity(javax.jcr.Node node,
String activityMsgBundleKey,
boolean needUpdate,
boolean isSystemComment,
String systemComment,
String perm) |
static void |
postFileActivity(javax.jcr.Node node,
String activityMsgBundleKey)
see the postFileActivity(Node node, String activityMsgBundleKey, Boolean isSystemComment, String systemComment, String perm)
|
static org.exoplatform.social.core.activity.model.ExoSocialActivity |
postFileActivity(javax.jcr.Node node,
String activityMsgBundleKey,
boolean needUpdate,
boolean isSystemComment,
String systemComment,
String perm) |
static String |
processMentions(String comment) |
static void |
setActivityType(String activityType) |
static void |
setAvatarUrl(javax.jcr.Node commentNode) |
static void |
updateNotifyMessages(org.exoplatform.social.core.activity.model.ExoSocialActivity activity,
String activityMsgBundleKey,
String systemComment) |
public static final String CONTENT_SPACES
public static final String FILE_SPACES
public static final String SHARE_FILE
public static final String SHARE_CONTENT
public static final String EXO_RESOURCES_URI
public static final String ICON_FILE_EXTENSION
public static final String DEFAULT_AVATAR
public static String getActivityType()
public static void setActivityType(String activityType)
public static Map<String,String> populateActivityData(javax.jcr.Node node, String activityOwnerId, String activityMsgBundleKey) throws Exception
node - the nodeactivityOwnerId - the owner id of the activityactivityMsgBundleKey - the message bundle key of the activityExceptionpublic static Map<String,String> populateActivityData(javax.jcr.Node node, String activityOwnerId, String activityMsgBundleKey, boolean isSystemComment, String systemComment, String perm) throws Exception
Exceptionpublic static void postActivity(javax.jcr.Node node,
String activityMsgBundleKey)
throws Exception
Exceptionpublic static org.exoplatform.social.core.activity.model.ExoSocialActivity createShareActivity(javax.jcr.Node node,
String activityMsgBundleKey,
String activityType,
String comments,
String perm)
throws Exception
Exceptionpublic static void postFileActivity(javax.jcr.Node node,
String activityMsgBundleKey)
throws Exception
Exceptionpublic static org.exoplatform.social.core.activity.model.ExoSocialActivity postActivity(javax.jcr.Node node,
String activityMsgBundleKey,
boolean needUpdate,
boolean isSystemComment,
String systemComment,
String perm)
throws Exception
node - : activity raised from this sourceactivityMsgBundleKey - needUpdate - isSystemComment - systemComment - the new value of System Posted activity,
if (isSystemComment) systemComment can not be set to null, set to empty string instead of.perm - the permission accorded for sharing file/contentExceptionpublic static org.exoplatform.social.core.activity.model.ExoSocialActivity postFileActivity(javax.jcr.Node node,
String activityMsgBundleKey,
boolean needUpdate,
boolean isSystemComment,
String systemComment,
String perm)
throws Exception
node - : activity raised from this sourceactivityMsgBundleKey - isSystemComment - systemComment - the new value of System Posted activity,
if (isSystemComment) systemComment can not be set to null, set to empty string instead of.Exceptionpublic static void updateNotifyMessages(org.exoplatform.social.core.activity.model.ExoSocialActivity activity,
String activityMsgBundleKey,
String systemComment)
throws Exception
Exceptionpublic static String getContentLink(javax.jcr.Node node) throws Exception
node - the nodejavax.jcr.RepositoryExceptionExceptionpublic static org.exoplatform.social.core.activity.model.ExoSocialActivity createActivity(org.exoplatform.social.core.manager.IdentityManager identityManager,
String activityOwnerId,
javax.jcr.Node node,
String activityMsgBundleKey,
String activityType)
throws Exception
identityManager - the identity ManageractivityOwnerId - the remote user namenode - the nodeactivityMsgBundleKey - the message bundle keyactivityType - the activity typeException - the activity storage exceptionpublic static org.exoplatform.social.core.activity.model.ExoSocialActivity createActivity(org.exoplatform.social.core.manager.IdentityManager identityManager,
String activityOwnerId,
javax.jcr.Node node,
String activityMsgBundleKey,
String activityType,
boolean isSystemComment,
String systemComment,
String perm)
throws Exception
Exceptionpublic static void deleteFileActivity(javax.jcr.Node node)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic static String getIllustrativeImage(javax.jcr.Node node)
node - the nodepublic static String generateThumbnailImageURI(javax.jcr.Node file) throws Exception
file - the nodeException - the exceptionpublic static String getMimeType(javax.jcr.Node node)
node - the nodepublic static String getSummary(javax.jcr.Node node)
public static String getFirstSummaryLines(String source, int linesCount)
source - linesCount - linesCount without HTML tagpublic static String[] getSystemCommentTitle(Map<String,String> activityParams)
public static String[] getSystemCommentBundle(Map<String,String> activityParams)
public static void setAvatarUrl(javax.jcr.Node commentNode)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionCopyright © 2003–2018 eXo Platform SAS. All rights reserved.