Class UserIdXmlAdapter


  • @StableMinor(version="14.2",
                 sinceVersion="8.0")
    public class UserIdXmlAdapter
    extends XmlAdapter<lumis.portal.user.UserConfigXmlAdapter.AdaptedUserConfig,​String>
    Adapter for converting between an UserConfig's identifier and a standard portal format for user in JAXB.

    Sample output in JSON:

     {
      "id":"8A488AF9475E73CD01475FEAEC140F88",
      "login":"johnsmith",
      "name":"John Stuart Smith",
      "firstName":"John",
      "middleName":"Stuart",
      "lastName":"Smith",
      "profileImageHref":"http://localhost:8080/portal/lumis/api/rest/lum-internal/users/8A488AF9475E73CD01475FEAEC140F88/profileimage"
     }
     

    If the user identifier is not null but no user is found with that identifier, the an output containing only the user identifier is generated. Sample output of this scenario in JSON:

     {
      "id":"8A488AF9475E73CD01475FEAEC140F88"
     }
     

    Sample input formats in JSON:

    • {"id":"8A488AF9475E73CD01475FEAEC140F88"}
    • "8A488AF9475E73CD01475FEAEC140F88"
    Since:
    8.0.0
    Version:
    $Revision: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
    • Constructor Detail

      • UserIdXmlAdapter

        public UserIdXmlAdapter()
    • Method Detail

      • unmarshal

        public String unmarshal​(lumis.portal.user.UserConfigXmlAdapter.AdaptedUserConfig adaptedUser)
                         throws Exception
        Specified by:
        unmarshal in class XmlAdapter<lumis.portal.user.UserConfigXmlAdapter.AdaptedUserConfig,​String>
        Throws:
        Exception
      • marshal

        public lumis.portal.user.UserConfigXmlAdapter.AdaptedUserConfig marshal​(String userId)
                                                                         throws Exception
        Specified by:
        marshal in class XmlAdapter<lumis.portal.user.UserConfigXmlAdapter.AdaptedUserConfig,​String>
        Throws:
        Exception