use of com.evolveum.midpoint.repo.sql.data.common.embedded.RFocusActivation in project midpoint by Evolveum.
the class RFocus method copyFocusInformationFromJAXB.
public static void copyFocusInformationFromJAXB(FocusType jaxb, RFocus repo, RepositoryContext repositoryContext, IdGeneratorResult generatorResult) throws DtoTranslationException {
copyAssignmentHolderInformationFromJAXB(jaxb, repo, repositoryContext, generatorResult);
repo.setLocalityFocus(RPolyString.copyFromJAXB(jaxb.getLocality()));
repo.setCostCenter(jaxb.getCostCenter());
repo.setLocale(jaxb.getLocale());
repo.setTimezone(jaxb.getTimezone());
repo.setPreferredLanguage(jaxb.getPreferredLanguage());
repo.setEmailAddress(jaxb.getEmailAddress());
repo.setTelephoneNumber(jaxb.getTelephoneNumber());
repo.getLinkRef().addAll(RUtil.toRObjectReferenceSet(jaxb.getLinkRef(), repo, RReferenceType.USER_ACCOUNT, repositoryContext.relationRegistry));
repo.getPersonaRef().addAll(RUtil.toRObjectReferenceSet(jaxb.getPersonaRef(), repo, RReferenceType.PERSONA, repositoryContext.relationRegistry));
if (jaxb.getActivation() != null) {
RFocusActivation activation = new RFocusActivation();
RFocusActivation.fromJaxb(jaxb.getActivation(), activation);
repo.setActivation(activation);
}
if (jaxb.getJpegPhoto() != null) {
RFocusPhoto photo = new RFocusPhoto();
photo.setOwner(repo);
photo.setPhoto(jaxb.getJpegPhoto());
repo.getJpegPhoto().add(photo);
repo.setHasPhoto(true);
}
if (jaxb.getCredentials() != null && jaxb.getCredentials().getPassword() != null && jaxb.getCredentials().getPassword().getMetadata() != null) {
repo.setPasswordCreateTimestamp(jaxb.getCredentials().getPassword().getMetadata().getCreateTimestamp());
repo.setPasswordModifyTimestamp(jaxb.getCredentials().getPassword().getMetadata().getModifyTimestamp());
}
}
use of com.evolveum.midpoint.repo.sql.data.common.embedded.RFocusActivation in project midpoint by Evolveum.
the class FocusActivationMapper method map.
@Override
public RFocusActivation map(ActivationType input, MapperContext context) {
try {
RFocusActivation activation = new RFocusActivation();
RFocusActivation.fromJaxb(input, activation);
return activation;
} catch (DtoTranslationException ex) {
throw new SystemException("Couldn't translate activation to entity", ex);
}
}
Aggregations