View Javadoc
1   /*
2    * #%L
3    * wcm.io
4    * %%
5    * Copyright (C) 2019 wcm.io
6    * %%
7    * Licensed under the Apache License, Version 2.0 (the "License");
8    * you may not use this file except in compliance with the License.
9    * You may obtain a copy of the License at
10   *
11   *      http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   * #L%
19   */
20  package io.wcm.handler.url.impl.clientlib;
21  
22  import org.apache.commons.lang3.builder.ToStringBuilder;
23  
24  import io.wcm.wcm.commons.util.ToStringStyle;
25  
26  /**
27   * Entry for {@link ClientlibPathCache}.
28   */
29  class ClientlibPathCacheEntry {
30  
31    private final String path;
32    private final boolean isClientLibrary;
33    private final boolean isAllowProxy;
34  
35    ClientlibPathCacheEntry(String path, boolean isClientLibrary, boolean isAllowProxy) {
36      this.path = path;
37      this.isClientLibrary = isClientLibrary;
38      this.isAllowProxy = isAllowProxy;
39    }
40  
41    public String getPath() {
42      return this.path;
43    }
44  
45    public boolean isClientLibrary() {
46      return this.isClientLibrary;
47    }
48  
49    public boolean isAllowProxy() {
50      return this.isAllowProxy;
51    }
52  
53    @Override
54    public String toString() {
55      return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_OMIT_NULL_STYLE);
56    }
57  
58  }