Package ro.sync.ecss.css
Class URIContent
java.lang.Object
ro.sync.ecss.css.URIContent
- All Implemented Interfaces:
StaticContent
@API(type=NOT_EXTENDABLE,
src=PRIVATE)
public class URIContent
extends Object
implements StaticContent
URI content
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final ro.sync.i18n.MessageBundle
The messages resource bundle.Fields inherited from interface ro.sync.ecss.css.StaticContent
CONTENT_CONTENT, COUNTER_CONTENT, COUNTERS_CONTENT, EDITOR_CONTENT, LABEL_CONTENT, LEADER_CONTENT, STRING_FUNCTION_CONTENT, TARGET_COUNTER_CONTENT, TARGET_COUNTERS_CONTENT, TEXT_CONTENT, URI_CONTENT
-
Constructor Summary
ConstructorsConstructorDescriptionURIContent
(String base, String href) Deprecated.Left only for backward compatibility.URIContent
(String base, String href, String cssSystemID) Constructor -
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkIfSafe
(String cssSystemID) Connecting the an URI can be dangerous.boolean
getBase()
Returns the image URL after resolving it with the catalog.static URL
getCatalogExpandedURL
(String href, String base) Returns the image URL after resolving it with the catalog.getHref()
int
getType()
Gets the content type.int
hashCode()
-
Field Details
-
messages
protected static final ro.sync.i18n.MessageBundle messagesThe messages resource bundle.
-
-
Constructor Details
-
URIContent
@Deprecated public URIContent(String base, String href) throws ro.sync.ecss.css.UnsecureContextException Deprecated.Left only for backward compatibility.Constructor.- Parameters:
base
- Base system ID.href
- Href.- Throws:
ro.sync.ecss.css.UnsecureContextException
- Connecting the an URI can be dangerous. If the context is not safe we will reject the URI so a connection will not be opened.
-
URIContent
public URIContent(String base, String href, String cssSystemID) throws ro.sync.ecss.css.UnsecureContextException Constructor- Parameters:
base
- Base system ID.href
- Href.cssSystemID
- The location where this content was encountered. Can benull
.- Throws:
ro.sync.ecss.css.UnsecureContextException
- Connecting the an URI can be dangerous. If the context is not safe we will reject the URI so a connection will not be opened.
-
-
Method Details
-
checkIfSafe
Connecting the an URI can be dangerous. If the context is not safe we will reject the URI so a connection will not be opened.p:before { content: url('http://devel-new.sync.ro/?&file;') }
- Parameters:
cssSystemID
- Location in which this URI content was detected.- Throws:
ro.sync.ecss.css.UnsecureContextException
- If the context is not safe we will reject the URI so a connection will not be opened.
-
getType
public int getType()Description copied from interface:StaticContent
Gets the content type.- Specified by:
getType
in interfaceStaticContent
- Returns:
- The content type.
- See Also:
-
getHref
- Returns:
- The href.
-
getBase
- Returns:
- The Base URL
-
hashCode
public int hashCode() -
equals
-
getCatalogExpandedURL
Returns the image URL after resolving it with the catalog. This methods should be used as a fallback for the extension bundle resolving.- Returns:
- The expanded URL.
- Throws:
MalformedURLException
- if cannot build URL.
-
getCatalogExpandedURL
Returns the image URL after resolving it with the catalog. This methods should be used as a fallback for the extension bundle resolving.- Parameters:
href
- The href.base
- The base.- Returns:
- The expanded URL.
- Throws:
MalformedURLException
- if cannot build URL.
-