Class ResultDisplay
- java.lang.Object
-
- org.ametys.web.frontoffice.search.instance.model.ResultDisplay
-
public class ResultDisplay extends Object
A configuration of result display.
-
-
Constructor Summary
Constructors Constructor Description ResultDisplay(ResultDisplayType type, String page, Boolean launchSearchAtStartup, String serviceGroupId, AmetysObjectResolver resolver)
Creates a ResultDisplay
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResultDisplayType
getType()
Gets the typeOptional<Boolean>
launchSearchAtStartup()
Returnstrue
if a search at startup must be launched.Optional<Page>
resultPage()
Gets the result page.String
serviceGroupId()
Gets the service group id
-
-
-
Constructor Detail
-
ResultDisplay
public ResultDisplay(ResultDisplayType type, String page, Boolean launchSearchAtStartup, String serviceGroupId, AmetysObjectResolver resolver)
Creates a ResultDisplay- Parameters:
type
- the typepage
- the page. Must be non-null if type isResultDisplayType.ON_PAGE
, must be null otherwise.launchSearchAtStartup
- true to launch a search at startup. Must be null if type isResultDisplayType.ON_PAGE
, must not otherwise.serviceGroupId
- the service group idresolver
- The ametys object resolver
-
-
Method Detail
-
getType
public ResultDisplayType getType()
Gets the type- Returns:
- the type
-
resultPage
public Optional<Page> resultPage()
Gets the result page. Must be non-empty ifgetType()
returnsResultDisplayType.ON_PAGE
, must be empty otherwise.- Returns:
- the result page
-
launchSearchAtStartup
public Optional<Boolean> launchSearchAtStartup()
Returnstrue
if a search at startup must be launched. Must be empty ifgetType()
returnsResultDisplayType.ON_PAGE
, must not otherwise.- Returns:
true
if a search at startup must be launched
-
serviceGroupId
public String serviceGroupId()
Gets the service group id- Returns:
- the service group id
-
-