Class SecuredCriticalErrorsImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.SecuredCriticalErrorsImpl
-
- All Implemented Interfaces:
CriticalErrors
,ErrorsCollection
public class SecuredCriticalErrorsImpl extends Object implements CriticalErrors
- Author:
- Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
-
-
Constructor Summary
Constructors Constructor Description SecuredCriticalErrorsImpl(SecurityContextEx securityContext, CriticalErrors delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearError(String key)
Removes error with specified keyvoid
clearErrors()
Clears all of the errorsboolean
containsError(String key)
Returns true if an error with specified key existsString
getError(String key)
Collection<String>
getErrorKeys()
Returns all error keys.Collection<String>
getErrors()
Returns collection of the error messagesboolean
hasErrors()
Returnstrue
if and only if there is any error.void
putError(String key, String message)
Adds a new error and logs it to a log gile with warning log levelvoid
putError(String key, String message, boolean logMessage)
Adds a new error
-
-
-
Constructor Detail
-
SecuredCriticalErrorsImpl
public SecuredCriticalErrorsImpl(@NotNull SecurityContextEx securityContext, @NotNull CriticalErrors delegate)
-
-
Method Detail
-
putError
public void putError(@NotNull String key, @NotNull String message)
Description copied from interface:CriticalErrors
Adds a new error and logs it to a log gile with warning log level- Specified by:
putError
in interfaceCriticalErrors
- Parameters:
key
- error keymessage
- error message
-
putError
public void putError(@NotNull String key, @NotNull String message, boolean logMessage)
Description copied from interface:CriticalErrors
Adds a new error- Specified by:
putError
in interfaceCriticalErrors
- Parameters:
key
- error keymessage
- error messagelogMessage
- if true then the log will be logged to a log file with warning log level
-
containsError
public boolean containsError(@NotNull String key)
Description copied from interface:CriticalErrors
Returns true if an error with specified key exists- Specified by:
containsError
in interfaceCriticalErrors
- Parameters:
key
- key of the error- Returns:
- true if error exists
-
clearError
public void clearError(@NotNull String key)
Description copied from interface:CriticalErrors
Removes error with specified key- Specified by:
clearError
in interfaceCriticalErrors
- Parameters:
key
- key of the error
-
clearErrors
public void clearErrors()
Description copied from interface:CriticalErrors
Clears all of the errors- Specified by:
clearErrors
in interfaceCriticalErrors
-
hasErrors
public boolean hasErrors()
Description copied from interface:CriticalErrors
Returnstrue
if and only if there is any error.- Specified by:
hasErrors
in interfaceCriticalErrors
-
getErrorKeys
@NotNull public Collection<String> getErrorKeys()
Description copied from interface:CriticalErrors
Returns all error keys.- Specified by:
getErrorKeys
in interfaceCriticalErrors
- Returns:
- see above
-
getError
@Nullable public String getError(@NotNull String key)
- Specified by:
getError
in interfaceCriticalErrors
- Parameters:
key
- particular key to look for- Returns:
- error message for specified key
-
getErrors
public Collection<String> getErrors()
Description copied from interface:ErrorsCollection
Returns collection of the error messages- Specified by:
getErrors
in interfaceErrorsCollection
- Returns:
- collection of the error messages
-
-