Class FeedTaskProcessor
java.lang.Object
org.alfresco.repo.activities.feed.FeedTaskProcessor
- Direct Known Subclasses:
LocalFeedTaskProcessor
Responsible for processing the individual task
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanacceptActivity(ActivityPostEntity activityPost, List<FeedControlEntity> feedControls) protected voidprotected StringcallWebScript(String urlString, String ticket) protected abstract booleanprotected abstract booleancanReadSite(RepoCtx ctx, String siteIdIn, String connectedUser, String tenantDomain) abstract voidabstract voidgetActivityTemplates(List<String> allTemplateNames) getActivityTypeTemplates(String repoEndPoint, String ticket, String subPath) protected StringgetBaseActivityType(String activityType) protected List<FeedControlEntity>getFeedControls(String connectedUser) getFollowers(String userId, String tenantDomain) protected freemarker.template.ConfigurationgetSiteMembers(RepoCtx ctx, String siteId, String tenantDomain) protected StringgetTemplateSubPath(String activityType) protected StringgetTenantDomain(String name) protected StringgetTenantName(String name, String tenantDomain) abstract longvoidprotected StringprocessFreemarker(Map<String, freemarker.template.Template> templateCache, String fmTemplate, freemarker.template.Configuration cfg, Map<String, Object> model) abstract voidabstract List<ActivityPostEntity>selectPosts(ActivityPostEntity selector) abstract List<FeedControlEntity>selectUserFeedControls(String userId) voidsetUserNamesAreCaseSensitive(boolean userNamesAreCaseSensitive) abstract voidabstract intupdatePostStatus(long id, ActivityPostEntity.STATUS status)
-
Field Details
-
FEED_FORMAT_JSON
- See Also:
-
FEED_FORMAT_ATOMENTRY
- See Also:
-
FEED_FORMAT_HTML
- See Also:
-
FEED_FORMAT_RSS
- See Also:
-
FEED_FORMAT_TEXT
- See Also:
-
FEED_FORMAT_XML
- See Also:
-
-
Constructor Details
-
FeedTaskProcessor
public FeedTaskProcessor()
-
-
Method Details
-
setUserNamesAreCaseSensitive
public void setUserNamesAreCaseSensitive(boolean userNamesAreCaseSensitive) -
process
- Throws:
Exception
-
startTransaction
- Throws:
SQLException
-
commitTransaction
- Throws:
SQLException
-
rollbackTransaction
- Throws:
SQLException
-
endTransaction
- Throws:
SQLException
-
selectPosts
public abstract List<ActivityPostEntity> selectPosts(ActivityPostEntity selector) throws SQLException - Throws:
SQLException
-
selectUserFeedControls
- Throws:
SQLException
-
insertFeedEntry
- Throws:
SQLException
-
updatePostStatus
- Throws:
SQLException
-
callWebScript
protected String callWebScript(String urlString, String ticket) throws MalformedURLException, URISyntaxException, IOException -
getTenantName
-
getTenantDomain
-
getSiteMembers
protected Set<String> getSiteMembers(RepoCtx ctx, String siteId, String tenantDomain) throws Exception - Throws:
Exception
-
getFollowers
- Throws:
Exception
-
canReadSite
protected abstract boolean canReadSite(RepoCtx ctx, String siteIdIn, String connectedUser, String tenantDomain) throws Exception - Throws:
Exception
-
canRead
protected abstract boolean canRead(RepoCtx ctx, String connectedUser, Map<String, Object> model) throws Exception- Throws:
Exception
-
getActivityTypeTemplates
protected Map<String,List<String>> getActivityTypeTemplates(String repoEndPoint, String ticket, String subPath) throws Exception - Throws:
Exception
-
getActivityTemplates
-
getFreemarkerConfiguration
-
processFreemarker
protected String processFreemarker(Map<String, freemarker.template.Template> templateCache, String fmTemplate, freemarker.template.Configuration cfg, Map<String, throws IOException, freemarker.template.TemplateException, ExceptionObject> model) - Throws:
IOExceptionfreemarker.template.TemplateExceptionException
-
getFeedControls
- Throws:
SQLException
-
acceptActivity
protected boolean acceptActivity(ActivityPostEntity activityPost, List<FeedControlEntity> feedControls) -
addMissingFormats
-
getTemplateSubPath
-
getBaseActivityType
-