Package lumis.portal.rest.util
Class PortalHrefToAbsoluteXmlAdapter
- java.lang.Object
-
- javax.xml.bind.annotation.adapters.XmlAdapter<String,String>
-
- lumis.portal.rest.util.PortalHrefToAbsoluteXmlAdapter
-
@StableMinor(version="14.2", sinceVersion="8.0") public class PortalHrefToAbsoluteXmlAdapter extends XmlAdapter<String,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: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
-
-
Constructor Summary
Constructors Constructor Description PortalHrefToAbsoluteXmlAdapter()
-
-
-
Method Detail
-
unmarshal
public String unmarshal(String value) throws PortalException
- Specified by:
unmarshal
in classXmlAdapter<String,String>
- Throws:
PortalException
-
marshal
public String marshal(String value) throws PortalException
- Specified by:
marshal
in classXmlAdapter<String,String>
- Throws:
PortalException
-
-