Package com.saperion.rs.parameter
Class WeblinkParameter
java.lang.Object
com.saperion.rs.parameter.WeblinkParameter
The Class WeblinkParameter. Holds all path and query parameters from a weblink request.
Parameters are filled by the Provider
WeblinkParameterFactory
.-
Constructor Summary
ConstructorsConstructorDescriptionWeblinkParameter
(jakarta.ws.rs.core.MultivaluedMap<String, String> parameters) Instantiates a new weblink parameter. -
Method Summary
Modifier and TypeMethodDescriptionaddValidation
(String parameter) Adds the standard validation to this WeblinkParameter object.addValidation
(String parameter, Validation validation) Adds a validation to this WeblinkParameter object.Clear validation.Gets the archive/DDC from request.boolean
Gets the current revision.int
Gets the doc element from request.getField()
Gets the DDC field from request.Gets the document filename from request.getId()
Gets the id.Creates the query parameter map with all query parameter given by the MultivaluedMap map queryParameters.boolean
Gets the released .Gets the secure parameter from request.long
Gets the timeout parameter from request.Builds the weblink path.boolean
isSecure()
Checks if is secure parameter is set.toString()
boolean
validate()
Validate.
-
Constructor Details
-
WeblinkParameter
Instantiates a new weblink parameter.- Parameters:
parameters
- the parameters
-
-
Method Details
-
getArchive
Gets the archive/DDC from request.- Returns:
- the archive
-
getField
Gets the DDC field from request.- Returns:
- the field
-
getId
Gets the id.- Returns:
- the id
-
getElement
public int getElement()Gets the doc element from request.- Returns:
- the element number,
WeblinkUtil.ALL_ELEMENT
if not set
-
getSecure
Gets the secure parameter from request.- Returns:
- the secure
-
isSecure
public boolean isSecure()Checks if is secure parameter is set.- Returns:
- true, if is secure parameter is set to true
-
getFilename
Gets the document filename from request.- Returns:
- the filename
-
getReleased
public boolean getReleased()Gets the released .- Returns:
- true, if released parameter is set to "true" in request
-
getTimeout
public long getTimeout()Gets the timeout parameter from request.- Returns:
- the timeout
-
getCurrentRevision
public boolean getCurrentRevision()Gets the current revision.- Returns:
- true, if the current revision parameter is set to "true" in request
-
getWeblinkPath
Builds the weblink path. Returns the path segments as list,.- Returns:
- the path segment list
-
getQueryParameterMap
Creates the query parameter map with all query parameter given by the MultivaluedMap map queryParameters. Keys are the REQ_PARAM constants (@seeWeblinkUtil
. Values are the query parameters.- Returns:
- the map with key = REQ_PARAM constant, value = query parameter
-
addValidation
Adds a validation to this WeblinkParameter object. Validation of this object can be started by calling the validate() method.- Parameters:
parameter
- the request parameter to validatevalidation
- the Validation implementation to do the validation- Returns:
- this object for build pattern
-
addValidation
Adds the standard validation to this WeblinkParameter object. Standard validation isBlankValidation
. Convenience method, calls addValidation(parameter, new BlankValidation()).- Parameters:
parameter
- the request parameter to validate- Returns:
- this object for build pattern
-
clearValidation
Clear validation. Removes all added validations from this object.- Returns:
- this object for build pattern
-
validate
public boolean validate()Validate. Starts the validation process. Iterates over all added validations and checks the query parameter against the validation.- Returns:
- true, if validation was successful
-
toString
-