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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CssRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
static CssRequest
forInline(String content, URI sourceUrl)
static CssRequest
forUri(String uri, URI baseUrl)
URI
getSourceUrl()
ECssRequestType
getType()
String
getValue()
int
hashCode()
URI
resolveAbsoluteSourceUrl()
void
setSourceUrl(URI sourceUri)
void
setType(ECssRequestType type)
void
setValue(String value)
String
toString()
-
-
-
Method Detail
-
getSourceUrl
public URI getSourceUrl()
Whentype
isINLINE
, the absolute location of the stylesheet. Whentype
isURI
, the base URL against which theURI
is resolved.- Returns:
- The URI of the CSS file or the base URL, depending on
getType()
.
-
setSourceUrl
public void setSourceUrl(URI sourceUri)
- Parameters:
sourceUri
- Absolute location of the stylesheet.
-
getType
public ECssRequestType getType()
- Returns:
- The type of the CSS request, either a URI or literal CSS content.
-
setType
public void setType(ECssRequestType type)
- Parameters:
type
- 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()
.
-
setValue
public void setValue(String value)
- Parameters:
value
- The CSS data, either a URI or literal CSS content, depending ongetType()
.
-
resolveAbsoluteSourceUrl
public URI resolveAbsoluteSourceUrl()
-
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.
-
-