* @throws ExcepcaoPersistencia
*/
public InfoSiteShifts getInfoSiteShifts(InfoSiteShifts component, String groupPropertiesCode, String studentGroupCode)
throws FenixServiceException {
List<InfoShift> infoShifts = new ArrayList<InfoShift>();
ExecutionCourse executionCourse = null;
Grouping groupProperties = FenixFramework.getDomainObject(groupPropertiesCode);
if (groupProperties == null) {
return null;
}
if (studentGroupCode != null) {
StudentGroup studentGroup = FenixFramework.getDomainObject(studentGroupCode);
if (studentGroup == null) {
component.setShifts(null);
return component;
}
component.setOldShift(InfoShift.newInfoFromDomain(studentGroup.getShift()));
}
IGroupEnrolmentStrategyFactory enrolmentGroupPolicyStrategyFactory = GroupEnrolmentStrategyFactory.getInstance();
IGroupEnrolmentStrategy strategy = enrolmentGroupPolicyStrategyFactory.getGroupEnrolmentStrategyInstance(groupProperties);
if (strategy.checkHasShift(groupProperties)) {
List executionCourses = new ArrayList();
executionCourses = groupProperties.getExecutionCourses();
Iterator iterExecutionCourses = executionCourses.iterator();
List<Shift> shifts = new ArrayList<Shift>();
while (iterExecutionCourses.hasNext()) {
ExecutionCourse executionCourse2 = (ExecutionCourse) iterExecutionCourses.next();
Set<Shift> someShifts = executionCourse2.getAssociatedShifts();
shifts.addAll(someShifts);
}
if (shifts == null || shifts.isEmpty()) {