public class BlogQueryParameters extends PropertyQueryParameters
QueryParameters.OrderDirection
Modifier and Type | Field and Description |
---|---|
static String |
PARAM_BLOG_ALIASES
Parameter for the blog aliases.
|
static String |
PARAM_BLOG_IDS
Parameter for the blog IDs.
|
static String |
PARAM_BLOG_TAGPREFIX_SEARCH
the parameter name for tags starting with some pattern
|
static String |
PARAM_BLOGS_TO_IGNORE
Parameter for the IDs of the blogs to ignore.
|
static String |
PARAM_EVENT_TYPE
Paramater for the event type date
|
static String |
PARAM_EXTERNAL_OBJECT_ID
Paramater for external object id
|
static String |
PARAM_EXTERNAL_OBJECT_SYSTEM_ID
Paramater for external system id
|
static String |
PARAM_LAST_MODIFICATION_DATE
Paramater for the last modification date
|
static String |
PARAM_MANAGER_ACCESS_ROLES
Parameter for manager access roles.
|
static String |
PARAM_PARENT_TOPIC_IDS
Parameter for the parent topic IDs.
|
static String |
PARAM_READ_ACCESS_ROLES
Parameter for read access roles.
|
static String |
PARAM_USER_ID
Parameter for the user ID.
|
static String |
PARAM_WRITE_ACCESS_ROLES
Parameter for write access roles.
|
static int |
SEARCH_FIELD_BLOG_TAGS |
static int |
SEARCH_FIELD_DESCRIPTION |
static int |
SEARCH_FIELD_IDENTIFIER |
static int |
SEARCH_FIELD_TITLE |
SORT_ASCENDING, SORT_DESCENDING
Constructor and Description |
---|
BlogQueryParameters()
Create a new parameters object.
|
Modifier and Type | Method and Description |
---|---|
void |
addTagId(Long tagId) |
void |
addTagStoreTagId(String tagStoreAlias,
Collection<String> tagStoreTagIds) |
void |
addTagStoreTagId(String tagStoreAlias,
String tagStoreTagId) |
TopicAccessLevel |
getAccessLevel()
Returns the blog access level.
|
static Map<String,BlogRole[]> |
getBlogAccessParameter() |
String[] |
getBlogAliases()
The blog aliases to which the result set will be reduced.
|
Long[] |
getBlogIds()
The blog IDs to which the result set will be reduced.
|
Long[] |
getBlogsToExclude()
Returns the blog IDs which will not be included in the response.
|
String |
getBlogTagConstant(int index)
Get the parameter name for the selected tag of a given index (if its a parameter list)
|
String |
getExternalObjectId()
If both
getExternalObjectId() and getExternalObjectSystemId() are set, both
must match on the same external object |
String |
getExternalObjectSystemId()
If both
getExternalObjectId() and getExternalObjectSystemId() are set, both
must match on the same external object |
org.hibernate.criterion.MatchMode |
getMatchMode() |
Date |
getMinimumLastModificationDate() |
Map<String,Object> |
getParameters()
Get the parameters of this instances, the names are the keys
|
Long[] |
getParentTopicIds() |
Set<Long> |
getTagIds() |
String |
getTagPrefix() |
String[] |
getTags() |
Set<String> |
getTagStoreAliases() |
Map<String,Set<String>> |
getTagStoreTagIds() |
String[] |
getTextFilter()
Returns the strings to be found in title, description or identifier of blog.
|
String[] |
getTextFilterParamNames() |
Long |
getUserId() |
boolean |
isExcludeToplevelTopics() |
boolean |
isForceAllTopics() |
boolean |
isIncludeChildTopics() |
boolean |
isMultilingualTagPrefixSearch() |
boolean |
isRenderTagsJoin() |
protected boolean |
isSearchInField(int fieldConstant)
Tests whether the query should search in a specific field.
|
boolean |
isShowOnlyRootTopics() |
boolean |
isShowOnlyToplevelTopics() |
boolean |
needTransformListItem()
returns true.
|
void |
setAccessLevel(TopicAccessLevel accessLevel)
Sets the blog access level
|
void |
setBlogAliases(String[] aliases)
Used to reduce the result to blogs with specific aliases.
|
void |
setBlogIds(Long[] blogIds)
Used to reduce the result to blogs with specific IDs.
|
void |
setBlogsToExclude(Long[] blogsToExclude)
Used to set blog IDs to exclude from search.
|
void |
setExcludeToplevelTopics(boolean exclude)
Set whether to exclude top level topics from the result.
|
void |
setExternalObjectId(String externalObjectId) |
void |
setExternalObjectSystemId(String externalObjectSystemId) |
void |
setForceAllTopics(boolean forceAllTopics) |
void |
setIncludeChildTopics(boolean includeChildTopics)
Whether to include the child topics in the query.
|
void |
setMatchMode(org.hibernate.criterion.MatchMode matchMode)
Sets the match mode text filtering.
|
void |
setMinimumLastModificationDate(Date minimumLastModificationDate) |
void |
setParentTopicIds(Long[] parentTopicIds) |
void |
setRenderTagsJoin(boolean renderTagsJoin) |
void |
setSearchFieldMask(int searchFieldMask)
Can be used to set the fields to be searched with the
text filter . |
void |
setShowOnlyFollowedItems(Boolean showFollowing) |
void |
setShowOnlyRootTopics(boolean showOnlyRootTopics)
Set whether only root topics should be returned.
|
void |
setShowOnlyToplevelTopics(boolean showOnlyToplevelTopics)
Set whether only topics marked as top level topic should be returned.
|
void |
setTagPrefix(String tagPrefix) |
void |
setTags(String[] tags) |
void |
setTagStoreAliases(Set<String> tagStoreAliases)
Set aliases of tag stores to only consider tags from these stores
|
void |
setTextFilter(String[] textFilter)
Set the strings to be found in title, description or identifier of blog.
|
void |
setUserId(Long userId) |
Boolean |
showOnlyFollowedItems() |
void |
sortByLastModificationDateAsc()
Sort ascending by the last modification date of the blog.
|
void |
sortByNameAsc()
sort by the name of the blogs
|
IdentifiableEntityData |
transformResultItem(Object resultItem)
Transforms the BlogData.
|
addPropertyFilter, getPropertyFilters
addParameter, addParameter, addSortField, addSortField, createParameterNamesForSearch, getDatabaseConfiguration, getLanguageCode, getPageInformation, getPageInformation, getResultSpecification, getSortString, isLimitResultSet, isLimitResultSetAvodingDuplicates, putParameter, putParametersForSearch, putParametersForSearch, setLanguageCode, setLimitResultSet, setLimitResultSetAvodingDuplicates, setResultSpecification, validateLong
public static final String PARAM_USER_ID
public static final String PARAM_BLOG_TAGPREFIX_SEARCH
public static final String PARAM_WRITE_ACCESS_ROLES
public static final String PARAM_READ_ACCESS_ROLES
public static final String PARAM_MANAGER_ACCESS_ROLES
public static final String PARAM_BLOGS_TO_IGNORE
public static final String PARAM_BLOG_IDS
public static final String PARAM_PARENT_TOPIC_IDS
public static final String PARAM_BLOG_ALIASES
public static final String PARAM_LAST_MODIFICATION_DATE
public static final String PARAM_EVENT_TYPE
public static final String PARAM_EXTERNAL_OBJECT_SYSTEM_ID
public static final String PARAM_EXTERNAL_OBJECT_ID
public static final int SEARCH_FIELD_TITLE
public static final int SEARCH_FIELD_DESCRIPTION
public static final int SEARCH_FIELD_IDENTIFIER
public static final int SEARCH_FIELD_BLOG_TAGS
public static Map<String,BlogRole[]> getBlogAccessParameter()
public void addTagId(Long tagId)
tagId
- TagId to filter for.public void addTagStoreTagId(String tagStoreAlias, Collection<String> tagStoreTagIds)
tagStoreAlias
- The alias of the TagStore.tagStoreTagIds
- Collection of tag ids to add for the given TagStore.public void addTagStoreTagId(String tagStoreAlias, String tagStoreTagId)
tagStoreAlias
- The alias of the TagStore.tagStoreTagId
- The id of the tag within the TagStore.public TopicAccessLevel getAccessLevel()
public String[] getBlogAliases()
public Long[] getBlogIds()
public Long[] getBlogsToExclude()
public String getBlogTagConstant(int index)
index
- the indexpublic String getExternalObjectId()
getExternalObjectId()
and getExternalObjectSystemId()
are set, both
must match on the same external objectpublic String getExternalObjectSystemId()
getExternalObjectId()
and getExternalObjectSystemId()
are set, both
must match on the same external objectpublic org.hibernate.criterion.MatchMode getMatchMode()
public Date getMinimumLastModificationDate()
public Map<String,Object> getParameters()
getParameters
in class PropertyQueryParameters
public Long[] getParentTopicIds()
public String getTagPrefix()
public String[] getTags()
public Set<String> getTagStoreAliases()
public String[] getTextFilter()
public String[] getTextFilterParamNames()
public Long getUserId()
public boolean isExcludeToplevelTopics()
isShowOnlyToplevelTopics()
returns true this flag is ignored.public boolean isForceAllTopics()
public boolean isIncludeChildTopics()
public boolean isMultilingualTagPrefixSearch()
public boolean isRenderTagsJoin()
protected boolean isSearchInField(int fieldConstant)
fieldConstant
- one of the SEARCH_FIELD_X of this classsetSearchFieldMask(int)
public boolean isShowOnlyRootTopics()
isShowOnlyToplevelTopics()
returns true.public boolean isShowOnlyToplevelTopics()
isShowOnlyRootTopics()
and
isExcludeToplevelTopics()
will be ignored.public boolean needTransformListItem()
needTransformListItem
in class QueryParameters
public void setAccessLevel(TopicAccessLevel accessLevel)
accessLevel
- the access level to filter forpublic void setBlogAliases(String[] aliases)
aliases
- the aliases of the blogspublic void setBlogIds(Long[] blogIds)
blogIds
- the blog IDspublic void setBlogsToExclude(Long[] blogsToExclude)
blogsToExclude
- the blogsToExclude to setpublic void setExcludeToplevelTopics(boolean exclude)
isShowOnlyToplevelTopics()
returns true.exclude
- True if top level topics should be excluded.public void setExternalObjectId(String externalObjectId)
public void setExternalObjectSystemId(String externalObjectSystemId)
public void setForceAllTopics(boolean forceAllTopics)
forceAllTopics
- True, if all topics should be shown, regardless of access roles. The current user
has to be a client manager to use this flag.public void setIncludeChildTopics(boolean includeChildTopics)
includeChildTopics
- whether to include the child topicspublic void setMatchMode(org.hibernate.criterion.MatchMode matchMode)
matchMode
- the matchMode to setpublic void setMinimumLastModificationDate(Date minimumLastModificationDate)
minimumLastModificationDate
- the minimum last modification the blog must be modified AFTERpublic void setParentTopicIds(Long[] parentTopicIds)
parentTopicIds
- Array of parent topics.public void setRenderTagsJoin(boolean renderTagsJoin)
renderTagsJoin
- the renderTagsJoin to setpublic void setSearchFieldMask(int searchFieldMask)
text filter
.searchFieldMask
- a bitwise combination of the SEARCH_*_FIELD flags.SEARCH_FIELD_DESCRIPTION
,
SEARCH_FIELD_IDENTIFIER
,
SEARCH_FIELD_TITLE
,
SEARCH_FIELD_BLOG_TAGS
public void setShowOnlyFollowedItems(Boolean showFollowing)
showFollowing
- the showFollowing to setpublic void setShowOnlyRootTopics(boolean showOnlyRootTopics)
isShowOnlyToplevelTopics()
returns true.showOnlyRootTopics
- True if only root topics should be returned.public void setShowOnlyToplevelTopics(boolean showOnlyToplevelTopics)
isShowOnlyToplevelTopics()
and isExcludeToplevelTopics()
will be ignored.showOnlyToplevelTopics
- True if only top level topics should be returned.public void setTagPrefix(String tagPrefix)
tagPrefix
- the prefix tags must havepublic void setTags(String[] tags)
tags
- the tags to setpublic void setTagStoreAliases(Set<String> tagStoreAliases)
tagStoreAliases
- set of aliases identifying tag storespublic void setTextFilter(String[] textFilter)
textFilter
- the full text strings to search forpublic void setUserId(Long userId)
userId
- the user id to filter forpublic Boolean showOnlyFollowedItems()
true
if only followed items are shownpublic void sortByLastModificationDateAsc()
public void sortByNameAsc()
public IdentifiableEntityData transformResultItem(Object resultItem)
transformResultItem
in class QueryParameters
resultItem
- The resultItem to transformCopyright © 2019 Communote team. All rights reserved.