|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.fuin.kickstart4j.AbstractFile
org.fuin.kickstart4j.SrcFile
public final class SrcFile
A file at the source directory. This class is immutable.
| Field Summary | |
|---|---|
static String |
UNZIP_TOKEN
Token used to mark archives to be unzipped at the target location. |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.fuin.kickstart4j.AbstractFile |
|---|
equals, getCanonicalPathAndFilename, getDestFile, getFilename, getMd5Hash, getPath, getRelativeSlashPathAndFilename, getSlashPath, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String UNZIP_TOKEN
| Constructor Detail |
|---|
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 SrcFile(SrcFile srcFile,
File file)
srcFile - Source file to copy values from (except hash and file size).file - File to create hash for and get file size from.| Method Detail |
|---|
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 toString()
toString in class Objectpublic final String toDebugString()
toDebugString in interface org.fuin.utils4j.ToDebugStringCapable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||