use of org.entando.entando.aps.system.services.userprofile.api.model.JAXBUserProfileType in project entando-core by entando.
the class ApiUserProfileTypeInterface method getUserProfileType.
public JAXBUserProfileType getUserProfileType(Properties properties) throws ApiException, Throwable {
JAXBUserProfileType jaxbProfileType = null;
try {
String typeCode = properties.getProperty("typeCode");
IApsEntity masterProfileType = this.getUserProfileManager().getEntityPrototype(typeCode);
if (null == masterProfileType) {
throw new ApiException(IApiErrorCodes.API_VALIDATION_ERROR, "User Profile type with code '" + typeCode + "' does not exist");
}
jaxbProfileType = new JAXBUserProfileType(masterProfileType);
} catch (ApiException ae) {
throw ae;
} catch (Throwable t) {
_logger.error("Error extracting user profile type", t);
// ApsSystemUtils.logThrowable(t, this, "getProfileType");
throw new ApsSystemException("Error extracting user profile type", t);
}
return jaxbProfileType;
}
Aggregations