Package com.saperion.rs.parameter
Class WeblinkParameter
- java.lang.Object
-
- com.saperion.rs.parameter.WeblinkParameter
-
public class WeblinkParameter extends java.lang.ObjectThe Class WeblinkParameter. Holds all path and query parameters from a weblink request. Parameters are filled by the ProviderWeblinkParameterFactory.
-
-
Constructor Summary
Constructors Constructor Description WeblinkParameter(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> parameters)Instantiates a new weblink parameter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WeblinkParameteraddValidation(java.lang.String parameter)Adds the standard validation to this WeblinkParameter object.WeblinkParameteraddValidation(java.lang.String parameter, Validation validation)Adds a validation to this WeblinkParameter object.WeblinkParameterclearValidation()Clear validation.java.lang.StringgetArchive()Gets the archive/DDC from request.booleangetCurrentRevision()Gets the current revision.intgetElement()Gets the doc element from request.java.lang.StringgetField()Gets the DDC field from request.java.lang.StringgetFilename()Gets the document filename from request.java.lang.StringgetId()Gets the id.java.util.Map<java.lang.String,java.lang.String>getQueryParameterMap()Creates the query parameter map with all query parameter given by the MultivaluedMap map queryParameters.booleangetReleased()Gets the released .java.lang.StringgetSecure()Gets the secure parameter from request.longgetTimeout()Gets the timeout parameter from request.java.util.List<java.lang.String>getWeblinkPath()Builds the weblink path.booleanisSecure()Checks if is secure parameter is set.java.lang.StringtoString()booleanvalidate()Validate.
-
-
-
Method Detail
-
getArchive
public java.lang.String getArchive()
Gets the archive/DDC from request.- Returns:
- the archive
-
getField
public java.lang.String getField()
Gets the DDC field from request.- Returns:
- the field
-
getId
public java.lang.String getId()
Gets the id.- Returns:
- the id
-
getElement
public int getElement()
Gets the doc element from request.- Returns:
- the element number,
WeblinkUtil.ALL_ELEMENTif not set
-
getSecure
public java.lang.String 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
public java.lang.String 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
public java.util.List<java.lang.String> getWeblinkPath()
Builds the weblink path. Returns the path segments as list,.- Returns:
- the path segment list
-
getQueryParameterMap
public java.util.Map<java.lang.String,java.lang.String> 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
public WeblinkParameter addValidation(java.lang.String parameter, Validation validation)
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
public WeblinkParameter addValidation(java.lang.String parameter)
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
public WeblinkParameter 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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
-