org.apache.karaf.shell.console
Class NameScoping
java.lang.Object
org.apache.karaf.shell.console.NameScoping
public class NameScoping
- extends java.lang.Object
A helper class for name scoping
Method Summary |
static java.lang.String |
getCommandNameWithoutGlobalPrefix(org.apache.felix.service.command.CommandSession session,
java.lang.String key)
Returns the name of the command which can omit the global scope prefix if the command starts with the
same prefix as the current application |
static boolean |
isGlobalScope(org.apache.felix.service.command.CommandSession session,
java.lang.String scope)
Returns true if the given scope is the global scope so that it can be hidden from help messages |
static boolean |
isMultiScopeMode(org.apache.felix.service.command.CommandSession session)
Returns true if we are in multi-scope mode (the default) or if we are in single scope mode which means we
avoid prefixing commands with their scope |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MULTI_SCOPE_MODE_KEY
public static final java.lang.String MULTI_SCOPE_MODE_KEY
- See Also:
- Constant Field Values
NameScoping
public NameScoping()
getCommandNameWithoutGlobalPrefix
public static java.lang.String getCommandNameWithoutGlobalPrefix(org.apache.felix.service.command.CommandSession session,
java.lang.String key)
- Returns the name of the command which can omit the global scope prefix if the command starts with the
same prefix as the current application
isGlobalScope
public static boolean isGlobalScope(org.apache.felix.service.command.CommandSession session,
java.lang.String scope)
- Returns true if the given scope is the global scope so that it can be hidden from help messages
isMultiScopeMode
public static boolean isMultiScopeMode(org.apache.felix.service.command.CommandSession session)
- Returns true if we are in multi-scope mode (the default) or if we are in single scope mode which means we
avoid prefixing commands with their scope
Copyright © 2007-2011 Apache Software Foundation. All Rights Reserved.