public final class SrcFile extends AbstractFile implements org.fuin.utils4j.ToDebugStringCapable
| Modifier and Type | Field and Description |
|---|---|
static String |
UNZIP_TOKEN
Token used to mark archives to be unzipped at the target location.
|
| Constructor and Description |
|---|
SrcFile(File baseDir,
File file,
boolean unzip,
boolean loadAlways,
boolean addToClasspath,
String srcFileUrl)
Constructor with base directory and file.
|
SrcFile(SrcFile srcFile,
File file)
Copy-Constructor with source file and local file.
|
SrcFile(String path,
String filename,
String md5Hash,
long size,
boolean unzip,
boolean loadAlways,
boolean addToClasspath,
String srcFileUrl,
int order)
Constructor with all arguments.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getOrder()
Returns the order the files should be installed or updated.
|
long |
getSize()
Returns the size of the file.
|
int |
getSizeAsInt()
Returns the size as integer value.
|
String |
getSrcFileUrl()
Returns the URL where the source file is located.
|
URL |
getSrcFileURL()
Returns the URL where the source file is located.
|
boolean |
isAddToClasspath()
Returns if this is a JAR file to be added to the classpath.
|
boolean |
isLoadAlways()
Returns if this file sould be loaded always (no matter if lazy loading is
enabled or not).
|
boolean |
isUnzip()
Returns if the file is an atchive and should be decompressed at the
target location.
|
String |
toDebugString() |
String |
toString() |
String |
toXML()
Creates an XML representation of the object.
|
equals, getCanonicalPathAndFilename, getDestFile, getFilename, getMd5Hash, getPath, getRelativeSlashPathAndFilename, getSlashPath, hashCodepublic static final String UNZIP_TOKEN
public SrcFile(File baseDir, File file, boolean unzip, boolean loadAlways, boolean addToClasspath, String srcFileUrl)
baseDir - Base directory for calculating the relative path.file - File inside the base directory.unzip - If the file is an archive and should be decompressed at the
target location true else false.loadAlways - Load file always (no matter if lazy loading is enabled or
not).addToClasspath - JAR file to be added to the classpath.srcFileUrl - URL where the source file is located.public SrcFile(String path, String filename, String md5Hash, long size, boolean unzip, boolean loadAlways, boolean addToClasspath, String srcFileUrl, int order)
path - Path relative to the base directory.filename - Filename without path.md5Hash - MD5 hash code of the file.size - Size of the file.unzip - If the file is an archive and should be decompressed at the
target location true else false.loadAlways - Load file always (no matter if lazy loading is enabled or
not).addToClasspath - JAR file to be added to the classpath.srcFileUrl - URL where the source file is located.order - Order the files should be updated or installed.public final long getSize()
public final int getSizeAsInt()
Integer.MAX_VALUE is returned.public final boolean isUnzip()
true
else falsepublic final boolean isAddToClasspath()
true else
false.public final boolean isLoadAlways()
true else false.public final String getSrcFileUrl()
public final URL getSrcFileURL()
MalformedURLException is wrapped into a
RuntimeException.public final int getOrder()
public final String toXML()
public final String toDebugString()
toDebugString in interface org.fuin.utils4j.ToDebugStringCapableCopyright © 2013 Future Invent Informationsmanagement GmbH, Hamburg (Germany). All Rights Reserved.