org.alfresco.repo.activities.feed
Class FeedTaskProcessor

java.lang.Object
  extended by org.alfresco.repo.activities.feed.FeedTaskProcessor
Direct Known Subclasses:
LocalFeedTaskProcessor

public abstract class FeedTaskProcessor
extends java.lang.Object

Responsible for processing the individual task


Nested Class Summary
protected  class FeedTaskProcessor.TemplateWebScriptLoader
           
 
Constructor Summary
FeedTaskProcessor()
           
 
Method Summary
protected  boolean acceptActivity(ActivityPostEntity activityPost, java.util.List feedControls)
           
protected  void addMissingFormats(java.lang.String activityType, java.util.List fmTemplates, java.util.List templatesToAdd)
           
protected  java.lang.String callWebScript(java.lang.String urlString, java.lang.String ticket)
           
protected  boolean canRead(RepoCtx ctx, java.lang.String connectedUser, java.util.Map model)
           
abstract  void commitTransaction()
           
abstract  void endTransaction()
           
protected  java.util.Map getActivityTemplates(java.util.List allTemplateNames)
           
protected  java.util.Map getActivityTypeTemplates(java.lang.String repoEndPoint, java.lang.String ticket, java.lang.String subPath)
           
protected  java.lang.String getBaseActivityType(java.lang.String activityType)
           
protected  java.util.List getFeedControls(java.lang.String connectedUser)
           
protected  freemarker.template.Configuration getFreemarkerConfiguration(RepoCtx ctx)
           
protected  java.util.Set getSiteMembers(RepoCtx ctx, java.lang.String siteId)
           
protected  java.lang.String getTemplateSubPath(java.lang.String activityType)
           
abstract  long insertFeedEntry(ActivityFeedEntity feed)
           
 void process(int jobTaskNode, long minSeq, long maxSeq, RepoCtx ctx)
           
protected  java.lang.String processFreemarker(java.util.Map templateCache, java.lang.String fmTemplate, freemarker.template.Configuration cfg, java.util.Map model)
           
abstract  java.util.List selectPosts(ActivityPostEntity selector)
           
abstract  java.util.List selectUserFeedControls(java.lang.String userId)
           
abstract  void startTransaction()
           
abstract  int updatePostStatus(long id, ActivityPostEntity.STATUS status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeedTaskProcessor

public FeedTaskProcessor()
Method Detail

process

public void process(int jobTaskNode,
                    long minSeq,
                    long maxSeq,
                    RepoCtx ctx)
             throws java.lang.Exception
Throws:
java.lang.Exception

startTransaction

public abstract void startTransaction()
                               throws java.sql.SQLException
Throws:
java.sql.SQLException

commitTransaction

public abstract void commitTransaction()
                                throws java.sql.SQLException
Throws:
java.sql.SQLException

endTransaction

public abstract void endTransaction()
                             throws java.sql.SQLException
Throws:
java.sql.SQLException

selectPosts

public abstract java.util.List selectPosts(ActivityPostEntity selector)
                                    throws java.sql.SQLException
Throws:
java.sql.SQLException

selectUserFeedControls

public abstract java.util.List selectUserFeedControls(java.lang.String userId)
                                               throws java.sql.SQLException
Throws:
java.sql.SQLException

insertFeedEntry

public abstract long insertFeedEntry(ActivityFeedEntity feed)
                              throws java.sql.SQLException
Throws:
java.sql.SQLException

updatePostStatus

public abstract int updatePostStatus(long id,
                                     ActivityPostEntity.STATUS status)
                              throws java.sql.SQLException
Throws:
java.sql.SQLException

callWebScript

protected java.lang.String callWebScript(java.lang.String urlString,
                                         java.lang.String ticket)
                                  throws java.net.MalformedURLException,
                                         java.net.URISyntaxException,
                                         java.io.IOException
Throws:
java.net.MalformedURLException
java.net.URISyntaxException
java.io.IOException

getSiteMembers

protected java.util.Set getSiteMembers(RepoCtx ctx,
                                       java.lang.String siteId)
                                throws java.lang.Exception
Throws:
java.lang.Exception

canRead

protected boolean canRead(RepoCtx ctx,
                          java.lang.String connectedUser,
                          java.util.Map model)
                   throws java.lang.Exception
Throws:
java.lang.Exception

getActivityTypeTemplates

protected java.util.Map getActivityTypeTemplates(java.lang.String repoEndPoint,
                                                 java.lang.String ticket,
                                                 java.lang.String subPath)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

getActivityTemplates

protected java.util.Map getActivityTemplates(java.util.List allTemplateNames)

getFreemarkerConfiguration

protected freemarker.template.Configuration getFreemarkerConfiguration(RepoCtx ctx)

processFreemarker

protected java.lang.String processFreemarker(java.util.Map templateCache,
                                             java.lang.String fmTemplate,
                                             freemarker.template.Configuration cfg,
                                             java.util.Map model)
                                      throws java.io.IOException,
                                             freemarker.template.TemplateException,
                                             java.lang.Exception
Throws:
java.io.IOException
freemarker.template.TemplateException
java.lang.Exception

getFeedControls

protected java.util.List getFeedControls(java.lang.String connectedUser)
                                  throws java.sql.SQLException
Throws:
java.sql.SQLException

acceptActivity

protected boolean acceptActivity(ActivityPostEntity activityPost,
                                 java.util.List feedControls)

addMissingFormats

protected void addMissingFormats(java.lang.String activityType,
                                 java.util.List fmTemplates,
                                 java.util.List templatesToAdd)

getTemplateSubPath

protected java.lang.String getTemplateSubPath(java.lang.String activityType)

getBaseActivityType

protected java.lang.String getBaseActivityType(java.lang.String activityType)


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.