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);
|
}
|
|
}
|