use of org.entando.entando.aps.system.services.userprofile.api.model.JAXBUserProfile in project entando-core by entando.
the class ApiUserProfileInterface method getUserProfile.
public JAXBUserProfile getUserProfile(Properties properties) throws ApiException, Throwable {
JAXBUserProfile jaxbUserProfile = null;
try {
String username = properties.getProperty("username");
IUserProfile userProfile = this.getUserProfileManager().getProfile(username);
if (null == userProfile) {
throw new ApiException(IApiErrorCodes.API_PARAMETER_VALIDATION_ERROR, "Profile of user '" + username + "' does not exist", Response.Status.CONFLICT);
}
jaxbUserProfile = new JAXBUserProfile(userProfile, null);
} catch (ApiException ae) {
throw ae;
} catch (Throwable t) {
_logger.error("Error extracting user profile", t);
// ApsSystemUtils.logThrowable(t, this, "getUserProfile");
throw new ApsSystemException("Error extracting user profile", t);
}
return jaxbUserProfile;
}
Aggregations