public class PluginResult
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
CODE_FAILURE
Plugin status: Failure
|
static int |
CODE_SUCCESS
Plugin status: Success
|
Constructor and Description |
---|
PluginResult()
Create a PluginResult object with status equals to success
|
PluginResult(java.lang.String resultJSON, int plgErrorCode, java.lang.String plgErrorMsg)
Create a PluginResult object with given information
|
Modifier and Type | Method and Description |
---|---|
void |
appendLog(java.lang.String str)
Append the user-defined log
|
void |
clearLog()
Clear the user-defined log
|
int |
getErrorCode()
Get the error code
|
java.lang.String |
getErrorMsg()
Get the error message
|
java.lang.String |
getLog()
Get the user-defined log
|
java.lang.String |
getResultJSON()
Get the request JSON body
|
void |
setErrorCode(int errorCode)
Set the error code
|
void |
setErrorMsg(java.lang.String errorMsg)
Set the error message
|
void |
setResultJSON(java.lang.String resultJSON)
Set the request JSON body
|
public static final int CODE_SUCCESS
public static final int CODE_FAILURE
public PluginResult()
public PluginResult(java.lang.String resultJSON, int plgErrorCode, java.lang.String plgErrorMsg)
public void setResultJSON(java.lang.String resultJSON)
resultJSON
- Set request body with the valuepublic java.lang.String getResultJSON()
public void setErrorCode(int errorCode)
errorCode
- Set plugin execution error codepublic int getErrorCode()
public void setErrorMsg(java.lang.String errorMsg)
errorMsg
- Set plugin execution error messagepublic java.lang.String getErrorMsg()
public void appendLog(java.lang.String str)
str
- The string to be appended to logpublic void clearLog()
public java.lang.String getLog()