|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.itest.pmanager.PackageManager
public abstract class PackageManager
Constructor Summary | |
---|---|
PackageManager()
|
Method Summary | |
---|---|
int |
addBinRepo(String record,
String descr)
Register a binary package repository so that packages can be accessed from it. |
abstract int |
addBinRepo(String record,
String url,
String key,
String cookie)
Register a binary package repository so that packages can be accessed from it. |
abstract int |
cleanup()
Clean up the repository cache |
abstract List |
getContentList(PackageInstance pkg)
List a content of a given package |
groovy.lang.MetaClass |
getMetaClass()
|
static PackageManager |
getPackageManager()
Returns a concrete implementation of PackageManager specific for the distro where the code is executed (e.g. |
static PackageManager |
getPackageManager(String linux_flavor)
Returns a concrete implementation of PackageManager specific for a given linux flavor. |
Object |
getProperty(String name)
|
static String |
getRepository_registry()
|
abstract List |
getServices(PackageInstance pkg)
Get a list of services (System V init scripts) provided by a given package |
Shell |
getShRoot()
|
Shell |
getShUser()
|
static String |
getType()
|
abstract int |
install(PackageInstance pkg)
Install a given package (from collection of all the packages available in all the repositories) |
Object |
invokeMethod(String name,
Object args)
|
abstract boolean |
isInstalled(PackageInstance pkg)
Check if a given package is installed on the system |
abstract int |
refresh()
Refresh the cached data describing the content of all registered repositories |
abstract int |
remove(PackageInstance pkg)
Remove a given package that is already installed on the system |
int |
removeBinRepo(String record)
De-register a binary package repository. |
abstract List |
search(String name,
String version)
Search for a package in all registered repositories |
abstract void |
setDefaults(String defaults)
Set package manager specific default values |
void |
setMetaClass(groovy.lang.MetaClass metaClass)
|
void |
setProperty(String name,
Object value)
|
static void |
setRepository_registry(String value)
|
void |
setShRoot(Shell value)
|
void |
setShUser(Shell value)
|
static void |
setType(String value)
|
void |
svc_do(PackageInstance pkg,
String action)
Deprecated. it is now recommended to use getServices() instead |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PackageManager()
Method Detail |
---|
public static String getType()
public static void setType(String value)
public static String getRepository_registry()
public static void setRepository_registry(String value)
public Shell getShRoot()
public void setShRoot(Shell value)
public Shell getShUser()
public void setShUser(Shell value)
public abstract void setDefaults(String defaults)
defaults
- String of default values encoded in a package manager specific waypublic abstract int addBinRepo(String record, String url, String key, String cookie)
record
- a package manager specific KEY portion of the repository registration (null is default)url
- a URL containing the packages constituting the repository (null is default)key
- an optional (can be null) cryptographic key for authenticating the content of the repositorycookie
- an optional, package manager specific opaque string
public int addBinRepo(String record, String descr)
record
- a package manager specific KEY portion of the repository registration (null is default)descr
- a full description of the repository in a native format
public abstract int cleanup()
public abstract int refresh()
public int removeBinRepo(String record)
record
- a package manager specific KEY portion of the repository registration (null is default)
public abstract List search(String name, String version)
name
- name of the package (inexact matches are ok)version
- a particular version of the package
public abstract int install(PackageInstance pkg)
pkg
- a package to be installed
public abstract int remove(PackageInstance pkg)
pkg
- a package to be installed
public abstract boolean isInstalled(PackageInstance pkg)
pkg
- a package to be checked
public abstract List getServices(PackageInstance pkg)
pkg
- a package that is expected to provide 0, 1 or multiple services
public abstract List getContentList(PackageInstance pkg)
pkg
- a package that is expected to provide >1 entry in its content
public static PackageManager getPackageManager()
public void svc_do(PackageInstance pkg, String action)
pkg
- a package that is expected to provide 0, 1 or multiple servicesaction
- what to do with service(s) (start, stop, status, restart)public static PackageManager getPackageManager(String linux_flavor)
linux_flavor
- e.g. ubuntu, debian, redhat, centos, etc.
public groovy.lang.MetaClass getMetaClass()
getMetaClass
in interface groovy.lang.GroovyObject
public void setMetaClass(groovy.lang.MetaClass metaClass)
setMetaClass
in interface groovy.lang.GroovyObject
public Object invokeMethod(String name, Object args)
invokeMethod
in interface groovy.lang.GroovyObject
public Object getProperty(String name)
getProperty
in interface groovy.lang.GroovyObject
public void setProperty(String name, Object value)
setProperty
in interface groovy.lang.GroovyObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |