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 booleanequals(Object obj)static CssRequestforInline(String content, URI sourceUrl)static CssRequestforUri(String uri, URI baseUrl)URIgetSourceUrl()ECssRequestTypegetType()StringgetValue()inthashCode()URIresolveAbsoluteSourceUrl()voidsetSourceUrl(URI sourceUri)voidsetType(ECssRequestType type)voidsetValue(String value)StringtoString()
-
-
-
Method Detail
-
getSourceUrl
public URI getSourceUrl()
WhentypeisINLINE, the absolute location of the stylesheet. WhentypeisURI, the base URL against which theURIis 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.
-
-