1 | |
package org.kuali.student.r2.common.util; |
2 | |
|
3 | |
import org.kuali.rice.krad.UserSession; |
4 | |
import org.kuali.rice.krad.util.GlobalVariables; |
5 | |
import org.kuali.student.r2.common.dto.ContextInfo; |
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | 0 | public class ContextUtils { |
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
public static ContextInfo getContextInfo(){ |
23 | 0 | ContextInfo contextInfo = new ContextInfo(); |
24 | 0 | UserSession userSession = GlobalVariables.getUserSession(); |
25 | 0 | if (userSession != null) { |
26 | 0 | contextInfo.setPrincipalId(userSession.getPrincipalId()); |
27 | |
} |
28 | |
|
29 | 0 | return contextInfo; |
30 | |
} |
31 | |
|
32 | |
} |