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
package com.vci.server.base.utility;
 
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.server.mw.ServerContextVariable;
 
/**
 * <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 final class ServerProxyUtility extends IceProxyUtility {
 
    public ServerProxyUtility() {
    }
    
 
    @Override
    protected String getInvocationInfo()    {
        VCIInvocationInfo vcii = null;
        vcii = ServerContextVariable.getInvocationInfo();
 
        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);
    }
 
}