1 | |
package org.kuali.student.lum.lu.ui.course.server.gwt; |
2 | |
|
3 | |
import java.util.Iterator; |
4 | |
import java.util.List; |
5 | |
|
6 | |
import org.kuali.student.core.statement.dto.ReqComponentInfo; |
7 | |
import org.kuali.student.core.statement.dto.StatementTreeViewInfo; |
8 | |
|
9 | |
public class CourseStateUtil { |
10 | |
|
11 | 0 | private CourseStateUtil() { |
12 | 0 | } |
13 | |
|
14 | |
|
15 | |
public static void updateStatementTreeViewInfoState(String courseState, StatementTreeViewInfo statementTreeViewInfo) throws Exception { |
16 | 0 | statementTreeViewInfo.setState(courseState); |
17 | 0 | List<ReqComponentInfo> reqComponents = statementTreeViewInfo.getReqComponents(); |
18 | 0 | for(Iterator<ReqComponentInfo> it = reqComponents.iterator(); it.hasNext();) |
19 | 0 | it.next().setState(courseState); |
20 | 0 | for(Iterator<StatementTreeViewInfo> itr = statementTreeViewInfo.getStatements().iterator(); itr.hasNext();) |
21 | 0 | updateStatementTreeViewInfoState(courseState, (StatementTreeViewInfo)itr.next()); |
22 | 0 | } |
23 | |
} |