Class PortalHrefToAbsoluteXmlAdapter


  • @StableMinor(version="17.0",
                 sinceVersion="8.0")
    public class PortalHrefToAbsoluteXmlAdapter
    extends javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​java.lang.String>
    JAXB XML adapter that marshals a portal relative href to an absolute href.

    The marshalling will only perform the conversion if the value is a valid relative URI.

    The unmarshalling assumes that, if the value is an absolute portal href, it is based on the request's website base URL.

    If during marshal or unmarshal the conversion cannot be done due to the value being an invalid URI or no website base URL cound be identified for the current request, the original value is kept.

    Sample marshal: "path" to "http://localhost:8080/portal/path"
    Sample unmarshal: "http://localhost:8080/portal/path" to "path"

    Since:
    8.0.0
    Version:
    $Revision$ $Date$
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String marshal​(java.lang.String value)  
      java.lang.String unmarshal​(java.lang.String value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PortalHrefToAbsoluteXmlAdapter

        public PortalHrefToAbsoluteXmlAdapter()
    • Method Detail

      • unmarshal

        public java.lang.String unmarshal​(java.lang.String value)
                                   throws PortalException
        Specified by:
        unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​java.lang.String>
        Throws:
        PortalException
      • marshal

        public java.lang.String marshal​(java.lang.String value)
                                 throws PortalException
        Specified by:
        marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​java.lang.String>
        Throws:
        PortalException