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:
org.apache.felix.gogo.commands.Action, org.apache.karaf.shell.console.BundleContextAware
Direct Known Subclasses:
AddUrlCommand, DeployCommand, FindCommand, InfoCommand, ListCommand, ListUrlCommand, RefreshUrlCommand, RemoveUrlCommand, ResolveCommand, SourceCommand

public abstract class ObrCommandSupport
extends org.apache.karaf.shell.console.OsgiCommandSupport


Field Summary
static 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, List<String> bundles, boolean start)
           
protected  Object doExecute()
           
protected abstract  void doExecute(org.apache.felix.bundlerepository.RepositoryAdmin admin)
           
protected  String[] getTarget(String bundle)
           
protected  org.apache.felix.bundlerepository.Requirement parseRequirement(org.apache.felix.bundlerepository.RepositoryAdmin admin, String req)
           
protected  org.apache.felix.bundlerepository.Requirement[] parseRequirements(org.apache.felix.bundlerepository.RepositoryAdmin admin, List<String> requirements)
           
protected  void persistRepositoryList(org.apache.felix.bundlerepository.RepositoryAdmin admin)
           
protected  void printUnderline(PrintStream out, int length)
           
protected  org.apache.felix.bundlerepository.Resource[] searchRepository(org.apache.felix.bundlerepository.RepositoryAdmin admin, String targetId, 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 String REPOSITORY_URL_PROP
See Also:
Constant Field Values
Constructor Detail

ObrCommandSupport

public ObrCommandSupport()
Method Detail

doExecute

protected Object doExecute()
                    throws Exception
Specified by:
doExecute in class org.apache.karaf.shell.console.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,
                                                                        String targetId,
                                                                        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 String[] getTarget(String bundle)

printUnderline

protected void printUnderline(PrintStream out,
                              int length)

doDeploy

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

parseRequirement

protected org.apache.felix.bundlerepository.Requirement parseRequirement(org.apache.felix.bundlerepository.RepositoryAdmin admin,
                                                                         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,
                                                                            List<String> requirements)
                                                                     throws org.osgi.framework.InvalidSyntaxException
Throws:
org.osgi.framework.InvalidSyntaxException

persistRepositoryList

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


Copyright © 2007-2012 FuseSource, Corp.. All Rights Reserved.