Class CssRequest

java.lang.Object
de.xima.fc.gui.designer.form.model.params.CssRequest
All Implemented Interfaces:
Serializable

public final class CssRequest extends Object implements Serializable
Client-side model for requesting info about a CSS file. Can be either a URI or some CSS content. Note: This class must be serializable / deserializable via JSON.
Since:
8.0.0
Author:
XIMA MEDIA GmbH
See Also:
  • Constructor Details

    • CssRequest

      public CssRequest()
  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getSourceUrl

      public URI getSourceUrl()
      Returns:
      Absolute location of the stylesheet.
    • getType

      public ECssRequestType getType()
      Returns:
      The type of the CSS request, either a URI or literal CSS content.
    • getValue

      public String getValue()
      Returns:
      The CSS data, either a URI or literal CSS content, depending on getType().
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • setSourceUrl

      public void setSourceUrl(URI sourceUri)
      Parameters:
      sourceUri - Absolute location of the stylesheet.
    • setType

      public void setType(ECssRequestType type)
      Parameters:
      type - The type of the CSS request, either a URI or literal CSS content.
    • setValue

      public void setValue(String value)
      Parameters:
      value - The CSS data, either a URI or literal CSS content, depending on getType().
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • forInline

      public static CssRequest forInline(String content, URI sourceUrl)
      Parameters:
      content - Content of the CSS file.
      sourceUrl - Absolute URL of the stylesheet.
      Returns:
      A new CSS request for the given content.
    • forUri

      public static CssRequest forUri(String uri, URI baseUrl)
      Parameters:
      uri - URI to the CSS file.
      baseUrl - Absolute base URL relative to which to interpret the given URI.
      Returns:
      A new CSS request for the given URI.