View Javadoc

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  	private CourseStateUtil() {	
12  	}
13  	
14  	/* Recursively set state for StatementTreeViewInfo */
15  	public static void updateStatementTreeViewInfoState(String courseState, StatementTreeViewInfo statementTreeViewInfo) throws Exception {
16  		statementTreeViewInfo.setState(courseState);
17          List<ReqComponentInfo> reqComponents = statementTreeViewInfo.getReqComponents();
18          for(Iterator<ReqComponentInfo> it = reqComponents.iterator(); it.hasNext();)
19          	it.next().setState(courseState);
20          for(Iterator<StatementTreeViewInfo> itr = statementTreeViewInfo.getStatements().iterator(); itr.hasNext();)
21          	updateStatementTreeViewInfoState(courseState, (StatementTreeViewInfo)itr.next());
22  	}
23  }