All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.phloc.html.hc.utils.IHCSpecialNodes Maven / Gradle / Ivy

There is a newer version: 4.4.9
Show newest version
/**
 * Copyright (C) 2006-2015 phloc systems
 * http://www.phloc.com
 * office[at]phloc[dot]com
 *
 * Licensed 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.
 */
package com.phloc.html.hc.utils;

import java.io.Serializable;
import java.util.List;

import javax.annotation.Nonnull;

import com.phloc.commons.annotations.ReturnsMutableCopy;
import com.phloc.html.js.IJSCodeProvider;

/**
 * This interface represents all special nodes that can occur in an HTML
 * document: CSS files (<link rel="stylesheet" href="..."/>),
 * JS files (<script
 * href="...">) and inline JS code (
 * <script>...</script>).
 *
 * @author Philip Helger
 */
public interface IHCSpecialNodes extends Serializable
{
  /**
   * @return true if CSS files are present, false if
   *         not
   */
  boolean hasExternalCSSs ();

  /**
   * @return All CSS files. Never null.
   */
  @Nonnull
  @ReturnsMutableCopy
  List  getAllExternalCSSs ();

  /**
   * @return true if inline CSS is present, false if
   *         not
   */
  boolean hasInlineCSS ();

  /**
   * @return The inline CSS. May not be null.
   */
  @Nonnull
  @ReturnsMutableCopy
  StringBuilder getInlineCSS ();

  /**
   * @return true if JS files are present, false if
   *         not
   */
  boolean hasExternalJSs ();

  /**
   * @return All JS files. Never null.
   */
  @Nonnull
  @ReturnsMutableCopy
  List  getAllExternalJSs ();

  /**
   * @return true if inline JS is present, false if
   *         not
   */
  boolean hasInlineJS ();

  /**
   * @return The inline JS. May not be null.
   */
  @Nonnull
  @ReturnsMutableCopy
  IJSCodeProvider getInlineJS ();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy