Class InputValidator
java.lang.Object
org.ametys.web.frontoffice.search.requesttime.input.InputValidator
Validator to determine if the search has to be launched or not
If both
If both
rejects()
and validate()
return false
, then it is unknown and the search will not be launched.-
Field Summary
Modifier and TypeFieldDescriptionprotected String
The zone item id the request comes fromprotected SearchServiceInstance
The current service instanceprotected String
The value of the parameter for "submit-form"protected ZoneItem
The current zone item -
Constructor Summary
ConstructorDescriptionInputValidator
(SearchServiceInstance serviceInstance, ZoneItem zoneItem, String submittedFormParamValue, String fromZoneItemId) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
It comes from the same group idprotected boolean
It comes from the same zone item idprotected boolean
Request comes from another page with a search service configured withResultDisplayType.ON_PAGE
and no service group idprotected boolean
The current request is not part of a serviceboolean
rejects()
Determines if the search has NOT to be launched
If this method returnstrue
, then it will ensure that is the search will not be launched, even thoughvalidate()
would returntrue
as well.protected boolean
ResultDisplayType
of the service instance ison page
(whether on another or on itself)boolean
validate()
Validates in order to determine if the search has to be launched or not
-
Field Details
-
_serviceInstance
The current service instance -
_zoneItem
The current zone item -
_submittedFormParamValue
The value of the parameter for "submit-form" -
_fromZoneItemId
The zone item id the request comes from
-
-
Constructor Details
-
InputValidator
public InputValidator(SearchServiceInstance serviceInstance, ZoneItem zoneItem, String submittedFormParamValue, String fromZoneItemId) Constructor- Parameters:
serviceInstance
- The current service instancezoneItem
- The current zone itemsubmittedFormParamValue
- The value of the parameter for "submit-form"fromZoneItemId
- The zone item id the request comes from
-
-
Method Details
-
rejects
Determines if the search has NOT to be launched
If this method returnstrue
, then it will ensure that is the search will not be launched, even thoughvalidate()
would returntrue
as well.- Returns:
true
if the search has NOT to be launched
-
resultDisplayTypeIsOnPage
ResultDisplayType
of the service instance ison page
(whether on another or on itself)- Returns:
true
ifResultDisplayType
of the service instance ison page
(whether on another or on itself)
-
validate
Validates in order to determine if the search has to be launched or not- Returns:
true
if the search has to be launched
-
notPartOfAService
The current request is not part of a service- Returns:
true
if the current request is not part of a service
-
comesFromSourcePageWithNoGroupId
Request comes from another page with a search service configured withResultDisplayType.ON_PAGE
and no service group id- Returns:
true
if request comes from another page with a search service configured withResultDisplayType.ON_PAGE
and no service group id
-
comesFromSameGroupId
It comes from the same group id- Returns:
true
if it comes from the same group id
-
comesFromSameZoneItemId
It comes from the same zone item id- Returns:
true
if it comes from the same zone item id
-