Package org.apache.maven.scm
Class ScmResult
- java.lang.Object
-
- org.apache.maven.scm.ScmResult
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AddScmResult,BlameScmResult,BranchScmResult,ChangeLogScmResult,CheckInScmResult,CheckOutScmResult,DiffScmResult,EditScmResult,ExportScmResult,InfoScmResult,ListScmResult,LoginScmResult,MkdirScmResult,RemoteInfoScmResult,RemoveScmResult,StatusScmResult,TagScmResult,UnEditScmResult,UntagScmResult,UpdateScmResult
public class ScmResult extends java.lang.Object implements java.io.Serializable- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringcommandLineprivate java.lang.StringcommandOutputstatic java.lang.StringPASSWORD_PLACE_HOLDERprivate java.util.regex.PatternpatternForUserColonPasswordAtHostprivate java.lang.StringproviderMessageprivate static longserialVersionUIDprivate booleansuccess
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCommandLine()java.lang.StringgetCommandOutput()java.lang.StringgetProviderMessage()booleanisSuccess()private java.lang.Stringmasked(java.lang.String commandOutput)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
success
private final boolean success
-
providerMessage
private final java.lang.String providerMessage
-
commandOutput
private final java.lang.String commandOutput
-
commandLine
private final java.lang.String commandLine
-
PASSWORD_PLACE_HOLDER
public static final java.lang.String PASSWORD_PLACE_HOLDER
- See Also:
- Constant Field Values
-
patternForUserColonPasswordAtHost
private java.util.regex.Pattern patternForUserColonPasswordAtHost
-
-
Constructor Detail
-
ScmResult
public ScmResult(ScmResult scmResult)
Copy constructor.Typically used from derived classes when wrapping a ScmResult into a specific type e.g. AddScmResult.
- Parameters:
scmResult- not null
-
ScmResult
public ScmResult(java.lang.String commandLine, java.lang.String providerMessage, java.lang.String commandOutput, boolean success)ScmResult contructor.- Parameters:
commandLine- the provider specific command line usedproviderMessage- the provider messagecommandOutput- the command output of the scm toolsuccess- true if the command is in success
-
-
Method Detail
-
isSuccess
public boolean isSuccess()
- Returns:
- true if the command was in success
-
getProviderMessage
public java.lang.String getProviderMessage()
- Returns:
- a message from the provider. On success this would typically be null or an empty string. On failure, it would be the error message from the provider
-
getCommandOutput
public java.lang.String getCommandOutput()
- Returns:
- output from Std.Out from the provider during execution of the command that resulted in this
-
getCommandLine
public java.lang.String getCommandLine()
- Returns:
- the actual provider specific command that resulted in this
-
masked
private java.lang.String masked(java.lang.String commandOutput)
-
-