public abstract class FeedTaskProcessor extends Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
FeedTaskProcessor.TemplateWebScriptLoader |
| Modifier and Type | Field and Description |
|---|---|
static String |
FEED_FORMAT_ATOMENTRY |
static String |
FEED_FORMAT_HTML |
static String |
FEED_FORMAT_JSON |
static String |
FEED_FORMAT_RSS |
static String |
FEED_FORMAT_TEXT |
static String |
FEED_FORMAT_XML |
| Constructor and Description |
|---|
FeedTaskProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
acceptActivity(ActivityPostEntity activityPost,
List<FeedControlEntity> feedControls) |
protected void |
addMissingFormats(String activityType,
List<String> fmTemplates,
List<String> templatesToAdd) |
protected String |
callWebScript(String urlString,
String ticket) |
protected abstract boolean |
canRead(RepoCtx ctx,
String connectedUser,
Map<String,Object> model) |
protected abstract boolean |
canReadSite(RepoCtx ctx,
String siteIdIn,
String connectedUser,
String tenantDomain) |
abstract void |
commitTransaction() |
abstract void |
endTransaction() |
protected Map<String,List<String>> |
getActivityTemplates(List<String> allTemplateNames) |
protected Map<String,List<String>> |
getActivityTypeTemplates(String repoEndPoint,
String ticket,
String subPath) |
protected String |
getBaseActivityType(String activityType) |
protected List<FeedControlEntity> |
getFeedControls(String connectedUser) |
protected abstract Set<String> |
getFollowers(String userId,
String tenantDomain) |
protected freemarker.template.Configuration |
getFreemarkerConfiguration(RepoCtx ctx) |
protected Set<String> |
getSiteMembers(RepoCtx ctx,
String siteId,
String tenantDomain) |
protected String |
getTemplateSubPath(String activityType) |
protected String |
getTenantDomain(String name) |
protected String |
getTenantName(String name,
String tenantDomain) |
abstract long |
insertFeedEntry(ActivityFeedEntity feed) |
void |
process(int jobTaskNode,
long minSeq,
long maxSeq,
RepoCtx ctx) |
protected String |
processFreemarker(Map<String,freemarker.template.Template> templateCache,
String fmTemplate,
freemarker.template.Configuration cfg,
Map<String,Object> model) |
abstract void |
rollbackTransaction() |
abstract List<ActivityPostEntity> |
selectPosts(ActivityPostEntity selector) |
abstract List<FeedControlEntity> |
selectUserFeedControls(String userId) |
void |
setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
void |
setUserNamesAreCaseSensitive(boolean userNamesAreCaseSensitive) |
abstract void |
startTransaction() |
abstract int |
updatePostStatus(long id,
ActivityPostEntity.STATUS status) |
public static final String FEED_FORMAT_JSON
public static final String FEED_FORMAT_ATOMENTRY
public static final String FEED_FORMAT_HTML
public static final String FEED_FORMAT_RSS
public static final String FEED_FORMAT_TEXT
public static final String FEED_FORMAT_XML
public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public void setUserNamesAreCaseSensitive(boolean userNamesAreCaseSensitive)
public void process(int jobTaskNode,
long minSeq,
long maxSeq,
RepoCtx ctx)
throws Exception
Exceptionpublic abstract void startTransaction()
throws SQLException
SQLExceptionpublic abstract void commitTransaction()
throws SQLException
SQLExceptionpublic abstract void rollbackTransaction()
throws SQLException
SQLExceptionpublic abstract void endTransaction()
throws SQLException
SQLExceptionpublic abstract List<ActivityPostEntity> selectPosts(ActivityPostEntity selector) throws SQLException
SQLExceptionpublic abstract List<FeedControlEntity> selectUserFeedControls(String userId) throws SQLException
SQLExceptionpublic abstract long insertFeedEntry(ActivityFeedEntity feed) throws SQLException
SQLExceptionpublic abstract int updatePostStatus(long id,
ActivityPostEntity.STATUS status)
throws SQLException
SQLExceptionprotected String callWebScript(String urlString, String ticket) throws MalformedURLException, URISyntaxException, IOException
protected Set<String> getSiteMembers(RepoCtx ctx, String siteId, String tenantDomain) throws Exception
Exceptionprotected abstract Set<String> getFollowers(String userId, String tenantDomain) throws Exception
Exceptionprotected abstract boolean canReadSite(RepoCtx ctx, String siteIdIn, String connectedUser, String tenantDomain) throws Exception
Exceptionprotected abstract boolean canRead(RepoCtx ctx, String connectedUser, Map<String,Object> model) throws Exception
Exceptionprotected Map<String,List<String>> getActivityTypeTemplates(String repoEndPoint, String ticket, String subPath) throws Exception
Exceptionprotected Map<String,List<String>> getActivityTemplates(List<String> allTemplateNames)
protected freemarker.template.Configuration getFreemarkerConfiguration(RepoCtx ctx)
protected String processFreemarker(Map<String,freemarker.template.Template> templateCache, String fmTemplate, freemarker.template.Configuration cfg, Map<String,Object> model) throws IOException, freemarker.template.TemplateException, Exception
IOExceptionfreemarker.template.TemplateExceptionExceptionprotected List<FeedControlEntity> getFeedControls(String connectedUser) throws SQLException
SQLExceptionprotected boolean acceptActivity(ActivityPostEntity activityPost, List<FeedControlEntity> feedControls)
protected void addMissingFormats(String activityType, List<String> fmTemplates, List<String> templatesToAdd)
Copyright © 2005–2018 Alfresco Software. All rights reserved.