Interface PreviewParameter


@NonExtendable public interface PreviewParameter
Object containing a map of parameters configured in the Multi-Perspective-Preview, accessible via PreviewParameter.Factory.from(Object) on the webserver.
Example:
 PreviewParameter mpp = PreviewParameter.Factory.from(request);
 if (mpp != null) {
     String gender = mpp.getParameter("gender");
     Number age = mpp.getParameter("age");
     if ("male".equals(gender) && age != null && age >= 18) {
         // ...
     }
 }
 
Since:
5.2.28
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Factory providing methods for getting a PreviewParameter instance.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The name of the HttpSession attribute this object will be assigned to.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Object
    getParameter(@NotNull String name)
    Returns the parameter value for the specified name.
    @Nullable Date
    Returns the configured preview time.
  • Field Details

    • SESSION_ATTRIBUTE

      static final String SESSION_ATTRIBUTE
      The name of the HttpSession attribute this object will be assigned to.
      Since:
      5.2.28
      See Also:
  • Method Details

    • getParameter

      @Nullable @Nullable Object getParameter(@NotNull @NotNull String name)
      Returns the parameter value for the specified name.
      Parameters:
      name - The name of the parameter value to return.
      Returns:
      The parameter value, or null if not found.
      Since:
      5.2.28
    • getTimeParameter

      @Nullable @Nullable Date getTimeParameter()
      Returns the configured preview time.
      Returns:
      The time parameter.
      Since:
      5.2.28