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 |
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 setUserNamesAreCaseSensitive(boolean userNamesAreCaseSensitive)
public void process(int jobTaskNode, long minSeq, long maxSeq, RepoCtx ctx) throws Exception
Exception
public abstract void startTransaction() throws SQLException
SQLException
public abstract void commitTransaction() throws SQLException
SQLException
public abstract void rollbackTransaction() throws SQLException
SQLException
public abstract void endTransaction() throws SQLException
SQLException
public abstract List<ActivityPostEntity> selectPosts(ActivityPostEntity selector) throws SQLException
SQLException
public abstract List<FeedControlEntity> selectUserFeedControls(String userId) throws SQLException
SQLException
public abstract long insertFeedEntry(ActivityFeedEntity feed) throws SQLException
SQLException
public abstract int updatePostStatus(long id, ActivityPostEntity.STATUS status) throws SQLException
SQLException
protected String callWebScript(String urlString, String ticket) throws MalformedURLException, URISyntaxException, IOException
protected Set<String> getSiteMembers(RepoCtx ctx, String siteId, String tenantDomain) throws Exception
Exception
protected abstract Set<String> getFollowers(String userId, String tenantDomain) throws Exception
Exception
protected abstract boolean canReadSite(RepoCtx ctx, String siteIdIn, String connectedUser, String tenantDomain) throws Exception
Exception
protected abstract boolean canRead(RepoCtx ctx, String connectedUser, Map<String,Object> model) throws Exception
Exception
protected Map<String,List<String>> getActivityTypeTemplates(String repoEndPoint, String ticket, String subPath) throws Exception
Exception
protected 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
IOException
freemarker.template.TemplateException
Exception
protected List<FeedControlEntity> getFeedControls(String connectedUser) throws SQLException
SQLException
protected boolean acceptActivity(ActivityPostEntity activityPost, List<FeedControlEntity> feedControls)
protected void addMissingFormats(String activityType, List<String> fmTemplates, List<String> templatesToAdd)
Copyright © 2005–2017 Alfresco Software. All rights reserved.