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 java.lang.Object implements StaticContent
URI content
-
-
Field Summary
Fields Modifier and Type Field Description protected static ro.sync.i18n.MessageBundle
messages
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
Constructors Constructor Description URIContent(java.lang.String base, java.lang.String href)
Deprecated.Left only for backward compatibility.URIContent(java.lang.String base, java.lang.String href, java.lang.String cssSystemID)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
checkIfSafe(java.lang.String cssSystemID)
Connecting the an URI can be dangerous.boolean
equals(java.lang.Object obj)
java.lang.String
getBase()
java.net.URL
getCatalogExpandedURL()
Returns the image URL after resolving it with the catalog.static java.net.URL
getCatalogExpandedURL(java.lang.String href, java.lang.String base)
Returns the image URL after resolving it with the catalog.java.lang.String
getHref()
int
getType()
Gets the content type.int
hashCode()
-
-
-
Constructor Detail
-
URIContent
@Deprecated public URIContent(java.lang.String base, java.lang.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(java.lang.String base, java.lang.String href, java.lang.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 Detail
-
checkIfSafe
public static void checkIfSafe(java.lang.String cssSystemID) 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.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:
StaticContent.getType()
-
getHref
public java.lang.String getHref()
- Returns:
- The href.
-
getBase
public java.lang.String getBase()
- Returns:
- The Base URL
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
getCatalogExpandedURL
public java.net.URL getCatalogExpandedURL() throws java.net.MalformedURLException
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:
java.net.MalformedURLException
- if cannot build URL.
-
getCatalogExpandedURL
public static java.net.URL getCatalogExpandedURL(java.lang.String href, java.lang.String base) throws java.net.MalformedURLException
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:
java.net.MalformedURLException
- if cannot build URL.
-
-