@Override public void deleteRole(final SRole role) throws SRoleDeletionException { final String methodName = "deleteRole"; final SRoleLogBuilder logBuilder = getRoleLog(ActionType.DELETED, "Deleting role with name " + role.getName()); try { if (role.getIconId() != null) { deleteIcon(role.getIconId()); } recorder.recordDelete(new DeleteRecord(role), ROLE); log(role.getId(), SQueriableLog.STATUS_OK, logBuilder, methodName); } catch (final SRecorderException | SBonitaReadException re) { log(role.getId(), SQueriableLog.STATUS_FAIL, logBuilder, methodName); throw new SRoleDeletionException(re); } }
@Override public void deleteRole(final SRole role) throws SRoleDeletionException { final String methodName = "deleteRole"; final SRoleLogBuilder logBuilder = getRoleLog(ActionType.DELETED, "Deleting role with name " + role.getName()); try { if (role.getIconId() != null) { deleteIcon(role.getIconId()); } recorder.recordDelete(new DeleteRecord(role), ROLE); log(role.getId(), SQueriableLog.STATUS_OK, logBuilder, methodName); } catch (final SRecorderException | SBonitaReadException re) { log(role.getId(), SQueriableLog.STATUS_FAIL, logBuilder, methodName); throw new SRoleDeletionException(re); } }
public static Role toRole(final SRole sRole) { final RoleImpl role = new RoleImpl(sRole.getId(), sRole.getName()); role.setDisplayName(sRole.getDisplayName()); role.setDescription(sRole.getDescription()); role.setIconId(sRole.getIconId()); role.setCreatedBy(sRole.getCreatedBy()); role.setCreationDate(new Date(sRole.getCreationDate())); role.setLastUpdate(new Date(sRole.getLastUpdate())); return role; }
public static Role toRole(final SRole sRole) { final RoleImpl role = new RoleImpl(sRole.getId(), sRole.getName()); role.setDisplayName(sRole.getDisplayName()); role.setDescription(sRole.getDescription()); role.setIconId(sRole.getIconId()); role.setCreatedBy(sRole.getCreatedBy()); role.setCreationDate(new Date(sRole.getCreationDate())); role.setLastUpdate(new Date(sRole.getLastUpdate())); return role; }