renqianlong пре 2 година
родитељ
комит
c521e15890

+ 323 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/secure/AuthInfo.java

@@ -0,0 +1,323 @@
+package org.zhongzheng.common.secure;
+
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by FernFlower decompiler)
+//
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel(
+        description = "认证信息"
+)
+public class AuthInfo {
+    @ApiModelProperty("令牌")
+    private String accessToken;
+    @ApiModelProperty("令牌类型")
+    private String tokenType;
+    @ApiModelProperty("刷新令牌")
+    private String refreshToken;
+    @ApiModelProperty("用户ID")
+    @JsonSerialize(
+            using = ToStringSerializer.class
+    )
+    private Long userId;
+    @ApiModelProperty("租户ID")
+    private String tenantId;
+    @ApiModelProperty("第三方系统ID")
+    private String oauthId;
+    @ApiModelProperty("头像")
+    private String avatar = "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png";
+    @ApiModelProperty("角色名")
+    private String authority;
+    @ApiModelProperty("用户名")
+    private String userName;
+    @ApiModelProperty("账号名")
+    private String account;
+    @ApiModelProperty("过期时间")
+    private long expiresIn;
+    @ApiModelProperty("许可证")
+    private String license = "powered by zhongzheng";
+
+    public AuthInfo() {
+    }
+
+    public String getAccessToken() {
+        return this.accessToken;
+    }
+
+    public String getTokenType() {
+        return this.tokenType;
+    }
+
+    public String getRefreshToken() {
+        return this.refreshToken;
+    }
+
+    public Long getUserId() {
+        return this.userId;
+    }
+
+    public String getTenantId() {
+        return this.tenantId;
+    }
+
+    public String getOauthId() {
+        return this.oauthId;
+    }
+
+    public String getAvatar() {
+        return this.avatar;
+    }
+
+    public String getAuthority() {
+        return this.authority;
+    }
+
+    public String getUserName() {
+        return this.userName;
+    }
+
+    public String getAccount() {
+        return this.account;
+    }
+
+    public long getExpiresIn() {
+        return this.expiresIn;
+    }
+
+    public String getLicense() {
+        return this.license;
+    }
+
+    public void setAccessToken(final String accessToken) {
+        this.accessToken = accessToken;
+    }
+
+    public void setTokenType(final String tokenType) {
+        this.tokenType = tokenType;
+    }
+
+    public void setRefreshToken(final String refreshToken) {
+        this.refreshToken = refreshToken;
+    }
+
+    public void setUserId(final Long userId) {
+        this.userId = userId;
+    }
+
+    public void setTenantId(final String tenantId) {
+        this.tenantId = tenantId;
+    }
+
+    public void setOauthId(final String oauthId) {
+        this.oauthId = oauthId;
+    }
+
+    public void setAvatar(final String avatar) {
+        this.avatar = avatar;
+    }
+
+    public void setAuthority(final String authority) {
+        this.authority = authority;
+    }
+
+    public void setUserName(final String userName) {
+        this.userName = userName;
+    }
+
+    public void setAccount(final String account) {
+        this.account = account;
+    }
+
+    public void setExpiresIn(final long expiresIn) {
+        this.expiresIn = expiresIn;
+    }
+
+    public void setLicense(final String license) {
+        this.license = license;
+    }
+
+    public boolean equals(final Object o) {
+        if (o == this) {
+            return true;
+        } else if (!(o instanceof AuthInfo)) {
+            return false;
+        } else {
+            AuthInfo other = (AuthInfo)o;
+            if (!other.canEqual(this)) {
+                return false;
+            } else if (this.getExpiresIn() != other.getExpiresIn()) {
+                return false;
+            } else {
+                label145: {
+                    Object this$userId = this.getUserId();
+                    Object other$userId = other.getUserId();
+                    if (this$userId == null) {
+                        if (other$userId == null) {
+                            break label145;
+                        }
+                    } else if (this$userId.equals(other$userId)) {
+                        break label145;
+                    }
+
+                    return false;
+                }
+
+                Object this$accessToken = this.getAccessToken();
+                Object other$accessToken = other.getAccessToken();
+                if (this$accessToken == null) {
+                    if (other$accessToken != null) {
+                        return false;
+                    }
+                } else if (!this$accessToken.equals(other$accessToken)) {
+                    return false;
+                }
+
+                Object this$tokenType = this.getTokenType();
+                Object other$tokenType = other.getTokenType();
+                if (this$tokenType == null) {
+                    if (other$tokenType != null) {
+                        return false;
+                    }
+                } else if (!this$tokenType.equals(other$tokenType)) {
+                    return false;
+                }
+
+                label124: {
+                    Object this$refreshToken = this.getRefreshToken();
+                    Object other$refreshToken = other.getRefreshToken();
+                    if (this$refreshToken == null) {
+                        if (other$refreshToken == null) {
+                            break label124;
+                        }
+                    } else if (this$refreshToken.equals(other$refreshToken)) {
+                        break label124;
+                    }
+
+                    return false;
+                }
+
+                Object this$tenantId = this.getTenantId();
+                Object other$tenantId = other.getTenantId();
+                if (this$tenantId == null) {
+                    if (other$tenantId != null) {
+                        return false;
+                    }
+                } else if (!this$tenantId.equals(other$tenantId)) {
+                    return false;
+                }
+
+                Object this$oauthId = this.getOauthId();
+                Object other$oauthId = other.getOauthId();
+                if (this$oauthId == null) {
+                    if (other$oauthId != null) {
+                        return false;
+                    }
+                } else if (!this$oauthId.equals(other$oauthId)) {
+                    return false;
+                }
+
+                label103: {
+                    Object this$avatar = this.getAvatar();
+                    Object other$avatar = other.getAvatar();
+                    if (this$avatar == null) {
+                        if (other$avatar == null) {
+                            break label103;
+                        }
+                    } else if (this$avatar.equals(other$avatar)) {
+                        break label103;
+                    }
+
+                    return false;
+                }
+
+                Object this$authority = this.getAuthority();
+                Object other$authority = other.getAuthority();
+                if (this$authority == null) {
+                    if (other$authority != null) {
+                        return false;
+                    }
+                } else if (!this$authority.equals(other$authority)) {
+                    return false;
+                }
+
+                label89: {
+                    Object this$userName = this.getUserName();
+                    Object other$userName = other.getUserName();
+                    if (this$userName == null) {
+                        if (other$userName == null) {
+                            break label89;
+                        }
+                    } else if (this$userName.equals(other$userName)) {
+                        break label89;
+                    }
+
+                    return false;
+                }
+
+                Object this$account = this.getAccount();
+                Object other$account = other.getAccount();
+                if (this$account == null) {
+                    if (other$account != null) {
+                        return false;
+                    }
+                } else if (!this$account.equals(other$account)) {
+                    return false;
+                }
+
+                Object this$license = this.getLicense();
+                Object other$license = other.getLicense();
+                if (this$license == null) {
+                    if (other$license == null) {
+                        return true;
+                    }
+                } else if (this$license.equals(other$license)) {
+                    return true;
+                }
+
+                return false;
+            }
+        }
+    }
+
+    protected boolean canEqual(final Object other) {
+        return other instanceof AuthInfo;
+    }
+
+    public int hashCode() {
+        int result = 1;
+        long $expiresIn = this.getExpiresIn();
+        result = result * 59 + (int)($expiresIn >>> 32 ^ $expiresIn);
+        Object $userId = this.getUserId();
+        result = result * 59 + ($userId == null ? 43 : $userId.hashCode());
+        Object $accessToken = this.getAccessToken();
+        result = result * 59 + ($accessToken == null ? 43 : $accessToken.hashCode());
+        Object $tokenType = this.getTokenType();
+        result = result * 59 + ($tokenType == null ? 43 : $tokenType.hashCode());
+        Object $refreshToken = this.getRefreshToken();
+        result = result * 59 + ($refreshToken == null ? 43 : $refreshToken.hashCode());
+        Object $tenantId = this.getTenantId();
+        result = result * 59 + ($tenantId == null ? 43 : $tenantId.hashCode());
+        Object $oauthId = this.getOauthId();
+        result = result * 59 + ($oauthId == null ? 43 : $oauthId.hashCode());
+        Object $avatar = this.getAvatar();
+        result = result * 59 + ($avatar == null ? 43 : $avatar.hashCode());
+        Object $authority = this.getAuthority();
+        result = result * 59 + ($authority == null ? 43 : $authority.hashCode());
+        Object $userName = this.getUserName();
+        result = result * 59 + ($userName == null ? 43 : $userName.hashCode());
+        Object $account = this.getAccount();
+        result = result * 59 + ($account == null ? 43 : $account.hashCode());
+        Object $license = this.getLicense();
+        result = result * 59 + ($license == null ? 43 : $license.hashCode());
+        return result;
+    }
+
+    public String toString() {
+        return "AuthInfo(accessToken=" + this.getAccessToken() + ", tokenType=" + this.getTokenType() + ", refreshToken=" + this.getRefreshToken() + ", userId=" + this.getUserId() + ", tenantId=" + this.getTenantId() + ", oauthId=" + this.getOauthId() + ", avatar=" + this.getAvatar() + ", authority=" + this.getAuthority() + ", userName=" + this.getUserName() + ", account=" + this.getAccount() + ", expiresIn=" + this.getExpiresIn() + ", license=" + this.getLicense() + ")";
+    }
+}

+ 20 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/secure/IClientDetails.java

@@ -0,0 +1,20 @@
+package org.zhongzheng.common.secure;
+
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by FernFlower decompiler)
+//
+
+
+import java.io.Serializable;
+
+public interface IClientDetails extends Serializable {
+    String getClientId();
+
+    String getClientSecret();
+
+    Integer getAccessTokenValidity();
+
+    Integer getRefreshTokenValidity();
+}
+

+ 11 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/secure/IClientDetailsService.java

@@ -0,0 +1,11 @@
+package org.zhongzheng.common.secure;
+
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by FernFlower decompiler)
+//
+
+
+public interface IClientDetailsService {
+    IClientDetails loadClientByClientId(String clientId);
+}

+ 38 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/secure/SecureException.java

@@ -0,0 +1,38 @@
+package org.zhongzheng.common.secure;
+
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by FernFlower decompiler)
+//
+
+
+import org.zhongzheng.common.utils.IResultCode;
+import org.zhongzheng.common.utils.impl.ResultCode;
+
+public class SecureException extends RuntimeException {
+    private static final long serialVersionUID = 2359767895161832954L;
+    private final IResultCode resultCode;
+
+    public SecureException(String message) {
+        super(message);
+        this.resultCode = ResultCode.UN_AUTHORIZED;
+    }
+
+    public SecureException(IResultCode resultCode) {
+        super(resultCode.getMessage());
+        this.resultCode = resultCode;
+    }
+
+    public SecureException(IResultCode resultCode, Throwable cause) {
+        super(cause);
+        this.resultCode = resultCode;
+    }
+
+    public Throwable fillInStackTrace() {
+        return this;
+    }
+
+    public IResultCode getResultCode() {
+        return this.resultCode;
+    }
+}

+ 73 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/secure/TokenInfo.java

@@ -0,0 +1,73 @@
+package org.zhongzheng.common.secure;
+
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by FernFlower decompiler)
+//
+
+public class TokenInfo {
+    private String token;
+    private int expire;
+
+    public TokenInfo() {
+    }
+
+    public String getToken() {
+        return this.token;
+    }
+
+    public int getExpire() {
+        return this.expire;
+    }
+
+    public void setToken(final String token) {
+        this.token = token;
+    }
+
+    public void setExpire(final int expire) {
+        this.expire = expire;
+    }
+
+    public boolean equals(final Object o) {
+        if (o == this) {
+            return true;
+        } else if (!(o instanceof TokenInfo)) {
+            return false;
+        } else {
+            TokenInfo other = (TokenInfo)o;
+            if (!other.canEqual(this)) {
+                return false;
+            } else if (this.getExpire() != other.getExpire()) {
+                return false;
+            } else {
+                Object this$token = this.getToken();
+                Object other$token = other.getToken();
+                if (this$token == null) {
+                    if (other$token != null) {
+                        return false;
+                    }
+                } else if (!this$token.equals(other$token)) {
+                    return false;
+                }
+
+                return true;
+            }
+        }
+    }
+
+    protected boolean canEqual(final Object other) {
+        return other instanceof TokenInfo;
+    }
+
+    public int hashCode() {
+        int result = 1;
+        result = result * 59 + this.getExpire();
+        Object $token = this.getToken();
+        result = result * 59 + ($token == null ? 43 : $token.hashCode());
+        return result;
+    }
+
+    public String toString() {
+        return "TokenInfo(token=" + this.getToken() + ", expire=" + this.getExpire() + ")";
+    }
+}

+ 94 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/secure/ZhongZhengTokenProperties.java

@@ -0,0 +1,94 @@
+package org.zhongzheng.common.secure;
+
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by FernFlower decompiler)
+//
+
+
+import io.jsonwebtoken.JwtException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@ConfigurationProperties("blade.token")
+public class ZhongZhengTokenProperties {
+    private static final Logger log = LoggerFactory.getLogger(ZhongZhengTokenProperties.class);
+    private String signKey = "";
+    private String aesKey = "";
+
+    public String getSignKey() {
+        if (this.signKey.length() < 32) {
+            throw new JwtException("请配置 zhongzheng.token.sign-key 的值, 长度32位以上");
+        } else {
+            return this.signKey;
+        }
+    }
+
+    public ZhongZhengTokenProperties() {
+    }
+
+    public String getAesKey() {
+        return this.aesKey;
+    }
+
+    public void setSignKey(final String signKey) {
+        this.signKey = signKey;
+    }
+
+    public void setAesKey(final String aesKey) {
+        this.aesKey = aesKey;
+    }
+
+    public boolean equals(final Object o) {
+        if (o == this) {
+            return true;
+        } else if (!(o instanceof ZhongZhengTokenProperties)) {
+            return false;
+        } else {
+            ZhongZhengTokenProperties other = (ZhongZhengTokenProperties)o;
+            if (!other.canEqual(this)) {
+                return false;
+            } else {
+                Object this$signKey = this.getSignKey();
+                Object other$signKey = other.getSignKey();
+                if (this$signKey == null) {
+                    if (other$signKey != null) {
+                        return false;
+                    }
+                } else if (!this$signKey.equals(other$signKey)) {
+                    return false;
+                }
+
+                Object this$aesKey = this.getAesKey();
+                Object other$aesKey = other.getAesKey();
+                if (this$aesKey == null) {
+                    if (other$aesKey != null) {
+                        return false;
+                    }
+                } else if (!this$aesKey.equals(other$aesKey)) {
+                    return false;
+                }
+
+                return true;
+            }
+        }
+    }
+
+    protected boolean canEqual(final Object other) {
+        return other instanceof ZhongZhengTokenProperties;
+    }
+
+    public int hashCode() {
+        int result = 1;
+        Object $signKey = this.getSignKey();
+        result = result * 59 + ($signKey == null ? 43 : $signKey.hashCode());
+        Object $aesKey = this.getAesKey();
+        result = result * 59 + ($aesKey == null ? 43 : $aesKey.hashCode());
+        return result;
+    }
+
+    public String toString() {
+        return "ZhongZhengTokenProperties(signKey=" + this.getSignKey() + ", aesKey=" + this.getAesKey() + ")";
+    }
+}

+ 253 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/secure/ZhongZhengUser.java

@@ -0,0 +1,253 @@
+package org.zhongzheng.common.secure;
+
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by FernFlower decompiler)
+//
+
+
+import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+
+public class ZhongZhengUser implements Serializable {
+    private static final long serialVersionUID = 1L;
+    @ApiModelProperty(
+            hidden = true
+    )
+    private String clientId;
+    @ApiModelProperty(
+            hidden = true
+    )
+    private Long userId;
+    @ApiModelProperty(
+            hidden = true
+    )
+    private String tenantId;
+    @ApiModelProperty(
+            hidden = true
+    )
+    private String deptId;
+    @ApiModelProperty(
+            hidden = true
+    )
+    private String userName;
+    @ApiModelProperty(
+            hidden = true
+    )
+    private String account;
+    @ApiModelProperty(
+            hidden = true
+    )
+    private String roleId;
+    @ApiModelProperty(
+            hidden = true
+    )
+    private String roleName;
+
+    public ZhongZhengUser() {
+    }
+
+    public String getClientId() {
+        return this.clientId;
+    }
+
+    public Long getUserId() {
+        return this.userId;
+    }
+
+    public String getTenantId() {
+        return this.tenantId;
+    }
+
+    public String getDeptId() {
+        return this.deptId;
+    }
+
+    public String getUserName() {
+        return this.userName;
+    }
+
+    public String getAccount() {
+        return this.account;
+    }
+
+    public String getRoleId() {
+        return this.roleId;
+    }
+
+    public String getRoleName() {
+        return this.roleName;
+    }
+
+    public void setClientId(final String clientId) {
+        this.clientId = clientId;
+    }
+
+    public void setUserId(final Long userId) {
+        this.userId = userId;
+    }
+
+    public void setTenantId(final String tenantId) {
+        this.tenantId = tenantId;
+    }
+
+    public void setDeptId(final String deptId) {
+        this.deptId = deptId;
+    }
+
+    public void setUserName(final String userName) {
+        this.userName = userName;
+    }
+
+    public void setAccount(final String account) {
+        this.account = account;
+    }
+
+    public void setRoleId(final String roleId) {
+        this.roleId = roleId;
+    }
+
+    public void setRoleName(final String roleName) {
+        this.roleName = roleName;
+    }
+
+    public boolean equals(final Object o) {
+        if (o == this) {
+            return true;
+        } else if (!(o instanceof ZhongZhengUser)) {
+            return false;
+        } else {
+            ZhongZhengUser other = (ZhongZhengUser)o;
+            if (!other.canEqual(this)) {
+                return false;
+            } else {
+                label107: {
+                    Object this$userId = this.getUserId();
+                    Object other$userId = other.getUserId();
+                    if (this$userId == null) {
+                        if (other$userId == null) {
+                            break label107;
+                        }
+                    } else if (this$userId.equals(other$userId)) {
+                        break label107;
+                    }
+
+                    return false;
+                }
+
+                Object this$clientId = this.getClientId();
+                Object other$clientId = other.getClientId();
+                if (this$clientId == null) {
+                    if (other$clientId != null) {
+                        return false;
+                    }
+                } else if (!this$clientId.equals(other$clientId)) {
+                    return false;
+                }
+
+                Object this$tenantId = this.getTenantId();
+                Object other$tenantId = other.getTenantId();
+                if (this$tenantId == null) {
+                    if (other$tenantId != null) {
+                        return false;
+                    }
+                } else if (!this$tenantId.equals(other$tenantId)) {
+                    return false;
+                }
+
+                label86: {
+                    Object this$deptId = this.getDeptId();
+                    Object other$deptId = other.getDeptId();
+                    if (this$deptId == null) {
+                        if (other$deptId == null) {
+                            break label86;
+                        }
+                    } else if (this$deptId.equals(other$deptId)) {
+                        break label86;
+                    }
+
+                    return false;
+                }
+
+                label79: {
+                    Object this$userName = this.getUserName();
+                    Object other$userName = other.getUserName();
+                    if (this$userName == null) {
+                        if (other$userName == null) {
+                            break label79;
+                        }
+                    } else if (this$userName.equals(other$userName)) {
+                        break label79;
+                    }
+
+                    return false;
+                }
+
+                label72: {
+                    Object this$account = this.getAccount();
+                    Object other$account = other.getAccount();
+                    if (this$account == null) {
+                        if (other$account == null) {
+                            break label72;
+                        }
+                    } else if (this$account.equals(other$account)) {
+                        break label72;
+                    }
+
+                    return false;
+                }
+
+                Object this$roleId = this.getRoleId();
+                Object other$roleId = other.getRoleId();
+                if (this$roleId == null) {
+                    if (other$roleId != null) {
+                        return false;
+                    }
+                } else if (!this$roleId.equals(other$roleId)) {
+                    return false;
+                }
+
+                Object this$roleName = this.getRoleName();
+                Object other$roleName = other.getRoleName();
+                if (this$roleName == null) {
+                    if (other$roleName != null) {
+                        return false;
+                    }
+                } else if (!this$roleName.equals(other$roleName)) {
+                    return false;
+                }
+
+                return true;
+            }
+        }
+    }
+
+    protected boolean canEqual(final Object other) {
+        return other instanceof ZhongZhengUser;
+    }
+
+    public int hashCode() {
+        int result = 1;
+        Object $userId = this.getUserId();
+        result = result * 59 + ($userId == null ? 43 : $userId.hashCode());
+        Object $clientId = this.getClientId();
+        result = result * 59 + ($clientId == null ? 43 : $clientId.hashCode());
+        Object $tenantId = this.getTenantId();
+        result = result * 59 + ($tenantId == null ? 43 : $tenantId.hashCode());
+        Object $deptId = this.getDeptId();
+        result = result * 59 + ($deptId == null ? 43 : $deptId.hashCode());
+        Object $userName = this.getUserName();
+        result = result * 59 + ($userName == null ? 43 : $userName.hashCode());
+        Object $account = this.getAccount();
+        result = result * 59 + ($account == null ? 43 : $account.hashCode());
+        Object $roleId = this.getRoleId();
+        result = result * 59 + ($roleId == null ? 43 : $roleId.hashCode());
+        Object $roleName = this.getRoleName();
+        result = result * 59 + ($roleName == null ? 43 : $roleName.hashCode());
+        return result;
+    }
+
+    public String toString() {
+        return "ZhongZhengUser(clientId=" + this.getClientId() + ", userId=" + this.getUserId() + ", tenantId=" + this.getTenantId() + ", deptId=" + this.getDeptId() + ", userName=" + this.getUserName() + ", account=" + this.getAccount() + ", roleId=" + this.getRoleId() + ", roleName=" + this.getRoleName() + ")";
+    }
+}

+ 40 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/impl/ResultCode.java

@@ -0,0 +1,40 @@
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by FernFlower decompiler)
+//
+
+package org.zhongzheng.common.utils.impl;
+
+import org.zhongzheng.common.utils.IResultCode;
+
+public enum ResultCode implements IResultCode {
+    SUCCESS(200, "操作成功"),
+    FAILURE(400, "业务异常"),
+    UN_AUTHORIZED(401, "请求未授权"),
+    NOT_FOUND(404, "404 没找到请求"),
+    MSG_NOT_READABLE(400, "消息不能读取"),
+    METHOD_NOT_SUPPORTED(405, "不支持当前请求方法"),
+    MEDIA_TYPE_NOT_SUPPORTED(415, "不支持当前媒体类型"),
+    REQ_REJECT(403, "请求被拒绝"),
+    INTERNAL_SERVER_ERROR(500, "服务器异常"),
+    PARAM_MISS(400, "缺少必要的请求参数"),
+    PARAM_TYPE_ERROR(400, "请求参数类型错误"),
+    PARAM_BIND_ERROR(400, "请求参数绑定错误"),
+    PARAM_VALID_ERROR(400, "参数校验失败");
+
+    public final int code;
+    public final String message;
+
+    public int getCode() {
+        return this.code;
+    }
+
+    public String getMessage() {
+        return this.message;
+    }
+
+    private ResultCode(final int code, final String message) {
+        this.code = code;
+        this.message = message;
+    }
+}