Search in sources :

Example 1 with ActionLogDto

use of org.obiba.mica.web.model.Mica.DataAccessRequestDto.ActionLogDto in project mica2 by obiba.

the class ActionLogDtos method asDto.

ActionLogDto asDto(ActionLog actionLog) {
    ActionLogDto.Builder builder = // 
    ActionLogDto.newBuilder().setAuthor(// 
    actionLog.getAuthor()).setChangedOn(actionLog.getChangedOn().toString()).setAction(actionLog.getAction());
    Subject profile = userProfileService.getProfile(actionLog.getAuthor());
    if (profile != null) {
        builder.setProfile(userProfileDtos.asDto(profile));
    }
    return builder.build();
}
Also used : ActionLogDto(org.obiba.mica.web.model.Mica.DataAccessRequestDto.ActionLogDto) Subject(org.obiba.shiro.realm.ObibaRealm.Subject)

Aggregations

ActionLogDto (org.obiba.mica.web.model.Mica.DataAccessRequestDto.ActionLogDto)1 Subject (org.obiba.shiro.realm.ObibaRealm.Subject)1