📄 userinfoinvokerimpl.java
字号:
package jp.co.ntl.swing.ext.user.user;
import java.util.Vector;
import jp.co.ntl.Net;
import jp.co.ntl.NetworkException;
import jp.co.ntl.ServerException;
import jp.co.ntl.TimeOutException;
import jp.co.ntl.user.UserInfo2;
import jp.co.ntl.swing.ext.InvokerUtil;
class UserInfoInvokerImpl extends UserInfoInvoker {
private InvokerUtil iu;
UserInfoInvokerImpl(Net net) {
this.iu = new InvokerUtil(net);
}
public Vector getUserInfo() throws NetworkException, ServerException, TimeOutException {
return iu.serverAccessRetVector(Net.userServletName, Net.CMD_GetUserInfo);
}
public void setUserInfo(UserInfo2 userInfo) throws NetworkException, ServerException, TimeOutException {
iu.serverAccessRetVoid(Net.userServletName, Net.CMD_ChangeUserInfo, userInfo);
}
public int addUser(UserInfo2 userInfo) throws NetworkException, ServerException, TimeOutException {
return iu.serverAccessRetInt(Net.userServletName, Net.CMD_AddUser, userInfo);
}
public void delUser(Vector vcUserInfo) throws NetworkException, ServerException, TimeOutException {
iu.serverAccessRetVoid(Net.userServletName, Net.CMD_DeleteUser, vcUserInfo);
}
public boolean isRelatedUser(Vector vcUserInfo) throws NetworkException, ServerException, TimeOutException {
return iu.serverAccessRetBoolean(Net.userServletName, Net.CMD_IsRelatedUser, vcUserInfo, InvokerUtil.RET_RELATED);
}
public boolean isRelatedUserOnAccount(Vector vcUserInfo) throws NetworkException, ServerException, TimeOutException {
return iu.serverAccessRetBoolean(Net.userServletName, Net.CMD_IsRelatedUserOnAccount, vcUserInfo, InvokerUtil.RET_RELATED);
}
public void clearNumPrintedCache(Vector vcUserInfo) throws NetworkException, ServerException, TimeOutException {
iu.serverAccessRetVoid(Net.userServletName, Net.CMD_ClearNumPrintedCache, vcUserInfo);
}
public Object[] isRegisteredUser(String userName, String password, boolean bAdminCheck) throws NetworkException, ServerException, TimeOutException {
Object[] param = new Object[3];
param[0] = userName;
param[1] = password;
param[2] = new Boolean(bAdminCheck);
return (Object [])iu.serverAccessRetObject(Net.userServletName, Net.CMD_IsRegisteredUser, param);
}
/*
public void changePassword(PasswordInfo passwordInfo) throws NetworkException, ServerException, TimeOutException, DisagreementException {
ObjectInputStream is;
// USB Key偵彂偒崬傓
try {
is = new ObjectInputStream(net.sendCommand(Net.userServletName, "SavePassword", passwordInfo.getNewPassword()));
} catch (IOException e) {
throw new NetworkException(e.getMessage());
} catch (NoSuchAlgorithmException e) {
throw new NetworkException(e.getMessage());
} catch (KeyManagementException e) {
throw new NetworkException(e.getMessage());
}
try {
boolean b;
try {
b = is.readBoolean();
} catch (IOException e) {
throw new ServerException(e.getMessage());
}
if (b) {
;
} else {
try {
String message = is.readUTF();
if (message.equals(Net.resultServerError)) {
throw new ServerException("error");
} else if (message.equals(Net.resultTimeOut)) {
/// net.showLoginPage();
throw new TimeOutException();
} else {
throw new ServerException(message);
}
} catch (IOException e) {
}
}
} finally {
try {
is.close();
} catch (IOException e) {
}
}
}*/
/*
public UserInfo2 checkRegisteredUser(UserInfo2 userInfo) throws NetworkException, ServerException, TimeOutException, NotRegisterUserException {
return checkRegisteredUserOnServer(userInfo);
}
private UserInfo2 checkRegisteredUserOnServer(UserInfo2 userInfo) throws NetworkException, ServerException, TimeOutException, NotRegisterUserException {
ObjectInputStream is = null;
boolean b = false;
UserInfo2 retUserInfo = null;
try {
gc.enterConnection();
is = new ObjectInputStream(net.sendCommand(Net.userServletName, "IsRegisteredUser", userInfo));
} catch (IOException e) {
throw new NetworkException(e.getMessage());
} catch (NoSuchAlgorithmException e) {
throw new NetworkException(e.getMessage());
} catch (KeyManagementException e) {
throw new NetworkException(e.getMessage());
} finally {
gc.releaseConnection();
}
try {
gc.enterConnection();
try {
b = is.readBoolean();
if (!b) {
String message = is.readUTF();
if (message.equals(Net.resultServerError)) {
throw new ServerException("error");
} else if (message.equals(Net.resultTimeOut)) {
throw new TimeOutException();
} else if (message.equals("NotRegisteredUser")) {
throw new NotRegisterUserException();
} else {
throw new ServerException(message);
}
} else {
String message = is.readUTF();
if (message.equals("AdminUser")) {
}
retUserInfo = (UserInfo2)is.readObject();
}
} catch (IOException e) {
throw new ServerException(e.getMessage());
} catch (ClassNotFoundException e) {
throw new ServerException(e.getMessage());
}
} finally {
try {
is.close();
} catch (IOException e) {
}
gc.releaseConnection();
}
return retUserInfo;
}*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -