Class ConfigurationErrorsImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.ConfigurationErrorsImpl
-
- All Implemented Interfaces:
ConfigurationErrors
,ErrorsCollection
public class ConfigurationErrorsImpl extends Object implements ConfigurationErrors
A wrapper for the interfaceCriticalErrors
providing a more specificConfigurationErrors
.- See Also:
ConfigurationErrorsReport
-
-
Constructor Summary
Constructors Constructor Description ConfigurationErrorsImpl(EventDispatcher<BuildServerListener> dispatcher, ServerPaths serverPaths, ServerResponsibility serverResponsibility)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearError(File configFile)
Removes error associated with specified fileboolean
containsError(File configFile)
Returns true if there is an error associated with specified fileList<File>
getBrokenConfigFiles()
Collection<String>
getErrorKeys()
String
getErrorMessage(File configFile)
Returns error message associated with specified file or nullCollection<String>
getErrors()
Returns collection of the error messagesboolean
hasErrors()
Returns true if there are errors associated with configuration filesvoid
putError(File configFile, String message)
Stores error message associated with a file and logs it to a log filevoid
putError(File configFile, String message, boolean logMessage)
Stores error message associated with a file and optionally logs it to a log fileorg.jdom.Document
readConfigFile(File configFile)
-
-
-
Constructor Detail
-
ConfigurationErrorsImpl
public ConfigurationErrorsImpl(@NotNull EventDispatcher<BuildServerListener> dispatcher, @NotNull ServerPaths serverPaths, @NotNull ServerResponsibility serverResponsibility)
-
-
Method Detail
-
putError
public void putError(@NotNull File configFile, @NotNull String message)
Description copied from interface:ConfigurationErrors
Stores error message associated with a file and logs it to a log file- Specified by:
putError
in interfaceConfigurationErrors
- Parameters:
configFile
- filemessage
- message
-
putError
public void putError(@NotNull File configFile, @NotNull String message, boolean logMessage)
Description copied from interface:ConfigurationErrors
Stores error message associated with a file and optionally logs it to a log file- Specified by:
putError
in interfaceConfigurationErrors
- Parameters:
configFile
- filemessage
- error messagelogMessage
- if true then the log will be logged to a log file with warning log level
-
getErrorMessage
@Nullable public String getErrorMessage(@NotNull File configFile)
Description copied from interface:ConfigurationErrors
Returns error message associated with specified file or null- Specified by:
getErrorMessage
in interfaceConfigurationErrors
- Returns:
-
clearError
public void clearError(@NotNull File configFile)
Description copied from interface:ConfigurationErrors
Removes error associated with specified file- Specified by:
clearError
in interfaceConfigurationErrors
-
containsError
public boolean containsError(@NotNull File configFile)
Description copied from interface:ConfigurationErrors
Returns true if there is an error associated with specified file- Specified by:
containsError
in interfaceConfigurationErrors
- Parameters:
configFile
- file- Returns:
- see above
-
hasErrors
public boolean hasErrors()
Description copied from interface:ConfigurationErrors
Returns true if there are errors associated with configuration files- Specified by:
hasErrors
in interfaceConfigurationErrors
- Returns:
- see above
-
getBrokenConfigFiles
@NotNull public List<File> getBrokenConfigFiles()
- Specified by:
getBrokenConfigFiles
in interfaceConfigurationErrors
- Returns:
- all configurations files for which errors were reported
-
getErrors
@NotNull 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
-
getErrorKeys
@NotNull public Collection<String> getErrorKeys()
-
readConfigFile
@Nullable public org.jdom.Document readConfigFile(@NotNull File configFile)
- Specified by:
readConfigFile
in interfaceConfigurationErrors
-
-