You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							43 lines
						
					
					
						
							1.1 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							43 lines
						
					
					
						
							1.1 KiB
						
					
					
				
								package com.epmet.auth.constants;
							 | 
						|
								
							 | 
						|
								/**
							 | 
						|
								 * 认证操作枚举
							 | 
						|
								 */
							 | 
						|
								public enum AuthOperationEnum {
							 | 
						|
								
							 | 
						|
								    LOGIN(AuthOperationConstants.LOGIN, "登录"),
							 | 
						|
								    LOGOUT(AuthOperationConstants.LOGOUT, "退出");
							 | 
						|
								
							 | 
						|
								    private String operationType;
							 | 
						|
								    private String operationDisplay;
							 | 
						|
								
							 | 
						|
								    AuthOperationEnum(String operationType, String operationDisplay) {
							 | 
						|
								        this.operationType = operationType;
							 | 
						|
								        this.operationDisplay = operationDisplay;
							 | 
						|
								    }
							 | 
						|
								
							 | 
						|
								    public String getOperationType() {
							 | 
						|
								        return operationType;
							 | 
						|
								    }
							 | 
						|
								
							 | 
						|
								    public String getOperationDisplay() {
							 | 
						|
								        return operationDisplay;
							 | 
						|
								    }
							 | 
						|
								
							 | 
						|
								    public static AuthOperationEnum get(String operationType) {
							 | 
						|
								        for (AuthOperationEnum e : AuthOperationEnum.values()) {
							 | 
						|
								            if (e.getOperationType().equals(operationType)) {
							 | 
						|
								                return e;
							 | 
						|
								            }
							 | 
						|
								        }
							 | 
						|
								        return null;
							 | 
						|
								    }
							 | 
						|
								
							 | 
						|
								    public static String getDisplay(String operationType) {
							 | 
						|
								        AuthOperationEnum obj = get(operationType);
							 | 
						|
								        if (obj == null) {
							 | 
						|
								            return null;
							 | 
						|
								        }
							 | 
						|
								        return obj.getOperationDisplay();
							 | 
						|
								    }
							 | 
						|
								}
							 | 
						|
								
							 |