java.lang.Object
org.miaixz.bus.gitlab.models.CommitAction
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetFileContentAsString(File file, Constants.Encoding encoding) Reads the content of a File instance and returns it as a String of either text or base64 encoded text.voidsetAction(CommitAction.Action action) voidsetContent(String content) voidsetEncoding(Constants.Encoding encoding) voidsetExecuteFilemode(Boolean executeFilemode) voidsetFilePath(String filePath) voidsetLastCommitId(String lastCommitId) voidsetPreviousPath(String previousPath) toString()withAction(CommitAction.Action action) withContent(String content) withEncoding(Constants.Encoding encoding) withExecuteFilemode(Boolean executeFilemode) withFileContent(File file, String filePath, Constants.Encoding encoding) withFileContent(String filePath, Constants.Encoding encoding) withFilePath(String filePath) withLastCommitId(String lastCommitId) withPreviousPath(String previousPath)
-
Constructor Details
-
CommitAction
public CommitAction()
-
-
Method Details
-
withFileContent
-
getFileContentAsString
public static String getFileContentAsString(File file, Constants.Encoding encoding) throws IOException Reads the content of a File instance and returns it as a String of either text or base64 encoded text.- Parameters:
file- the File instance to read fromencoding- whether to encode as Base64 or as Text, defaults to Text if null- Returns:
- the content of the File as a String
- Throws:
IOException- if any error occurs
-
getAction
-
setAction
-
withAction
-
getFilePath
-
setFilePath
-
withFilePath
-
getPreviousPath
-
setPreviousPath
-
withPreviousPath
-
getContent
-
setContent
-
withContent
-
getEncoding
-
setEncoding
-
withEncoding
-
getLastCommitId
-
setLastCommitId
-
withLastCommitId
-
getExecuteFilemode
-
setExecuteFilemode
-
withExecuteFilemode
-
withFileContent
-
toString
-