Class AbstractBlogWebScript
- java.lang.Object
-
- org.springframework.extensions.webscripts.AbstractWebScript
-
- org.springframework.extensions.webscripts.DeclarativeWebScript
-
- org.alfresco.repo.web.scripts.blogs.AbstractBlogWebScript
-
- All Implemented Interfaces:
org.springframework.extensions.webscripts.WebScript
- Direct Known Subclasses:
AbstractGetBlogWebScript
,BlogGet
,BlogPostDelete
,BlogPostGet
,BlogPostsPost
,BlogPut
public abstract class AbstractBlogWebScript extends org.springframework.extensions.webscripts.DeclarativeWebScript
- Since:
- 4.0
- Author:
- Neil Mc Erlean
-
-
Field Summary
Fields Modifier and Type Field Description protected ActivityService
activityService
protected BlogService
blogService
protected static String
CONTAINER
protected static String
CONTENT
protected static String
DATA
protected static String
DRAFT
protected static String
EXTERNAL_BLOG_CONFIG
protected static String
ITEM
protected static String
NODE
protected NodeService
nodeService
protected static String
PAGE
protected static String
POST
protected Repository
repository
protected ServiceRegistry
services
protected static String
SITE
protected SiteService
siteService
protected static String
TAGS
protected static String
TITLE
-
Constructor Summary
Constructors Constructor Description AbstractBlogWebScript()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addActivityEntry(String event, BlogPostInfo blog, SiteInfo site, org.springframework.extensions.webscripts.WebScriptRequest req, org.json.simple.JSONObject json, NodeRef nodeRef)
Generates an activity entry for the discussion itemprotected abstract Map<String,Object>
executeImpl(SiteInfo site, NodeRef nodeRef, BlogPostInfo blog, org.springframework.extensions.webscripts.WebScriptRequest req, org.json.simple.JSONObject json, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)
protected Map<String,Object>
executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)
void
setActivityService(ActivityService activityService)
void
setBlogService(BlogService blogService)
void
setNodeService(NodeService nodeService)
void
setRepository(Repository repository)
void
setServiceRegistry(ServiceRegistry services)
void
setSiteService(SiteService siteService)
-
Methods inherited from class org.springframework.extensions.webscripts.DeclarativeWebScript
execute, executeFinallyImpl, executeImpl, executeImpl, getTemplateModel, renderFormatTemplate
-
Methods inherited from class org.springframework.extensions.webscripts.AbstractWebScript
addModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toString
-
-
-
-
Field Detail
-
CONTAINER
protected static final String CONTAINER
- See Also:
- Constant Field Values
-
CONTENT
protected static final String CONTENT
- See Also:
- Constant Field Values
-
DATA
protected static final String DATA
- See Also:
- Constant Field Values
-
DRAFT
protected static final String DRAFT
- See Also:
- Constant Field Values
-
EXTERNAL_BLOG_CONFIG
protected static final String EXTERNAL_BLOG_CONFIG
- See Also:
- Constant Field Values
-
POST
protected static final String POST
- See Also:
- Constant Field Values
-
ITEM
protected static final String ITEM
- See Also:
- Constant Field Values
-
NODE
protected static final String NODE
- See Also:
- Constant Field Values
-
PAGE
protected static final String PAGE
- See Also:
- Constant Field Values
-
SITE
protected static final String SITE
- See Also:
- Constant Field Values
-
TAGS
protected static final String TAGS
- See Also:
- Constant Field Values
-
TITLE
protected static final String TITLE
- See Also:
- Constant Field Values
-
repository
protected Repository repository
-
blogService
protected BlogService blogService
-
nodeService
protected NodeService nodeService
-
siteService
protected SiteService siteService
-
activityService
protected ActivityService activityService
-
services
protected ServiceRegistry services
-
-
Method Detail
-
setServiceRegistry
public void setServiceRegistry(ServiceRegistry services)
-
setRepository
public void setRepository(Repository repository)
-
setBlogService
public void setBlogService(BlogService blogService)
-
setNodeService
public void setNodeService(NodeService nodeService)
-
setSiteService
public void setSiteService(SiteService siteService)
-
setActivityService
public void setActivityService(ActivityService activityService)
-
addActivityEntry
protected void addActivityEntry(String event, BlogPostInfo blog, SiteInfo site, org.springframework.extensions.webscripts.WebScriptRequest req, org.json.simple.JSONObject json, NodeRef nodeRef)
Generates an activity entry for the discussion item- Parameters:
event
- One of created, updated, deletedblog
- Either post or replysite
- sitereq
- requestjson
- jsonnodeRef
- NodeRef
-
executeImpl
protected Map<String,Object> executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)
- Overrides:
executeImpl
in classorg.springframework.extensions.webscripts.DeclarativeWebScript
-
executeImpl
protected abstract Map<String,Object> executeImpl(SiteInfo site, NodeRef nodeRef, BlogPostInfo blog, org.springframework.extensions.webscripts.WebScriptRequest req, org.json.simple.JSONObject json, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)
-
-