org.apache.karaf.shell.obr
Class ObrCommandSupport

java.lang.Object
  extended by org.apache.karaf.shell.console.AbstractAction
      extended by org.apache.karaf.shell.console.OsgiCommandSupport
          extended by org.apache.karaf.shell.obr.ObrCommandSupport
All Implemented Interfaces:
Action, BundleContextAware
Direct Known Subclasses:
AddUrlCommand, DeployCommand, FindCommand, InfoCommand, ListCommand, ListUrlCommand, RefreshUrlCommand, RemoveUrlCommand, ResolveCommand, SourceCommand

public abstract class ObrCommandSupport
extends OsgiCommandSupport


Field Summary
static java.lang.String REPOSITORY_URL_PROP
           
protected static char VERSION_DELIM
           
 
Fields inherited from class org.apache.karaf.shell.console.OsgiCommandSupport
bundleContext, usedReferences
 
Fields inherited from class org.apache.karaf.shell.console.AbstractAction
log, session
 
Constructor Summary
ObrCommandSupport()
           
 
Method Summary
protected  void doDeploy(org.apache.felix.bundlerepository.RepositoryAdmin admin, java.util.List<java.lang.String> bundles, boolean start)
           
protected  java.lang.Object doExecute()
           
protected abstract  void doExecute(org.apache.felix.bundlerepository.RepositoryAdmin admin)
           
protected  java.lang.String[] getTarget(java.lang.String bundle)
           
protected  org.apache.felix.bundlerepository.Requirement parseRequirement(org.apache.felix.bundlerepository.RepositoryAdmin admin, java.lang.String req)
           
protected  org.apache.felix.bundlerepository.Requirement[] parseRequirements(org.apache.felix.bundlerepository.RepositoryAdmin admin, java.util.List<java.lang.String> requirements)
           
protected  void persistRepositoryList(org.apache.felix.bundlerepository.RepositoryAdmin admin)
           
protected  void printUnderline(java.io.PrintStream out, int length)
           
protected  org.apache.felix.bundlerepository.Resource[] searchRepository(org.apache.felix.bundlerepository.RepositoryAdmin admin, java.lang.String targetId, java.lang.String targetVersion)
           
 org.apache.felix.bundlerepository.Resource selectNewestVersion(org.apache.felix.bundlerepository.Resource[] resources)
           
 
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
 

Field Detail

VERSION_DELIM

protected static final char VERSION_DELIM
See Also:
Constant Field Values

REPOSITORY_URL_PROP

public static final java.lang.String REPOSITORY_URL_PROP
See Also:
Constant Field Values
Constructor Detail

ObrCommandSupport

public ObrCommandSupport()
Method Detail

doExecute

protected java.lang.Object doExecute()
                              throws Exception
Specified by:
doExecute in class AbstractAction
Throws:
Exception

doExecute

protected abstract void doExecute(org.apache.felix.bundlerepository.RepositoryAdmin admin)
                           throws Exception
Throws:
Exception

searchRepository

protected org.apache.felix.bundlerepository.Resource[] searchRepository(org.apache.felix.bundlerepository.RepositoryAdmin admin,
                                                                        java.lang.String targetId,
                                                                        java.lang.String targetVersion)
                                                                 throws org.osgi.framework.InvalidSyntaxException
Throws:
org.osgi.framework.InvalidSyntaxException

selectNewestVersion

public org.apache.felix.bundlerepository.Resource selectNewestVersion(org.apache.felix.bundlerepository.Resource[] resources)

getTarget

protected java.lang.String[] getTarget(java.lang.String bundle)

printUnderline

protected void printUnderline(java.io.PrintStream out,
                              int length)

doDeploy

protected void doDeploy(org.apache.felix.bundlerepository.RepositoryAdmin admin,
                        java.util.List<java.lang.String> bundles,
                        boolean start)
                 throws Exception
Throws:
Exception

parseRequirement

protected org.apache.felix.bundlerepository.Requirement parseRequirement(org.apache.felix.bundlerepository.RepositoryAdmin admin,
                                                                         java.lang.String req)
                                                                  throws org.osgi.framework.InvalidSyntaxException
Throws:
org.osgi.framework.InvalidSyntaxException

parseRequirements

protected org.apache.felix.bundlerepository.Requirement[] parseRequirements(org.apache.felix.bundlerepository.RepositoryAdmin admin,
                                                                            java.util.List<java.lang.String> requirements)
                                                                     throws org.osgi.framework.InvalidSyntaxException
Throws:
org.osgi.framework.InvalidSyntaxException

persistRepositoryList

protected void persistRepositoryList(org.apache.felix.bundlerepository.RepositoryAdmin admin)


Copyright © 2007-2011 Apache Software Foundation. All Rights Reserved.