Class Package
java.lang.Object
org.fedoraproject.xmvn.tools.install.Package
- Direct Known Subclasses:
JavaPackage
Class describing a binary package as a set of files.
- Author:
- Mikolaj Izdebski
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a file to this package.voidaddFileIfNotExists(File file) Add a file to this package if id doesn't already exist in the package.booleangetFiles()Get files contained in this package.getId()Get unique string identifying this package.inthashCode()voidInstall this package into specified root.toString()voidwriteDescriptor(Path descriptorPath) Write package descriptor (akamfiles) into specified file.
-
Field Details
-
MAIN
ID of main package.- See Also:
-
-
Constructor Details
-
Package
Create an empty package with given ID.- Parameters:
id- package ID
-
-
Method Details
-
getId
Get unique string identifying this package.- Returns:
- package ID
-
getFiles
Get files contained in this package.- Returns:
- list view of files that will be installed with this package
-
addFile
Add a file to this package. The package must not already contains the file.- Parameters:
file- file to be added
-
addFileIfNotExists
Add a file to this package if id doesn't already exist in the package.- Parameters:
file- file to be added
-
install
Install this package into specified root.Package installation is equivalent to installation of all files it contains.
Target directory won't be overwritten if it already exists, which allows installation of multiple packages into the same directory.
- Parameters:
installRoot- target directory where package files will be installed- Throws:
IOException
-
writeDescriptor
Write package descriptor (akamfiles) into specified file.If target file exists then it shall be overwritten.
- Parameters:
descriptorPath- path to file into which descriptor shall be written- Throws:
IOException
-
toString
-
hashCode
public int hashCode() -
equals
-