| <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang=""><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>URLMapEntry.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Turbine</a> > <a href="index.source.html" class="el_package">org.apache.turbine.services.urlmapper.model</a> > <span class="el_source">URLMapEntry.java</span></div><h1>URLMapEntry.java</h1><pre class="source lang-java linenums">package org.apache.turbine.services.urlmapper.model; |
| |
| /* |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| * under the License. |
| */ |
| |
| import java.util.LinkedHashMap; |
| import java.util.Map; |
| import java.util.Set; |
| import java.util.regex.Pattern; |
| |
| import jakarta.xml.bind.annotation.XmlAccessType; |
| import jakarta.xml.bind.annotation.XmlAccessorType; |
| import jakarta.xml.bind.annotation.XmlElement; |
| import jakarta.xml.bind.annotation.XmlType; |
| import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; |
| |
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| import com.fasterxml.jackson.annotation.JsonProperty; |
| |
| /** |
| * The url map model class |
| * |
| * @author <a href="mailto:tv@apache.org">Thomas Vandahl</a> |
| */ |
| @XmlType(name="map") |
| @XmlAccessorType(XmlAccessType.NONE) |
| @JsonIgnoreProperties(ignoreUnknown = true) |
| <span class="nc" id="L44">public class URLMapEntry</span> |
| { |
| private Pattern urlPattern; |
| <span class="nc" id="L47"> private Map<String, String> implicit = new LinkedHashMap<>();</span> |
| <span class="nc" id="L48"> private Map<String, String> ignore = new LinkedHashMap<>();</span> |
| <span class="nc" id="L49"> private Map<String, String> override = new LinkedHashMap<>();</span> |
| |
| private Map<String, Integer> groupNamesMap; |
| <span class="nc" id="L52"> private Set<String> relevantKeys = null;</span> |
| |
| /** |
| * @return the urlPattern |
| */ |
| @XmlElement(name="pattern") |
| @XmlJavaTypeAdapter(XmlPatternAdapter.class) |
| @JsonProperty("pattern") |
| public Pattern getUrlPattern() |
| { |
| <span class="nc" id="L62"> return urlPattern;</span> |
| } |
| |
| /** |
| * @param urlPattern the urlPattern to set |
| */ |
| protected void setUrlPattern(Pattern urlPattern) |
| { |
| <span class="nc" id="L70"> this.urlPattern = urlPattern;</span> |
| <span class="nc" id="L71"> }</span> |
| |
| /** |
| * @return the implicit parameters |
| */ |
| @XmlElement(name="implicit-parameters") |
| @XmlJavaTypeAdapter(XmlParameterAdapter.class) |
| @JsonProperty("implicit-parameters") |
| public Map<String, String> getImplicitParameters() |
| { |
| <span class="nc" id="L81"> return implicit;</span> |
| } |
| |
| /** |
| * @param implicit the implicit parameters to set |
| */ |
| protected void setImplicitParameters(Map<String, String> implicit) |
| { |
| <span class="nc" id="L89"> this.implicit = implicit;</span> |
| <span class="nc" id="L90"> }</span> |
| |
| /** |
| * @return the ignored parameters |
| */ |
| @XmlElement(name="ignore-parameters") |
| @XmlJavaTypeAdapter(XmlParameterAdapter.class) |
| @JsonProperty("ignore-parameters") |
| public Map<String, String> getIgnoreParameters() |
| { |
| <span class="nc" id="L100"> return ignore;</span> |
| } |
| |
| /** |
| * @param ignore the ignored parameters to set |
| */ |
| protected void setIgnoreParameters(Map<String, String> ignore) |
| { |
| <span class="nc" id="L108"> this.ignore = ignore;</span> |
| <span class="nc" id="L109"> }</span> |
| |
| /** |
| * @return the override parameters |
| */ |
| @XmlElement(name="override-parameters") |
| @XmlJavaTypeAdapter(XmlParameterAdapter.class) |
| @JsonProperty("override-parameters") |
| public Map<String, String> getOverrideParameters() |
| { |
| <span class="nc" id="L119"> return override;</span> |
| } |
| |
| /** |
| * @param override the override parameters to set |
| */ |
| protected void setOverrideParameters(Map<String, String> override) |
| { |
| <span class="nc" id="L127"> this.override = override;</span> |
| <span class="nc" id="L128"> }</span> |
| |
| /** |
| * Get the map of group names to group indices for the stored Pattern |
| * |
| * @return the groupNamesMap |
| */ |
| public Map<String, Integer> getGroupNamesMap() |
| { |
| <span class="nc" id="L137"> return groupNamesMap;</span> |
| } |
| |
| /** |
| * Set the map of group names to group indices for the stored Pattern |
| * |
| * @param groupNamesMap the groupNamesMap to set |
| */ |
| public void setGroupNamesMap(Map<String, Integer> groupNamesMap) |
| { |
| <span class="nc" id="L147"> this.groupNamesMap = groupNamesMap;</span> |
| <span class="nc" id="L148"> }</span> |
| |
| /** |
| * Get the set of relevant keys for comparison (cached for performance) |
| * |
| * @return the relevantKeys |
| */ |
| public Set<String> getRelevantKeys() |
| { |
| <span class="nc" id="L157"> return relevantKeys;</span> |
| } |
| |
| /** |
| * Set the set of relevant keys for comparison (cached for performance) |
| * |
| * @param relevantKeys the relevantKeys to set |
| */ |
| public void setRelevantKeys(Set<String> relevantKeys) |
| { |
| <span class="nc" id="L167"> this.relevantKeys = relevantKeys;</span> |
| <span class="nc" id="L168"> }</span> |
| |
| @Override |
| public String toString() |
| { |
| <span class="nc" id="L173"> return "URLMapEntry: [ pattern: " + urlPattern + ", implicit-parameters: " + implicit + ", override-parameters: " + override + ", ignore-parameters:" + ignore + " ]";</span> |
| } |
| } |
| </pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.12.202403310830</span></div></body></html> |