ClientlibPathCacheEntry.java

  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. import org.apache.commons.lang3.builder.ToStringBuilder;

  22. import io.wcm.wcm.commons.util.ToStringStyle;

  23. /**
  24.  * Entry for {@link ClientlibPathCache}.
  25.  */
  26. class ClientlibPathCacheEntry {

  27.   private final String path;
  28.   private final boolean isClientLibrary;
  29.   private final boolean isAllowProxy;

  30.   ClientlibPathCacheEntry(String path, boolean isClientLibrary, boolean isAllowProxy) {
  31.     this.path = path;
  32.     this.isClientLibrary = isClientLibrary;
  33.     this.isAllowProxy = isAllowProxy;
  34.   }

  35.   public String getPath() {
  36.     return this.path;
  37.   }

  38.   public boolean isClientLibrary() {
  39.     return this.isClientLibrary;
  40.   }

  41.   public boolean isAllowProxy() {
  42.     return this.isAllowProxy;
  43.   }

  44.   @Override
  45.   public String toString() {
  46.     return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_OMIT_NULL_STYLE);
  47.   }

  48. }