田源
2025-01-16 cfd8d4c470cc6db6f6689ebf01eae07e47a46990
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package com.vci.client.mw;
 
import org.apache.commons.lang3.StringUtils;
 
import com.alibaba.fastjson.JSONObject;
import com.vci.common.util.IceProxyUtility;
import com.vci.corba.common.data.VCIInvocationInfo;
import com.vci.mw.ClientContextVariable;
import com.vci.mw.InvocationUtility;
import com.vci.mw.LaunchModeEnum;
 
/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2009</p>
 * <p>Company: VCI</p>
 * @author eddie
 * @time 2009-4-14
 * @version 1.0
 */
public class ClientProxyUtility extends IceProxyUtility  {
 
    public ClientProxyUtility() {
    }
    
 
    @Override
    protected String getInvocationInfo()    {
        VCIInvocationInfo vcii = null;
        if (ClientContextVariable.getClientLanuchMode().equals(LaunchModeEnum.Normal)) {
            vcii = ClientContextVariable.getInvocationInfo();
        } else {
            vcii = InvocationUtility.getInvocation();
        }
 
        if (vcii == null || StringUtils.isBlank(vcii.userID)) {
            return null;
        } else {
            if (vcii.extAttribs == null)
                vcii.extAttribs = new String[0];
            if (vcii.groupIDs == null)
                vcii.groupIDs = new String[0];
            if (vcii.groupNames == null)
                vcii.groupNames = new String[0];
            if (vcii.roleIDs == null)
                vcii.roleIDs = new String[0];
            if (vcii.roleNames == null)
                vcii.roleNames = new String[0];
        }
        
        return JSONObject.toJSONString(vcii);
    }
 
}