Class AbstractWikiWebScript
- java.lang.Object
-
- org.springframework.extensions.webscripts.AbstractWebScript
-
- org.springframework.extensions.webscripts.DeclarativeWebScript
-
- org.alfresco.repo.web.scripts.wiki.AbstractWikiWebScript
-
- All Implemented Interfaces:
org.springframework.extensions.webscripts.WebScript
- Direct Known Subclasses:
WikiPageDelete
,WikiPageGet
,WikiPageListGet
,WikiPageMovePost
,WikiPagePut
,WikiPageVersionGet
public abstract class AbstractWikiWebScript extends org.springframework.extensions.webscripts.DeclarativeWebScript
- Since:
- 4.0
- Author:
- Nick Burch
-
-
Field Summary
Fields Modifier and Type Field Description protected org.alfresco.service.cmr.activities.ActivityService
activityService
protected static int
MAX_QUERY_ENTRY_COUNT
When no maximum or paging info is given, what should we use?protected org.alfresco.service.cmr.repository.NodeService
nodeService
protected org.alfresco.service.cmr.security.PersonService
personService
protected org.alfresco.service.cmr.site.SiteService
siteService
static String
WIKI_SERVICE_ACTIVITY_APP_NAME
protected WikiService
wikiService
-
Constructor Summary
Constructors Constructor Description AbstractWikiWebScript()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addActivityEntry(String event, WikiPageInfo wikiPage, org.alfresco.service.cmr.site.SiteInfo site, org.springframework.extensions.webscripts.WebScriptRequest req, org.json.simple.JSONObject json)
protected void
addActivityEntry(String event, WikiPageInfo wikiPage, org.alfresco.service.cmr.site.SiteInfo site, org.springframework.extensions.webscripts.WebScriptRequest req, org.json.simple.JSONObject json, Map<String,String> additionalData)
Generates an activity entry for the linkprotected PagingRequest
buildPagingRequest(org.springframework.extensions.webscripts.WebScriptRequest req)
Builds up a listing Paging request, based on the arguments specified in the URLprotected abstract Map<String,Object>
executeImpl(org.alfresco.service.cmr.site.SiteInfo site, String pageTitle, 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)
protected String
getOrNull(org.json.simple.JSONObject json, String key)
protected org.alfresco.service.cmr.repository.NodeRef
personForModel(String username)
protected Map<String,Object>
renderWikiPage(WikiPageInfo page)
void
setActivityService(org.alfresco.service.cmr.activities.ActivityService activityService)
void
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
void
setPersonService(org.alfresco.service.cmr.security.PersonService personService)
void
setSiteService(org.alfresco.service.cmr.site.SiteService siteService)
void
setWikiService(WikiService wikiService)
-
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
-
WIKI_SERVICE_ACTIVITY_APP_NAME
public static final String WIKI_SERVICE_ACTIVITY_APP_NAME
- See Also:
- Constant Field Values
-
MAX_QUERY_ENTRY_COUNT
protected static final int MAX_QUERY_ENTRY_COUNT
When no maximum or paging info is given, what should we use?- See Also:
- Constant Field Values
-
nodeService
protected org.alfresco.service.cmr.repository.NodeService nodeService
-
siteService
protected org.alfresco.service.cmr.site.SiteService siteService
-
wikiService
protected WikiService wikiService
-
personService
protected org.alfresco.service.cmr.security.PersonService personService
-
activityService
protected org.alfresco.service.cmr.activities.ActivityService activityService
-
-
Method Detail
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
-
setSiteService
public void setSiteService(org.alfresco.service.cmr.site.SiteService siteService)
-
setWikiService
public void setWikiService(WikiService wikiService)
-
setPersonService
public void setPersonService(org.alfresco.service.cmr.security.PersonService personService)
-
setActivityService
public void setActivityService(org.alfresco.service.cmr.activities.ActivityService activityService)
-
buildPagingRequest
protected PagingRequest buildPagingRequest(org.springframework.extensions.webscripts.WebScriptRequest req)
Builds up a listing Paging request, based on the arguments specified in the URL
-
addActivityEntry
protected void addActivityEntry(String event, WikiPageInfo wikiPage, org.alfresco.service.cmr.site.SiteInfo site, org.springframework.extensions.webscripts.WebScriptRequest req, org.json.simple.JSONObject json)
-
addActivityEntry
protected void addActivityEntry(String event, WikiPageInfo wikiPage, org.alfresco.service.cmr.site.SiteInfo site, org.springframework.extensions.webscripts.WebScriptRequest req, org.json.simple.JSONObject json, Map<String,String> additionalData)
Generates an activity entry for the link- Parameters:
event
- a String representing the event.wikiPage
- the wiki page generating the activity.site
- the site in which the wiki page was created.req
- theWebScriptRequest
.json
- JSONObjectadditionalData
- any additional data required for the activity.
-
personForModel
protected org.alfresco.service.cmr.repository.NodeRef personForModel(String username)
-
renderWikiPage
protected Map<String,Object> renderWikiPage(WikiPageInfo page)
-
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(org.alfresco.service.cmr.site.SiteInfo site, String pageTitle, org.springframework.extensions.webscripts.WebScriptRequest req, org.json.simple.JSONObject json, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)
-
-