org.apache.karaf.shell.config
Class ConfigPropertyCommandSupport
java.lang.Object
org.apache.karaf.shell.console.AbstractAction
org.apache.karaf.shell.console.OsgiCommandSupport
org.apache.karaf.shell.config.ConfigCommandSupport
org.apache.karaf.shell.config.ConfigPropertyCommandSupport
- All Implemented Interfaces:
- org.apache.felix.gogo.commands.Action, org.apache.karaf.shell.console.BundleContextAware
- Direct Known Subclasses:
- PropAppendCommand, PropDelCommand, PropListCommand, PropSetCommand
public abstract class ConfigPropertyCommandSupport
- extends ConfigCommandSupport
Abstract class which commands that are related to property processing should extend.
| Fields inherited from class org.apache.karaf.shell.console.OsgiCommandSupport |
bundleContext, usedReferences |
| Fields inherited from class org.apache.karaf.shell.console.AbstractAction |
log, session |
|
Method Summary |
protected void |
doExecute(org.osgi.service.cm.ConfigurationAdmin admin)
|
protected Dictionary |
getEditedProps()
Retrieves confguration from the pid, if used or delegates to session from getting the configuration. |
protected abstract void |
propertyAction(Dictionary props)
Perform an action on the properties. |
protected boolean |
requiresUpdate(String pid)
Checks if the configuration requires to be updated. |
| Methods inherited from class org.apache.karaf.shell.config.ConfigCommandSupport |
deleteStorage, doExecute, findConfigurationByFileName, getConfigurationAdmin, getStorage, parsePid, persistConfiguration, setArtifactInstallers, setStorage, update, updateConfiguration |
| Methods inherited from class org.apache.karaf.shell.console.OsgiCommandSupport |
execute, getAllServices, getBundleContext, getService, setBundleContext, ungetServices |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pid
protected String pid
bypassStorage
protected boolean bypassStorage
ConfigPropertyCommandSupport
public ConfigPropertyCommandSupport()
doExecute
protected void doExecute(org.osgi.service.cm.ConfigurationAdmin admin)
throws Exception
- Specified by:
doExecute in class ConfigCommandSupport
- Throws:
Exception
propertyAction
protected abstract void propertyAction(Dictionary props)
- Perform an action on the properties.
- Parameters:
props -
requiresUpdate
protected boolean requiresUpdate(String pid)
- Checks if the configuration requires to be updated.
The default behavior is to update if a valid pid has been passed to the method.
- Parameters:
pid -
- Returns:
getEditedProps
protected Dictionary getEditedProps()
throws Exception
- Retrieves confguration from the pid, if used or delegates to session from getting the configuration.
- Overrides:
getEditedProps in class ConfigCommandSupport
- Returns:
-
- Throws:
Exception
Copyright © 2007-2012 FuseSource, Corp.. All Rights Reserved.