Class ObrCommandImpl
- java.lang.Object
-
- org.apache.felix.bundlerepository.impl.ObrCommandImpl
-
- All Implemented Interfaces:
org.apache.felix.shell.Command
public class ObrCommandImpl extends java.lang.Object implements org.apache.felix.shell.Command
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classObrCommandImpl.ParsedCommand
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringADDURL_CMDprivate static java.lang.StringDEPLOY_CMDprivate static java.lang.StringEXTRACT_SWITCHprivate static java.lang.StringHELP_CMDprivate static java.lang.StringINFO_CMDprivate static java.lang.StringJAVADOC_CMDprivate static java.lang.StringLIST_CMDprivate static java.lang.StringLISTURL_CMDprivate org.osgi.framework.BundleContextm_contextprivate RepositoryAdminm_repoAdminprivate static java.lang.StringREFRESHURL_CMDprivate static java.lang.StringREMOVEURL_CMDprivate static java.lang.StringSOURCE_CMDprivate static java.lang.StringSTART_CMDprivate static java.lang.StringVERBOSE_SWITCH
-
Constructor Summary
Constructors Constructor Description ObrCommandImpl(org.osgi.framework.BundleContext context, RepositoryAdmin repoAdmin)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void_deploy(ObrCommandImpl.ParsedCommand pc, java.lang.String command, java.io.PrintStream out, java.io.PrintStream err)private static Resource[]addResourceByVersion(Resource[] revisions, Resource resource)private voiddeploy(java.lang.String commandLine, java.lang.String command, java.io.PrintStream out, java.io.PrintStream err)voidexecute(java.lang.String commandLine, java.io.PrintStream out, java.io.PrintStream err)java.lang.StringgetName()java.lang.StringgetShortDescription()java.lang.StringgetUsage()private voidhelp(java.io.PrintStream out, java.util.StringTokenizer st)private voidinfo(java.lang.String commandLine, java.lang.String command, java.io.PrintStream out, java.io.PrintStream err)private voidjavadoc(java.lang.String commandLine, java.lang.String command, java.io.PrintStream out, java.io.PrintStream err)private voidlist(java.lang.String commandLine, java.lang.String command, java.io.PrintStream out, java.io.PrintStream err)private ObrCommandImpl.ParsedCommandparseInfo(java.lang.String commandLine)private ObrCommandImpl.ParsedCommandparseInstallStart(java.lang.String commandLine)private ObrCommandImpl.ParsedCommandparseList(java.lang.String commandLine)private ObrCommandImpl.ParsedCommandparseSource(java.lang.String commandLine)private voidprintResource(java.io.PrintStream out, Resource resource)private static voidprintUnderline(java.io.PrintStream out, int length)private Resource[]searchRepository(java.lang.String targetId, java.lang.String targetVersion)ResourceselectNewestVersion(Resource[] resources)private voidsource(java.lang.String commandLine, java.lang.String command, java.io.PrintStream out, java.io.PrintStream err)private voidurls(java.lang.String commandLine, java.lang.String command, java.io.PrintStream out, java.io.PrintStream err)
-
-
-
Field Detail
-
HELP_CMD
private static final java.lang.String HELP_CMD
- See Also:
- Constant Field Values
-
ADDURL_CMD
private static final java.lang.String ADDURL_CMD
- See Also:
- Constant Field Values
-
REMOVEURL_CMD
private static final java.lang.String REMOVEURL_CMD
- See Also:
- Constant Field Values
-
LISTURL_CMD
private static final java.lang.String LISTURL_CMD
- See Also:
- Constant Field Values
-
REFRESHURL_CMD
private static final java.lang.String REFRESHURL_CMD
- See Also:
- Constant Field Values
-
LIST_CMD
private static final java.lang.String LIST_CMD
- See Also:
- Constant Field Values
-
INFO_CMD
private static final java.lang.String INFO_CMD
- See Also:
- Constant Field Values
-
DEPLOY_CMD
private static final java.lang.String DEPLOY_CMD
- See Also:
- Constant Field Values
-
START_CMD
private static final java.lang.String START_CMD
- See Also:
- Constant Field Values
-
SOURCE_CMD
private static final java.lang.String SOURCE_CMD
- See Also:
- Constant Field Values
-
JAVADOC_CMD
private static final java.lang.String JAVADOC_CMD
- See Also:
- Constant Field Values
-
EXTRACT_SWITCH
private static final java.lang.String EXTRACT_SWITCH
- See Also:
- Constant Field Values
-
VERBOSE_SWITCH
private static final java.lang.String VERBOSE_SWITCH
- See Also:
- Constant Field Values
-
m_context
private org.osgi.framework.BundleContext m_context
-
m_repoAdmin
private RepositoryAdmin m_repoAdmin
-
-
Constructor Detail
-
ObrCommandImpl
public ObrCommandImpl(org.osgi.framework.BundleContext context, RepositoryAdmin repoAdmin)
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceorg.apache.felix.shell.Command
-
getUsage
public java.lang.String getUsage()
- Specified by:
getUsagein interfaceorg.apache.felix.shell.Command
-
getShortDescription
public java.lang.String getShortDescription()
- Specified by:
getShortDescriptionin interfaceorg.apache.felix.shell.Command
-
execute
public void execute(java.lang.String commandLine, java.io.PrintStream out, java.io.PrintStream err)- Specified by:
executein interfaceorg.apache.felix.shell.Command
-
urls
private void urls(java.lang.String commandLine, java.lang.String command, java.io.PrintStream out, java.io.PrintStream err) throws java.io.IOException- Throws:
java.io.IOException
-
list
private void list(java.lang.String commandLine, java.lang.String command, java.io.PrintStream out, java.io.PrintStream err) throws java.io.IOException, org.osgi.framework.InvalidSyntaxException- Throws:
java.io.IOExceptionorg.osgi.framework.InvalidSyntaxException
-
info
private void info(java.lang.String commandLine, java.lang.String command, java.io.PrintStream out, java.io.PrintStream err) throws java.io.IOException, org.osgi.framework.InvalidSyntaxException- Throws:
java.io.IOExceptionorg.osgi.framework.InvalidSyntaxException
-
deploy
private void deploy(java.lang.String commandLine, java.lang.String command, java.io.PrintStream out, java.io.PrintStream err) throws java.io.IOException, org.osgi.framework.InvalidSyntaxException- Throws:
java.io.IOExceptionorg.osgi.framework.InvalidSyntaxException
-
_deploy
private void _deploy(ObrCommandImpl.ParsedCommand pc, java.lang.String command, java.io.PrintStream out, java.io.PrintStream err) throws java.io.IOException, org.osgi.framework.InvalidSyntaxException
- Throws:
java.io.IOExceptionorg.osgi.framework.InvalidSyntaxException
-
source
private void source(java.lang.String commandLine, java.lang.String command, java.io.PrintStream out, java.io.PrintStream err) throws java.io.IOException, org.osgi.framework.InvalidSyntaxException- Throws:
java.io.IOExceptionorg.osgi.framework.InvalidSyntaxException
-
javadoc
private void javadoc(java.lang.String commandLine, java.lang.String command, java.io.PrintStream out, java.io.PrintStream err) throws java.io.IOException, org.osgi.framework.InvalidSyntaxException- Throws:
java.io.IOExceptionorg.osgi.framework.InvalidSyntaxException
-
searchRepository
private Resource[] searchRepository(java.lang.String targetId, java.lang.String targetVersion) throws org.osgi.framework.InvalidSyntaxException
- Throws:
org.osgi.framework.InvalidSyntaxException
-
printResource
private void printResource(java.io.PrintStream out, Resource resource)
-
printUnderline
private static void printUnderline(java.io.PrintStream out, int length)
-
parseList
private ObrCommandImpl.ParsedCommand parseList(java.lang.String commandLine) throws java.io.IOException, org.osgi.framework.InvalidSyntaxException
- Throws:
java.io.IOExceptionorg.osgi.framework.InvalidSyntaxException
-
parseInfo
private ObrCommandImpl.ParsedCommand parseInfo(java.lang.String commandLine) throws java.io.IOException, org.osgi.framework.InvalidSyntaxException
- Throws:
java.io.IOExceptionorg.osgi.framework.InvalidSyntaxException
-
parseInstallStart
private ObrCommandImpl.ParsedCommand parseInstallStart(java.lang.String commandLine) throws java.io.IOException, org.osgi.framework.InvalidSyntaxException
- Throws:
java.io.IOExceptionorg.osgi.framework.InvalidSyntaxException
-
parseSource
private ObrCommandImpl.ParsedCommand parseSource(java.lang.String commandLine) throws java.io.IOException, org.osgi.framework.InvalidSyntaxException
- Throws:
java.io.IOExceptionorg.osgi.framework.InvalidSyntaxException
-
help
private void help(java.io.PrintStream out, java.util.StringTokenizer st)
-
-