Package lumis.portal.user
Class UserIdXmlAdapter
- java.lang.Object
-
- javax.xml.bind.annotation.adapters.XmlAdapter<lumis.portal.user.UserConfigXmlAdapter.AdaptedUserConfig,java.lang.String>
-
- lumis.portal.user.UserIdXmlAdapter
-
@StableMinor(version="17.0", sinceVersion="8.0") public class UserIdXmlAdapter extends javax.xml.bind.annotation.adapters.XmlAdapter<lumis.portal.user.UserConfigXmlAdapter.AdaptedUserConfig,java.lang.String>
Adapter for converting between anUserConfig
'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$ $Date$
-
-
Constructor Summary
Constructors Constructor Description UserIdXmlAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description lumis.portal.user.UserConfigXmlAdapter.AdaptedUserConfig
marshal(java.lang.String userId)
java.lang.String
unmarshal(lumis.portal.user.UserConfigXmlAdapter.AdaptedUserConfig adaptedUser)
-
-
-
Method Detail
-
unmarshal
public java.lang.String unmarshal(lumis.portal.user.UserConfigXmlAdapter.AdaptedUserConfig adaptedUser) throws java.lang.Exception
- Specified by:
unmarshal
in classjavax.xml.bind.annotation.adapters.XmlAdapter<lumis.portal.user.UserConfigXmlAdapter.AdaptedUserConfig,java.lang.String>
- Throws:
java.lang.Exception
-
marshal
public lumis.portal.user.UserConfigXmlAdapter.AdaptedUserConfig marshal(java.lang.String userId) throws java.lang.Exception
- Specified by:
marshal
in classjavax.xml.bind.annotation.adapters.XmlAdapter<lumis.portal.user.UserConfigXmlAdapter.AdaptedUserConfig,java.lang.String>
- Throws:
java.lang.Exception
-
-