Class Search
- java.lang.Object
-
- org.apache.sling.cms.reference.models.Search
-
@Model(adaptables=org.apache.sling.api.SlingHttpServletRequest.class) public class Search extends Object
Model for retrieving search results and pagination based on a search of the Sling CMS repository.
-
-
Field Summary
Fields Modifier and Type Field Description static String
TERM_PARAMETER
-
Constructor Summary
Constructors Constructor Description Search(org.apache.sling.api.SlingHttpServletRequest request, int limit, SearchService searchService, String basePath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCount()
int
getCurrentPage()
int
getEnd()
Integer[]
getPages()
List<org.apache.sling.api.resource.Resource>
getResults()
int
getStart()
String
getTerm()
boolean
isFirst()
boolean
isLast()
-
-
-
Field Detail
-
TERM_PARAMETER
public static final String TERM_PARAMETER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Search
@Inject public Search(org.apache.sling.api.SlingHttpServletRequest request, @Named("limit") int limit, SearchService searchService, @Named("basePath") String basePath)
-
-
Method Detail
-
getCount
public int getCount()
-
getCurrentPage
public int getCurrentPage()
-
getEnd
public int getEnd()
-
getPages
public Integer[] getPages()
-
getResults
public List<org.apache.sling.api.resource.Resource> getResults()
-
getStart
public int getStart()
-
getTerm
public String getTerm()
-
isFirst
public boolean isFirst()
-
isLast
public boolean isLast()
-
-