package com.vci.web.properties; import com.vci.starter.web.annotation.config.VciConfigField; import com.vci.starter.web.annotation.config.VciConfigModule; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Configuration; /** * web相关的配置 * @author weidy */ @Configuration @ConfigurationProperties(prefix = "vciweb") @VciConfigModule(name = "platform1",title = "平台全局选项") public class WebProperties { /** * 是否控制功能权限 */ @VciConfigField(value = "function.right.swith",title = "是否控制功能权限") private boolean functionRight = true; /** * 是否控制UI权限 */ @VciConfigField(value = "ui.right.swith",title = "是否UI权限") private boolean UIRight = false; /** * 是否控制数据权限 */ @VciConfigField(value = "right.switch",title = "是否数据权限") private boolean dataRight = false; //是否控制数据权限 /** * 是否控制密级 */ @VciConfigField(value = "userSecuritySwith",title = "是否控制密级") private boolean secretRight = false; /** * 是否控制IP密级 */ @VciConfigField(value = "ipSecuritySwitch",title = "是否控制IP密级") private boolean ipSecretRight = false; /** * 发起流程时是否校验用户密级 */ private boolean checkSecretOnProcessStart = false; /** * 是否开启客户端检查 */ @VciConfigField(value = "sessionTimeOutCheck",title = "是否开启会话检查") private boolean checkClientSessionTimeout; /** * 客户端最大存在时间,单位为分钟 */ @VciConfigField(value = "sessionAliveMax",title = "会话最大时间") private int clientSessionAliveMax; /** * 超时提醒时间,单位为分钟 */ @VciConfigField(value = "sessionAlertRemind",title = "会话超时提醒") private int clientSessionRemind; /** * 客户端判断超时轮询时间,单位为秒 */ @VciConfigField(value = "sessionTimeOutInterval",title = "客户端轮询时间") private int clientSessionInterval = 15; /** * 初始化的时候缓存UI */ @VciConfigField(value = "cacheUIOnInit",title = "初始化的时候缓存UI") private boolean cacheUIOnInit = true; /** * 是否自动扫描功能权限的注解 */ private boolean scanFunctionAnnotation; /** * 浏览服务的路径 */ private String previewServiceUrl; /** * 浏览服务的私钥 */ private String previewPrivateKey; /** * 浏览服务的系统key */ private String previewSystemKey; /** * 是否debug */ private boolean debug; /** * 文件分片的大小,单位是KB */ private int blockLength = 32; public boolean isFunctionRight() { return functionRight; } public void setFunctionRight(boolean functionRight) { this.functionRight = functionRight; } public boolean isUIRight() { return UIRight; } public void setUIRight(boolean UIRight) { this.UIRight = UIRight; } public boolean isDataRight() { return dataRight; } public void setDataRight(boolean dataRight) { this.dataRight = dataRight; } public boolean isSecretRight() { return secretRight; } public void setSecretRight(boolean secretRight) { this.secretRight = secretRight; } public boolean isIpSecretRight() { return ipSecretRight; } public void setIpSecretRight(boolean ipSecretRight) { this.ipSecretRight = ipSecretRight; } public boolean isCheckSecretOnProcessStart() { return checkSecretOnProcessStart; } public void setCheckSecretOnProcessStart(boolean checkSecretOnProcessStart) { this.checkSecretOnProcessStart = checkSecretOnProcessStart; } public boolean isCheckClientSessionTimeout() { return checkClientSessionTimeout; } public void setCheckClientSessionTimeout(boolean checkClientSessionTimeout) { this.checkClientSessionTimeout = checkClientSessionTimeout; } public int getClientSessionAliveMax() { return clientSessionAliveMax; } public void setClientSessionAliveMax(int clientSessionAliveMax) { this.clientSessionAliveMax = clientSessionAliveMax; } public int getClientSessionRemind() { return clientSessionRemind; } public void setClientSessionRemind(int clientSessionRemind) { this.clientSessionRemind = clientSessionRemind; } public int getClientSessionInterval() { return clientSessionInterval; } public void setClientSessionInterval(int clientSessionInterval) { this.clientSessionInterval = clientSessionInterval; } public boolean isScanFunctionAnnotation() { return scanFunctionAnnotation; } public void setScanFunctionAnnotation(boolean scanFunctionAnnotation) { this.scanFunctionAnnotation = scanFunctionAnnotation; } public String getPreviewServiceUrl() { return previewServiceUrl; } public void setPreviewServiceUrl(String previewServiceUrl) { this.previewServiceUrl = previewServiceUrl; } public String getPreviewPrivateKey() { return previewPrivateKey; } public void setPreviewPrivateKey(String previewPrivateKey) { this.previewPrivateKey = previewPrivateKey; } public String getPreviewSystemKey() { return previewSystemKey; } public void setPreviewSystemKey(String previewSystemKey) { this.previewSystemKey = previewSystemKey; } public boolean isDebug() { return debug; } public void setDebug(boolean debug) { this.debug = debug; } public int getBlockLength() { return blockLength; } public void setBlockLength(int blockLength) { this.blockLength = blockLength; } public boolean isCacheUIOnInit() { return cacheUIOnInit; } public void setCacheUIOnInit(boolean cacheUIOnInit) { this.cacheUIOnInit = cacheUIOnInit; } @Override public String toString() { return "WebProperties{" + "functionRight=" + functionRight + ", UIRight=" + UIRight + ", dataRight=" + dataRight + ", secretRight=" + secretRight + ", ipSecretRight=" + ipSecretRight + ", checkSecretOnProcessStart=" + checkSecretOnProcessStart + ", checkClientSessionTimeout=" + checkClientSessionTimeout + ", clientSessionAliveMax=" + clientSessionAliveMax + ", clientSessionRemind=" + clientSessionRemind + ", clientSessionInterval=" + clientSessionInterval + ", cacheUIOnInit=" + cacheUIOnInit + ", scanFunctionAnnotation=" + scanFunctionAnnotation + ", previewServiceUrl='" + previewServiceUrl + '\'' + ", previewPrivateKey='" + previewPrivateKey + '\'' + ", previewSystemKey='" + previewSystemKey + '\'' + ", debug=" + debug + ", blockLength=" + blockLength + '}'; } }