Class UrlDeserializer
java.lang.Object
cz.metacentrum.perun.rpc.deserializer.Deserializer
cz.metacentrum.perun.rpc.deserializer.UrlDeserializer
Deserializer for URL data format.
Reads parameters only from URL of request, which is typically GET. Doesn't read any parameters from request body (InputStream)!
- Author:
- Jan Klos invalid input: '<'ddd@mail.muni.cz>, Pavel Zlamal invalid input: '<'256627@mail.muni.cz>
-
Constructor Summary
ConstructorsConstructorDescriptionUrlDeserializer(jakarta.servlet.http.HttpServletRequest request) Create deserializer for URL data format. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif value with the specified name is supplied.jakarta.servlet.http.HttpServletRequestReturn HttpServletRequest related to concrete call this deserializer is used to process.readAll()Returns string representation of the variables stored in the deserializer.int[]readArrayOfInts(String name) readBoolean(String name) Reads value with the specified name asBoolean.intReads value with the specified name asint.<T> List<T> Reads array with the specified name asList<valueType>.readString(String name) Reads value with the specified name asString.Reads value with the specified name asUUID.Methods inherited from class cz.metacentrum.perun.rpc.deserializer.Deserializer
read, read, readList, readListPerunBeans, readLocalDate, readPerunBean, stateChangingCheck
-
Constructor Details
-
UrlDeserializer
public UrlDeserializer(jakarta.servlet.http.HttpServletRequest request) Create deserializer for URL data format.- Parameters:
request- HttpServletRequest this deserializer is about to process
-
-
Method Details
-
contains
Returnstrueif value with the specified name is supplied. Check ignores array suffix "[]". It means, thattrueis returned for both "name" and "name[]" parameters.- Specified by:
containsin classDeserializer- Parameters:
name- name of the value to check- Returns:
trueif value with the specified name is supplied,falseotherwise
-
getServletRequest
public jakarta.servlet.http.HttpServletRequest getServletRequest()Description copied from class:DeserializerReturn HttpServletRequest related to concrete call this deserializer is used to process.Note that this "request" is not necessarily used as source to read parameters by other methods of deserializer. It IS typically for GET requests, but NOT for POST with JSON/JSONP data format.
- Overrides:
getServletRequestin classDeserializer- Returns:
- HttpServletRequest related to concrete call
-
readAll
Description copied from class:DeserializerReturns string representation of the variables stored in the deserializer.- Specified by:
readAllin classDeserializer- Returns:
- string containing all variables
-
readArrayOfInts
- Overrides:
readArrayOfIntsin classDeserializer
-
readBoolean
Description copied from class:DeserializerReads value with the specified name asBoolean.- Specified by:
readBooleanin classDeserializer- Parameters:
name- name of the value to read- Returns:
- the value as
Boolean
-
readInt
Description copied from class:DeserializerReads value with the specified name asint.- Specified by:
readIntin classDeserializer- Parameters:
name- name of the value to read- Returns:
- the value as
int
-
readList
Description copied from class:DeserializerReads array with the specified name asList<valueType>.- Overrides:
readListin classDeserializer- Parameters:
name- name of the array to readvalueType- type of the value to read- Returns:
- the value as
List<valueType>
-
readString
Description copied from class:DeserializerReads value with the specified name asString.- Specified by:
readStringin classDeserializer- Parameters:
name- name of the value to read- Returns:
- the value as
String
-
readUUID
Description copied from class:DeserializerReads value with the specified name asUUID.- Specified by:
readUUIDin classDeserializer- Parameters:
name- name of the value to read- Returns:
- the value as
UUID
-