Class HALMConnection.AbstractResult
- java.lang.Object
-
- com.perforce.halm.jenkins.globalconfig.HALMConnection.AbstractResult
-
- Direct Known Subclasses:
HALMConnection.AuthInfoResult
,HALMConnection.ConnectionInfoResult
,HALMConnection.CredentialDetailsResult
- Enclosing class:
- HALMConnection
public abstract static class HALMConnection.AbstractResult extends Object
Abstract base class for results, provides common error handling.
-
-
Constructor Summary
Constructors Constructor Description AbstractResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getErrorMessage()
Any relevant error message.boolean
isError()
Checks if the result indicates an error occurred.protected boolean
isErrorInternal()
Implementer can extend isError safely by implementing isErrorInternal.
-
-
-
Field Detail
-
error
public String error
If an error occurs while parsing the authorization info, this will be set to a message indicating what the problem was.
-
-
Method Detail
-
isError
public final boolean isError()
Checks if the result indicates an error occurred. CheckgetErrorMessage()
for an error message.- Returns:
- True if there was an error,
-
getErrorMessage
public String getErrorMessage()
Any relevant error message. If no error message exists, a default one is returned.- Returns:
- Any relevant error message. If no error message exists, a default one is returned.
-
isErrorInternal
protected boolean isErrorInternal()
Implementer can extend isError safely by implementing isErrorInternal.- Returns:
- True indicates the implementor thinks this result should be a failure.
-
-