Class WeblinkParameter

java.lang.Object
com.saperion.rs.parameter.WeblinkParameter

public class WeblinkParameter extends Object
The Class WeblinkParameter. Holds all path and query parameters from a weblink request. Parameters are filled by the Provider WeblinkParameterFactory.
  • Constructor Details

    • WeblinkParameter

      public WeblinkParameter(jakarta.ws.rs.core.MultivaluedMap<String,String> parameters)
      Instantiates a new weblink parameter.
      Parameters:
      parameters - the parameters
  • Method Details

    • getArchive

      public String getArchive()
      Gets the archive/DDC from request.
      Returns:
      the archive
    • getField

      public String getField()
      Gets the DDC field from request.
      Returns:
      the field
    • getId

      public String 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

      public 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 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 List<String> getWeblinkPath()
      Builds the weblink path. Returns the path segments as list,.
      Returns:
      the path segment list
    • getQueryParameterMap

      public Map<String,String> getQueryParameterMap()
      Creates the query parameter map with all query parameter given by the MultivaluedMap map queryParameters. Keys are the REQ_PARAM constants (@see WeblinkUtil . Values are the query parameters.
      Returns:
      the map with key = REQ_PARAM constant, value = query parameter
    • addValidation

      public WeblinkParameter addValidation(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 validate
      validation - the Validation implementation to do the validation
      Returns:
      this object for build pattern
    • addValidation

      public WeblinkParameter addValidation(String parameter)
      Adds the standard validation to this WeblinkParameter object. Standard validation is BlankValidation. 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 String toString()
      Overrides:
      toString in class Object
      See Also: