public class ForumTopicsFilteredGet extends AbstractDiscussionWebScript
Modifier and Type | Field and Description |
---|---|
protected static int |
DEFAULT_MAX_RESULTS |
protected static String |
DEFAULT_TOPIC_AUTHOR |
protected static int |
DEFAULT_TOPIC_LATEST_POST_DAYS_AGO |
protected static 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<TopicInfo> |
doSearch(org.alfresco.util.Pair<String,String> searchQuery,
boolean sortAscending,
org.alfresco.query.PagingRequest paging)
Do the actual search
|
protected Map<String,Object> |
executeImpl(SiteInfo site,
org.alfresco.service.cmr.repository.NodeRef nodeRef,
TopicInfo topic,
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 Map<String,Object> |
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 String |
getDateXDaysAgo(int daysAgo)
Get the date x days ago in the format 'yyyy-MM-dd'
|
protected org.alfresco.util.Pair<String,String> |
getSearchQuery(SiteInfo site,
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<TopicInfo> |
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 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 String SEARCH_QUERY
public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
searchService
- SearchServiceprotected Map<String,Object> executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)
executeImpl
in class AbstractDiscussionWebScript
req
- WebScriptRequeststatus
- Statuscache
- Cacheprotected Map<String,Object> executeImpl(SiteInfo site, org.alfresco.service.cmr.repository.NodeRef nodeRef, TopicInfo topic, 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
- SiteInfonodeRef
- 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
- WebScriptRequeststatus
- 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<TopicInfo> doSearch(org.alfresco.util.Pair<String,String> searchQuery, boolean sortAscending, org.alfresco.query.PagingRequest paging)
searchQuery
- Pair with query string in first and query language in secondsortAscending
- booleanpaging
- PagingRequestprotected org.alfresco.util.Pair<String,String> getSearchQuery(SiteInfo site, String author, int daysAgo)
site
- SiteInfoauthor
- StringdaysAgo
- intprotected String getDateXDaysAgo(int daysAgo)
daysAgo
- intprotected org.alfresco.query.PagingRequest buildPagingRequest(org.springframework.extensions.webscripts.WebScriptRequest req)
buildPagingRequest
in class AbstractDiscussionWebScript
req
- WebScriptRequestCopyright © 2005–2017 Alfresco Software. All rights reserved.