Class Action<O,R>
java.lang.Object
com.evolveum.midpoint.ninja.action.Action<O,R>
- Type Parameters:
O
- options class
- Direct Known Subclasses:
DownloadDistributionAction
,HelpAction
,InitialObjectsAction
,ListKeysRepositoryAction
,PreUpgradeCheckAction
,RepositoryAction
,RunSqlAction
,UpgradeBaseAction
,UpgradeInstallationAction
Base implementation class for action, that is Ninja command.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
abstract R
execute()
@NotNull NinjaApplicationContextLevel
getApplicationContextLevel
(List<Object> allOptions) abstract String
protected void
handleResultOnFinish
(R consumerResult, OperationStatus operation, String finishMessage) void
init
(NinjaContext context, O options)
-
Field Details
-
partial
protected final boolean partialFlag, whether action is part of more complex action. This is most often used to determine whether and how to print information to user (or skip some, e.g. next steps messages). -
log
-
context
-
options
-
-
Constructor Details
-
Action
public Action() -
Action
public Action(boolean partial)
-
-
Method Details
-
init
-
destroy
public void destroy() -
getLogTarget
- Returns:
- target where the log should be printed. In case action result is printed to the standard output, log messages should go to the standard error no to mix the output. Otherwise, log messages should go to the standard output.
-
handleResultOnFinish
protected void handleResultOnFinish(R consumerResult, OperationStatus operation, String finishMessage) -
getApplicationContextLevel
@NotNull public @NotNull NinjaApplicationContextLevel getApplicationContextLevel(List<Object> allOptions) - Parameters:
allOptions
-- Returns:
- Level of application context initialization required for this action.
-
getOperationName
-
execute
- Throws:
Exception
-