org.jclouds.karaf.chef.commands
Class ChefCommandBase

java.lang.Object
  extended by org.apache.karaf.shell.console.AbstractAction
      extended by org.jclouds.karaf.chef.commands.ChefCommandBase
All Implemented Interfaces:
org.apache.felix.gogo.commands.Action
Direct Known Subclasses:
ChefCommandWithOptions, ChefServiceDestroyCommand, ChefServiceListCommand

public abstract class ChefCommandBase
extends org.apache.karaf.shell.console.AbstractAction


Field Summary
protected  CacheProvider cacheProvider
           
protected  List<org.jclouds.chef.ChefService> chefServices
           
protected  org.osgi.service.cm.ConfigurationAdmin configAdmin
           
static String FACTORY_FILTER
           
static String PROVIDERFORMAT
           
protected  ShellTableFactory shellTableFactory
           
 
Fields inherited from class org.apache.karaf.shell.console.AbstractAction
log, session
 
Constructor Summary
ChefCommandBase()
           
 
Method Summary
 Object execute(org.apache.felix.service.command.CommandSession session)
           
protected  org.osgi.service.cm.Configuration findOrCreateFactoryConfiguration(org.osgi.service.cm.ConfigurationAdmin configurationAdmin, String factoryPid, String id, String api)
          Finds a Configuration if exists, or creates a new one.
 CacheProvider getCacheProvider()
           
 List<org.jclouds.chef.ChefService> getChefServices()
           
 org.osgi.service.cm.ConfigurationAdmin getConfigAdmin()
           
 ShellTableFactory getShellTableFactory()
           
protected  void printChefApis(Iterable<org.jclouds.apis.ApiMetadata> apis, List<org.jclouds.chef.ChefService> chefServices, PrintStream out)
           
protected  void printCookbooks(org.jclouds.chef.ChefService service, Iterable<? extends org.jclouds.chef.domain.CookbookVersion> cookbookVersions, PrintStream out)
           
 void setCacheProvider(CacheProvider cacheProvider)
           
 void setChefServices(List<org.jclouds.chef.ChefService> chefServices)
           
 void setConfigAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin)
           
 void setShellTableFactory(ShellTableFactory shellTableFactory)
           
 
Methods inherited from class org.apache.karaf.shell.console.AbstractAction
doExecute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROVIDERFORMAT

public static final String PROVIDERFORMAT
See Also:
Constant Field Values

FACTORY_FILTER

public static final String FACTORY_FILTER
See Also:
Constant Field Values

configAdmin

protected org.osgi.service.cm.ConfigurationAdmin configAdmin

cacheProvider

protected CacheProvider cacheProvider

chefServices

protected List<org.jclouds.chef.ChefService> chefServices

shellTableFactory

protected ShellTableFactory shellTableFactory
Constructor Detail

ChefCommandBase

public ChefCommandBase()
Method Detail

execute

public Object execute(org.apache.felix.service.command.CommandSession session)
               throws Exception
Specified by:
execute in interface org.apache.felix.gogo.commands.Action
Overrides:
execute in class org.apache.karaf.shell.console.AbstractAction
Throws:
Exception

printChefApis

protected void printChefApis(Iterable<org.jclouds.apis.ApiMetadata> apis,
                             List<org.jclouds.chef.ChefService> chefServices,
                             PrintStream out)

printCookbooks

protected void printCookbooks(org.jclouds.chef.ChefService service,
                              Iterable<? extends org.jclouds.chef.domain.CookbookVersion> cookbookVersions,
                              PrintStream out)

findOrCreateFactoryConfiguration

protected org.osgi.service.cm.Configuration findOrCreateFactoryConfiguration(org.osgi.service.cm.ConfigurationAdmin configurationAdmin,
                                                                             String factoryPid,
                                                                             String id,
                                                                             String api)
                                                                      throws IOException
Finds a Configuration if exists, or creates a new one.

Parameters:
configurationAdmin -
factoryPid -
api -
Returns:
Throws:
IOException

getConfigAdmin

public org.osgi.service.cm.ConfigurationAdmin getConfigAdmin()

setConfigAdmin

public void setConfigAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin)

getCacheProvider

public CacheProvider getCacheProvider()

setCacheProvider

public void setCacheProvider(CacheProvider cacheProvider)

getChefServices

public List<org.jclouds.chef.ChefService> getChefServices()

setChefServices

public void setChefServices(List<org.jclouds.chef.ChefService> chefServices)

getShellTableFactory

public ShellTableFactory getShellTableFactory()

setShellTableFactory

public void setShellTableFactory(ShellTableFactory shellTableFactory)


Copyright © 2013. All Rights Reserved.