public class ForumTopicsFilteredGet extends AbstractDiscussionWebScript
Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_MAX_RESULTS |
protected static java.lang.String |
DEFAULT_TOPIC_AUTHOR |
protected static int |
DEFAULT_TOPIC_LATEST_POST_DAYS_AGO |
protected static java.lang.String |
SEARCH_QUERY |
protected static org.alfresco.service.cmr.repository.StoreRef |
SPACES_STORE |
activityService, DISCUSSIONS_SERVICE_ACTIVITY_APP_NAME, discussionService, KEY_AUTHOR, KEY_CAN_EDIT, KEY_IS_TOPIC_POST, KEY_POST, KEY_POSTDATA, KEY_TOPIC, MAX_QUERY_ENTRY_COUNT, nodeService, permissionService, personService, siteService
Constructor and Description |
---|
ForumTopicsFilteredGet() |
Modifier and Type | Method and Description |
---|---|
protected org.alfresco.query.PagingRequest |
buildPagingRequest(org.springframework.extensions.webscripts.WebScriptRequest req)
Builds up a listing Paging request, based on the arguments specified in the URL
|
protected org.alfresco.query.PagingResults |
doSearch(org.alfresco.util.Pair searchQuery,
boolean sortAscending,
org.alfresco.query.PagingRequest paging)
Do the actual search
|
protected java.util.Map |
executeImpl(org.alfresco.service.cmr.site.SiteInfo site,
org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.cmr.discussion.TopicInfo topic,
org.alfresco.service.cmr.discussion.PostInfo post,
org.springframework.extensions.webscripts.WebScriptRequest req,
org.json.simple.JSONObject json,
org.springframework.extensions.webscripts.Status status,
org.springframework.extensions.webscripts.Cache cache) |
protected java.util.Map |
executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.Status status,
org.springframework.extensions.webscripts.Cache cache)
Overrides AbstractDiscussionWebScript to allow a null site
|
protected java.lang.String |
getDateXDaysAgo(int daysAgo)
Get the date x days ago in the format 'yyyy-MM-dd'
|
protected org.alfresco.util.Pair |
getSearchQuery(org.alfresco.service.cmr.site.SiteInfo site,
java.lang.String author,
int daysAgo)
Build the search query from the passed in parameters and SEARCH_QUERY constant
|
void |
setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
Sets the searchService.
|
protected org.alfresco.query.PagingResults |
wrap(org.alfresco.service.cmr.search.ResultSet finalResults,
org.alfresco.query.PagingRequest paging)
Wrap up search results as
TopicInfo instances |
addActivityEntry, buildCommonModel, buildPerson, canUserEditPost, getOrNull, getTags, renderPost, renderTopic, renderTopics, renderTopics, setActivityService, setDiscussionService, setNodeService, setPermissionService, setPersonService, setSiteService
execute, executeFinallyImpl, executeImpl, executeImpl, getTemplateModel, renderFormatTemplate
addModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toString
protected static final java.lang.String DEFAULT_TOPIC_AUTHOR
protected static final int DEFAULT_TOPIC_LATEST_POST_DAYS_AGO
protected static final int DEFAULT_MAX_RESULTS
protected static final org.alfresco.service.cmr.repository.StoreRef SPACES_STORE
protected static final java.lang.String SEARCH_QUERY
public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
searchService
- protected java.util.Map executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)
executeImpl
in class AbstractDiscussionWebScript
req
- status
- cache
- protected java.util.Map executeImpl(org.alfresco.service.cmr.site.SiteInfo site, org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.cmr.discussion.TopicInfo topic, org.alfresco.service.cmr.discussion.PostInfo post, org.springframework.extensions.webscripts.WebScriptRequest req, org.json.simple.JSONObject json, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)
executeImpl
in class AbstractDiscussionWebScript
site
- nodeRef
- Not required. It is only included because it is overriding the parent class.topic
- Not required. It is only included because it is overriding the parent class.post
- Not required. It is only included because it is overriding the parent class.req
- status
- Not required. It is only included because it is overriding the parent class.cache
- Not required. It is only included because it is overriding the parent class.protected org.alfresco.query.PagingResults doSearch(org.alfresco.util.Pair searchQuery, boolean sortAscending, org.alfresco.query.PagingRequest paging)
searchQuery
- Pair with query string in first and query language in secondsortAscending
- paging
- protected org.alfresco.util.Pair getSearchQuery(org.alfresco.service.cmr.site.SiteInfo site, java.lang.String author, int daysAgo)
site
- author
- daysAgo
- protected java.lang.String getDateXDaysAgo(int daysAgo)
daysAgo
- protected org.alfresco.query.PagingRequest buildPagingRequest(org.springframework.extensions.webscripts.WebScriptRequest req)
buildPagingRequest
in class AbstractDiscussionWebScript
req
- protected org.alfresco.query.PagingResults wrap(org.alfresco.service.cmr.search.ResultSet finalResults, org.alfresco.query.PagingRequest paging)
TopicInfo
instancesfinalResults
- paging
- Copyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.