Ejemplo n.º 1
0
  /**
   * Add a {@link RegexpParameterFilter} set accept anything, replacing any existing filter for the
   * same parameter.
   *
   * @param tileLayerInfo layer to update the filter on
   * @param paramKey key for the parameter
   * @param createParam create a new filter if there is none to replace for the specified key
   */
  public static void updateAcceptAllRegExParameterFilter(
      final GeoServerTileLayerInfo tileLayerInfo, final String paramKey, boolean createParam) {

    createParam |= tileLayerInfo.removeParameterFilter(paramKey);

    if (createParam) {
      RegexParameterFilter filter = new RegexParameterFilter();
      filter.setKey(paramKey);
      filter.setDefaultValue("");
      filter.setRegex(".*");
      tileLayerInfo.addParameterFilter(filter);
    }
  }
 @Before
 public void setUpInternal() throws Exception {
   pf = new RegexParameterFilter();
   pf.setKey("TEST");
   model = Model.of(pf);
 }