ActionTypes定義 WIP

This commit is contained in:
r-ca 2024-01-14 11:56:44 +09:00
parent 062e8c8bf9
commit 8277258760
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View 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;
}
}