Package org.apache.karaf.kar.internal
Class KarServiceImpl
- java.lang.Object
-
- org.apache.karaf.kar.internal.KarServiceImpl
-
- All Implemented Interfaces:
KarService
public class KarServiceImpl extends Object implements KarService
Implementation of the KAR service.
-
-
Constructor Summary
Constructors Constructor Description KarServiceImpl(String karafBase, String karStorage, org.apache.karaf.features.FeaturesService featuresService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreate(String repoName, List<String> features, PrintStream console)Create a kar from the given feature and repo names.voidinstall(URI karUri)Install KAR from a given URI Resources will be copied to the karaf base dir Repository contents will be copied to a subdir in the karaf data directoryvoidinstall(URI karUri, boolean noAutoStartBundles)Install KAR from a given URIvoidinstall(URI karUri, boolean noAutoStartBundles, boolean noAutoRefreshBundles)Install KAR from a given URIvoidinstall(URI karUri, File repoDir, File resourceDir)Install a kar with manually given repository and resource directories.voidinstall(URI karUri, File repoDir, File resourceDir, boolean noAutoStartBundles)Install a kar with manually given repository and resource directories.voidinstall(URI karUri, File repoDir, File resourceDir, boolean noAutoStartBundles, boolean noAutoRefreshBundles)Install a kar with manually given repository and resource directories.List<String>list()List the KAR stored in the data folder.voidsetNoAutoRefreshBundles(boolean noAutoRefreshBundles)voidsetNoAutoStartBundles(boolean noAutoStartBundles)voiduninstall(String karName)Uninstall the given KARvoiduninstall(String karName, boolean noAutoRefreshBundles)Uninstall the given KAR
-
-
-
Method Detail
-
install
public void install(URI karUri) throws Exception
Description copied from interface:KarServiceInstall KAR from a given URI Resources will be copied to the karaf base dir Repository contents will be copied to a subdir in the karaf data directory- Specified by:
installin interfaceKarService- Parameters:
karUri- Uri of the kar to be installed- Throws:
Exception- in case of installation failure.
-
install
public void install(URI karUri, boolean noAutoStartBundles) throws Exception
Description copied from interface:KarServiceInstall KAR from a given URI- Specified by:
installin interfaceKarService- Parameters:
karUri- URI of the kar to installnoAutoStartBundles- true to not start automatically the bundles, false else- Throws:
Exception- in case of installation failure
-
install
public void install(URI karUri, boolean noAutoStartBundles, boolean noAutoRefreshBundles) throws Exception
Description copied from interface:KarServiceInstall KAR from a given URI- Specified by:
installin interfaceKarService- Parameters:
karUri- URI of the kar to installnoAutoStartBundles- true to not start automatically the bundles, false elsenoAutoRefreshBundles- true to not refresh automatically the bundles, false else- Throws:
Exception- in case of installation failure
-
install
public void install(URI karUri, File repoDir, File resourceDir) throws Exception
Description copied from interface:KarServiceInstall a kar with manually given repository and resource directories.- Specified by:
installin interfaceKarService- Parameters:
karUri- Uri of the kar to be installedrepoDir- destination for the repository contents of the karresourceDir- destination for the resource contents of the kar- Throws:
Exception- in case of installation failure
-
install
public void install(URI karUri, File repoDir, File resourceDir, boolean noAutoStartBundles) throws Exception
Description copied from interface:KarServiceInstall a kar with manually given repository and resource directories.- Specified by:
installin interfaceKarService- Parameters:
karUri- Uri of the kar to be installed.repoDir- destination for the repository contents of the karresourceDir- destination for the resource contents of the karnoAutoStartBundles- true to not start automatically the bundles, false else- Throws:
Exception- in case of installation failure
-
install
public void install(URI karUri, File repoDir, File resourceDir, boolean noAutoStartBundles, boolean noAutoRefreshBundles) throws Exception
Description copied from interface:KarServiceInstall a kar with manually given repository and resource directories.- Specified by:
installin interfaceKarService- Parameters:
karUri- Uri of the kar to be installed.repoDir- destination for the repository contents of the karresourceDir- destination for the resource contents of the karnoAutoStartBundles- true to not start automatically the bundles, false elsenoAutoRefreshBundles- true to not refresh automatically the bundles, false else- Throws:
Exception- in case of installation failure
-
uninstall
public void uninstall(String karName) throws Exception
Description copied from interface:KarServiceUninstall the given KAR- Specified by:
uninstallin interfaceKarService- Parameters:
karName- the name of the KAR- Throws:
Exception- in case of failure
-
uninstall
public void uninstall(String karName, boolean noAutoRefreshBundles) throws Exception
Description copied from interface:KarServiceUninstall the given KAR- Specified by:
uninstallin interfaceKarService- Parameters:
karName- the name of the KARnoAutoRefreshBundles- true to not automatically refresh bundles, false else.- Throws:
Exception- in case of failure
-
list
public List<String> list() throws Exception
Description copied from interface:KarServiceList the KAR stored in the data folder.- Specified by:
listin interfaceKarService- Returns:
- the list of KAR stored.
- Throws:
Exception- in case of listing failure.
-
create
public void create(String repoName, List<String> features, PrintStream console)
Description copied from interface:KarServiceCreate a kar from the given feature and repo names. Each named feature including all transitive deps will be added. For each named repo all features in the repo and their transitive deps will be added.- Specified by:
createin interfaceKarService- Parameters:
repoName- the feature repository to use to create the kar.features- the list of features to include in the created kar.console- the console stream where to print details.
-
setNoAutoRefreshBundles
public void setNoAutoRefreshBundles(boolean noAutoRefreshBundles)
-
setNoAutoStartBundles
public void setNoAutoStartBundles(boolean noAutoStartBundles)
-
-