Class UpgradeContext
java.lang.Object
org.apache.maven.cling.invoker.LookupContext
org.apache.maven.cling.invoker.mvnup.UpgradeContext
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionList
<org.jline.utils.AttributedString> org.jline.reader.LineReader
org.jline.utils.AttributedStyle
Fields inherited from class org.apache.maven.cling.invoker.LookupContext
buildEventListener, closeables, coloredOutput, containerCapsule, containerCapsuleManaged, cwd, effectiveSettings, effectiveToolchains, eventSpyDispatcher, installationDirectory, installationSettingsPath, interactive, invokerRequest, localRepositoryPath, logger, loggerFactory, loggerLevel, lookup, projectSettingsPath, protoSession, pushedUserProperties, slf4jConfiguration, terminal, userDirectory, userSettingsPath, writer
-
Constructor Summary
ConstructorsConstructorDescriptionUpgradeContext
(InvokerRequest invokerRequest, UpgradeOptions upgradeOptions) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Logs a performed action with an arrow icon.void
addInHeader
(String text) void
addInHeader
(org.jline.utils.AttributedStyle style, String text) void
Logs a debug message with current indentation.void
Logs detailed information with a bullet point.void
Logs an error with an X icon.void
indent()
Increases the indentation level for nested logging.void
Logs an informational message with current indentation.options()
Gets the UpgradeOptions from the invoker request.void
println()
Prints a new line.void
setIndentString
(String indentString) Sets the indentation string to use (e.g., " ", " ", "\t").void
Logs a successful operation with a checkmark icon.void
unindent()
Decreases the indentation level for nested logging.void
Logs a warning with a warning icon.Methods inherited from class org.apache.maven.cling.invoker.LookupContext
close, closeContainer, doCloseContainer
-
Field Details
-
goals
-
header
-
style
public org.jline.utils.AttributedStyle style -
reader
public org.jline.reader.LineReader reader
-
-
Constructor Details
-
UpgradeContext
-
-
Method Details
-
addInHeader
-
addInHeader
-
indent
public void indent()Increases the indentation level for nested logging. -
unindent
public void unindent()Decreases the indentation level for nested logging. -
setIndentString
Sets the indentation string to use (e.g., " ", " ", "\t"). -
info
Logs an informational message with current indentation. -
debug
Logs a debug message with current indentation. -
println
public void println()Prints a new line. -
success
Logs a successful operation with a checkmark icon. -
failure
Logs an error with an X icon. -
warning
Logs a warning with a warning icon. -
detail
Logs detailed information with a bullet point. -
action
Logs a performed action with an arrow icon. -
options
Gets the UpgradeOptions from the invoker request. This provides convenient access to upgrade-specific options without casting.- Overrides:
options
in classLookupContext
- Returns:
- the UpgradeOptions
-