use of org.mifos.security.rolesandpermission.business.RoleActivityRestrictionBO in project head by mifos.
the class RolesPermissionServiceFacadeWebTier method getActivitiesRestrictionsForCreate.
private List<RoleActivityRestrictionBO> getActivitiesRestrictionsForCreate(List<ActivityRestrictionDto> activityRestrictionDtoList, UserContext userContext) throws PersistenceException {
List<RoleActivityRestrictionBO> activitiesRestrictions = new ArrayList<RoleActivityRestrictionBO>();
for (ActivityRestrictionDto activityRestrictionDto : activityRestrictionDtoList) {
RoleActivityRestrictionBO roleActivityRestrictionBO = new RoleActivityRestrictionBO(userContext);
ActivityRestrictionTypeEntity activityRestrictionTypeEntity = legacyRolesPermissionsDao.getActivityRestrictionTypeEntity((short) activityRestrictionDto.getActivityRestrictionTypeId());
roleActivityRestrictionBO.setActivityRestrictionType(activityRestrictionTypeEntity);
roleActivityRestrictionBO.setRestrictionAmountValue(activityRestrictionDto.getAmountValue());
activitiesRestrictions.add(roleActivityRestrictionBO);
}
return activitiesRestrictions;
}
Aggregations