Class ContentTypeQuery
- java.lang.Object
-
- com.atlassian.confluence.search.v2.query.ContentTypeQuery
-
- All Implemented Interfaces:
Expandable<SearchQuery>
,SearchQuery
public class ContentTypeQuery extends Object implements SearchQuery
Search for content of a particular type. The string representation of a content's type is that returned by theContentTypeAware.getType()
method.
-
-
Constructor Summary
Constructors Constructor Description ContentTypeQuery(ContentTypeEnum contentType)
Search for a particular type of contentContentTypeQuery(Collection<ContentTypeEnum> contentTypes)
Search for content that is one of the provided types
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
SearchQuery
expand()
Expands this query into a composite query (that composes other queries).Set<ContentTypeEnum>
getContentTypes()
Get the content types being searched for, as strings.String
getKey()
List<String>
getParameters()
List of parameters asString
s orSearchQuery
s.int
hashCode()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.search.v2.SearchQuery
getBoost, getSubClauses
-
-
-
-
Constructor Detail
-
ContentTypeQuery
public ContentTypeQuery(ContentTypeEnum contentType)
Search for a particular type of content- Parameters:
contentType
- the type string for the content to be searched for
-
ContentTypeQuery
public ContentTypeQuery(Collection<ContentTypeEnum> contentTypes)
Search for content that is one of the provided types- Parameters:
contentTypes
- a list of content types to search for
-
-
Method Detail
-
getKey
public String getKey()
- Specified by:
getKey
in interfaceSearchQuery
- Returns:
- the plugin key
-
getParameters
public List<String> getParameters()
Description copied from interface:SearchQuery
List of parameters asString
s orSearchQuery
s.- Specified by:
getParameters
in interfaceSearchQuery
- Returns:
String
s orSearchQuery
s.
-
getContentTypes
public Set<ContentTypeEnum> getContentTypes()
Get the content types being searched for, as strings.Really does the same as
getParameters()
but has a more apt name.- Returns:
- a list of the content types being searched for, as strings
-
expand
public SearchQuery expand()
Description copied from interface:SearchQuery
Expands this query into a composite query (that composes other queries). By overriding this method, one can specify a new query that is composition of the behaviour of the composed queries.- Specified by:
expand
in interfaceExpandable<SearchQuery>
- Specified by:
expand
in interfaceSearchQuery
- Returns:
- a query
-
-