Class URIContent

  • All Implemented Interfaces:
    StaticContent

    @API(type=NOT_EXTENDABLE,
         src=PRIVATE)
    public class URIContent
    extends java.lang.Object
    implements StaticContent
    URI content
    • Field Detail

      • messages

        protected static final ro.sync.i18n.MessageBundle messages
        The messages resource bundle.
    • 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 be null.
        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.
      • 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 class java.lang.Object
        See Also:
        Object.hashCode()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.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.