mirror of
				https://github.com/lacerta-doc/Lacerta.git
				synced 2025-10-30 23:10:48 +00:00 
			
		
		
		
	ActionTypes定義 WIP
This commit is contained in:
		
							parent
							
								
									062e8c8bf9
								
							
						
					
					
						commit
						8277258760
					
				
							
								
								
									
										40
									
								
								vcs/src/main/java/one/nem/lacerta/vcs/ActionTypes.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								vcs/src/main/java/one/nem/lacerta/vcs/ActionTypes.java
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,40 @@ | |||||||
|  | package one.nem.lacerta.vcs; | ||||||
|  | 
 | ||||||
|  | public enum ActionTypes { | ||||||
|  | 
 | ||||||
|  |     INSERT_PAGE("insert_page"), | ||||||
|  |     UPDATE_PAGE("update_page"), | ||||||
|  |     DELETE_PAGE("delete_page"), | ||||||
|  |     UPDATE_PAGE_ORDER("update_page_order"), | ||||||
|  |     INSERT_PAGE_CONTENT("insert_page_content"), | ||||||
|  |     UPDATE_PAGE_CONTENT("update_page_content"), | ||||||
|  |     DELETE_PAGE_CONTENT("delete_page_content"), | ||||||
|  | 
 | ||||||
|  |     CREATE_BRANCH("create_branch"), | ||||||
|  |     DROP_BRANCH("drop_branch"), | ||||||
|  |     REBASE_BRANCH("rebase_branch"), | ||||||
|  | 
 | ||||||
|  |     CREATE_DOCUMENT("create_document"), | ||||||
|  |     DROP_DOCUMENT("drop_document"), | ||||||
|  |     UPDATE_DOCUMENT_META("update_document_meta"), | ||||||
|  |     OTHER("other"); | ||||||
|  | 
 | ||||||
|  |     private final String value; | ||||||
|  | 
 | ||||||
|  |     ActionTypes(String value) { | ||||||
|  |         this.value = value; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public String getValue() { | ||||||
|  |         return value; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public static ActionTypes fromValue(String value) { | ||||||
|  |         for (ActionTypes actionType : ActionTypes.values()) { | ||||||
|  |             if (actionType.getValue().equals(value)) { | ||||||
|  |                 return actionType; | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |         return ActionTypes.OTHER; | ||||||
|  |     } | ||||||
|  | } | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user