org.exoplatform.wcm.ext.component.activity.listener
Class Utils

java.lang.Object
  extended by org.exoplatform.wcm.ext.component.activity.listener.Utils

public class Utils
extends java.lang.Object

Created by The eXo Platform SAS Author : eXoPlatform exo@exoplatform.com Mar 18, 2011


Constructor Summary
Utils()
           
 
Method Summary
static org.exoplatform.social.core.activity.model.ExoSocialActivity createActivity(org.exoplatform.social.core.manager.IdentityManager identityManager, java.lang.String activityOwnerId, javax.jcr.Node node, java.lang.String activityMsgBundleKey)
          Create ExoSocialActivity
static java.lang.String generateThumbnailImageURI(javax.jcr.Node file)
          Generate the Thumbnail Image URI.
static java.lang.String getContentLink(javax.jcr.Node node)
          Generate the viewer link to site explorer by node
static java.lang.String getIllustrativeImage(javax.jcr.Node node)
          Gets the illustrative image.
static java.lang.String getMimeType(javax.jcr.Node node)
          Get the MimeType
static java.util.Map<java.lang.String,java.lang.String> populateActivityData(javax.jcr.Node node, java.lang.String activityOwnerId, java.lang.String activityMsgBundleKey)
          Populate activity data with the data from Node
static void postActivity(javax.jcr.Node node, java.lang.String activityMsgBundleKey)
          post activity to the activity stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

populateActivityData

public static java.util.Map<java.lang.String,java.lang.String> populateActivityData(javax.jcr.Node node,
                                                                                    java.lang.String activityOwnerId,
                                                                                    java.lang.String activityMsgBundleKey)
                                                                             throws java.lang.Exception
Populate activity data with the data from Node

Parameters:
Node - the node
String - the message of the activity
Returns:
Map the mapped data
Throws:
java.lang.Exception

postActivity

public static void postActivity(javax.jcr.Node node,
                                java.lang.String activityMsgBundleKey)
                         throws java.lang.Exception
post activity to the activity stream

Parameters:
String - the activity invoker
node - the node
Throws:
java.lang.Exception

getContentLink

public static java.lang.String getContentLink(javax.jcr.Node node)
                                       throws javax.jcr.RepositoryException
Generate the viewer link to site explorer by node

Parameters:
Node - the node
Returns:
String the viewer link
Throws:
javax.jcr.RepositoryException

createActivity

public static org.exoplatform.social.core.activity.model.ExoSocialActivity createActivity(org.exoplatform.social.core.manager.IdentityManager identityManager,
                                                                                          java.lang.String activityOwnerId,
                                                                                          javax.jcr.Node node,
                                                                                          java.lang.String activityMsgBundleKey)
                                                                                   throws java.lang.Exception
Create ExoSocialActivity

Parameters:
IdentityManager - the identity Manager
String - the remote user name
Returns:
the ExoSocialActivity
Throws:
java.lang.Exception - the activity storage exception

getIllustrativeImage

public static java.lang.String getIllustrativeImage(javax.jcr.Node node)
Gets the illustrative image.

Parameters:
node - the node
Returns:
the illustrative image

generateThumbnailImageURI

public static java.lang.String generateThumbnailImageURI(javax.jcr.Node file)
                                                  throws java.lang.Exception
Generate the Thumbnail Image URI.

Parameters:
node - the node
Returns:
the Thumbnail uri with medium size
Throws:
java.lang.Exception - the exception

getMimeType

public static java.lang.String getMimeType(javax.jcr.Node node)
Get the MimeType

Parameters:
node - the node
Returns:
the MimeType


Copyright © 2013 eXo Platform SAS. All Rights Reserved.