Class AdditionalParameterValueMap

java.lang.Object
org.ametys.web.frontoffice.search.metamodel.AdditionalParameterValueMap

public class AdditionalParameterValueMap extends Object
This class holds the current values of the additional parameters
  • Constructor Details

    • AdditionalParameterValueMap

      protected AdditionalParameterValueMap(Map<String,Object> values, Set<String> notDisplayableParameterIds)
      Builds an AdditionalParameterValueMap
      Parameters:
      values - The values
      notDisplayableParameterIds - The parameter ids which are not displayable to an end-user
  • Method Details

    • getValue

      public <T> T getValue(String parameterId) throws ClassCastException
      Gets the value of the given additional parameter
      Type Parameters:
      T - the type of the value
      Parameters:
      parameterId - The id of the parameter
      Returns:
      the value of the given additional parameter
      Throws:
      ClassCastException - if the value cannot be cast to the expected type
    • getParameterIds

      Gets the parameter ids that have a value
      Returns:
      the parameter ids that have a value
    • getDisplayableValue

      public String getDisplayableValue(String parameterId, String defaultValue)
      Expert method, for debug purpose, use only if you know what you do
      Gets the value for display purpose.
      Parameters:
      parameterId - The id of the parameter
      defaultValue - The value to display if it is not displayable (for security purpose for instance)
      Returns:
      the value for display purpose.