public abstract class MigrationCommand extends Object implements org.apache.karaf.shell.api.action.Action
Modifier and Type | Field and Description |
---|---|
protected ConfigurationMigrationService |
configurationMigrationService |
static String |
ERROR_MESSAGE |
protected org.osgi.service.event.EventAdmin |
eventAdmin |
protected Path |
exportDirectory |
protected static String |
EXPORTED |
static String |
NAMESPACE |
protected Security |
security |
protected org.apache.karaf.shell.api.console.Session |
session |
protected String |
user |
Constructor and Description |
---|
MigrationCommand() |
Modifier and Type | Method and Description |
---|---|
Object |
execute() |
protected abstract Object |
executeWithSubject()
Executes the command once the user has been properly authorized.
|
protected PrintStream |
getConsole() |
protected String |
getSubjectName() |
protected void |
outputErrorMessage(String message) |
protected void |
outputMessage(MigrationMessage msg) |
protected void |
postSystemNotice(String cmd) |
public static final String ERROR_MESSAGE
public static final String NAMESPACE
protected static final String EXPORTED
protected final Security security
protected ConfigurationMigrationService configurationMigrationService
protected org.osgi.service.event.EventAdmin eventAdmin
protected org.apache.karaf.shell.api.console.Session session
protected String user
protected Path exportDirectory
public Object execute() throws Exception
execute
in interface org.apache.karaf.shell.api.action.Action
Exception
protected abstract Object executeWithSubject() throws Exception
Exception
- if the command failed to runprotected void outputErrorMessage(String message)
protected void outputMessage(MigrationMessage msg)
protected PrintStream getConsole()
protected String getSubjectName()
protected void postSystemNotice(String cmd)
This work is licensed under a Creative Commons Attribution 4.0 International License.