1 |
|
package org.kuali.student.lum.lu.ui.course.client.views; |
2 |
|
|
3 |
|
import org.kuali.student.common.assembly.data.Metadata; |
4 |
|
import org.kuali.student.common.ui.client.application.KSAsyncCallback; |
5 |
|
import org.kuali.student.common.ui.client.mvc.Controller; |
6 |
|
import org.kuali.student.common.ui.client.mvc.ViewComposite; |
7 |
|
import org.kuali.student.common.ui.client.service.MetadataRpcService; |
8 |
|
import org.kuali.student.common.ui.client.service.MetadataRpcServiceAsync; |
9 |
|
import org.kuali.student.common.ui.client.widgets.field.layout.element.SpanPanel; |
10 |
|
import org.kuali.student.lum.lu.ui.course.client.service.CreditCourseProposalRpcService; |
11 |
|
import org.kuali.student.lum.lu.ui.course.client.service.CreditCourseProposalRpcServiceAsync; |
12 |
|
import org.kuali.student.lum.lu.ui.main.client.configuration.CurriculumHomeConfigurer; |
13 |
|
|
14 |
|
import com.google.gwt.core.client.GWT; |
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
@author |
21 |
|
@see |
22 |
|
|
|
|
| 0% |
Uncovered Elements: 11 (11) |
Complexity: 4 |
Complexity Density: 0.57 |
|
23 |
|
public class CurriculumHomeView extends ViewComposite{ |
24 |
|
|
25 |
|
private final SpanPanel container = new SpanPanel(); |
26 |
|
MetadataRpcServiceAsync metadataServiceAsync = GWT.create(MetadataRpcService.class); |
27 |
|
CreditCourseProposalRpcServiceAsync cluProposalRpcServiceAsync = GWT.create(CreditCourseProposalRpcService.class); |
28 |
|
CurriculumHomeConfigurer configurer = GWT.create(CurriculumHomeConfigurer.class); |
29 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
30 |
0
|
public CurriculumHomeView(Controller controller, Enum<?> viewType) {... |
31 |
0
|
super(controller, "", viewType); |
32 |
0
|
this.initWidget(container); |
33 |
0
|
setup(); |
34 |
|
} |
35 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
36 |
0
|
protected void setup(){... |
37 |
0
|
metadataServiceAsync.getMetadata("search", null, null, new KSAsyncCallback<Metadata>() { |
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
38 |
0
|
@Override... |
39 |
|
public void handleFailure(Throwable caught) { |
40 |
0
|
container.add(configurer.configure(null)); |
41 |
|
|
42 |
0
|
throw new RuntimeException("Could not retreive metadata: " + caught.getMessage(), caught); |
43 |
|
} |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
44 |
0
|
@Override... |
45 |
|
public void onSuccess(Metadata metadata) { |
46 |
|
|
47 |
|
|
48 |
|
|
49 |
0
|
container.add(configurer.configure(metadata)); |
50 |
|
} |
51 |
|
}); |
52 |
|
} |
53 |
|
|
54 |
|
|
55 |
|
} |